flutter_mdi_gui 0.0.2 copy "flutter_mdi_gui: ^0.0.2" to clipboard
flutter_mdi_gui: ^0.0.2 copied to clipboard

A Multi-Document Interface for Flutter.

FlutterMDI #

License: MIT

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 #

  1. Add dependencies to pubspec.yaml

dependencies:

  flutter_mdi_gui: <latest-version>

  1. Run the following command to fetch the dependencies.
flutter pub get
  1. Import package.
import 'package:flutter_mdi_gui/flutter_mdi_gui.dart';

Implementation #

  1. 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")
    ),
  )
);
  1. 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"),
    );
  },
);
  1. 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 #

Screenshot #

Sample app in action

Thanks #

Thank you for using this package and keep supporting opensource community.

2
likes
140
points
29
downloads
screenshot

Publisher

verified publisherqbolo.com

Weekly Downloads

A Multi-Document Interface for Flutter.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter, provider

More

Packages that depend on flutter_mdi_gui