flutter_mdi_gui 0.0.2
flutter_mdi_gui: ^0.0.2 copied to clipboard
A Multi-Document Interface for Flutter.
FlutterMDI #
This package provides a Multi-Document Interface (wiki) for Flutter applications with a focus on speed, easy to use and extendibility. The code is inspired from Achref Faidi's FlutterGUI and uses Provider for its state management.
A sample project is provided in the /example folder
Getting started #
Installing #
- Add dependencies to
pubspec.yaml
dependencies:
flutter_mdi_gui: <latest-version>
- Run the following command to fetch the dependencies.
flutter pub get
- Import package.
import 'package:flutter_mdi_gui/flutter_mdi_gui.dart';
Implementation #
- Add
FlutterMdi
in the tree where all the windows should be displayed.
MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('MDI Example'),
),
body: FlutterMdi(
mdiConfig: const MdiConfig(
borderRadius: 3.0,
defaultHeaderColor: Colors.blueAccent,
),
child: Text("your app comes here")
),
)
);
- Create a window with
MdiController.addWindowTo
method.
TextButton(
child: const Text("Create static window"),
onPressed: () {
MdiController.addWindowTo(
context,
title: "Sample static window",
body: const Text("This is a sample static window"),
);
},
);
- Close a window from everywhere below the window tree with the
MdiController.closeWindowIn
method.
TextButton(
onPressed: () {
MdiController.closeWindowIn(context);
},
child: const Text("Remove me from within window widget.")
);
Known limitations #
- The ⤡ ⤢ cursors are not supported on Mac Desktop, see: https://github.com/flutter/flutter/issues/89351
Screenshot #
Thanks #
Thank you for using this package and keep supporting opensource community.