fluttery_framework 4.0.0+7 copy "fluttery_framework: ^4.0.0+7" to clipboard
fluttery_framework: ^4.0.0+7 copied to clipboard

Provides all the functions and features needed for a typical production app.

Fluttery Framework #

codecov CI Pub.dev GitHub stars Last Commit Chat

A Framework for Flutter's Framework #

Fluttery_Framework Allows for faster and easier development with better maintainability. It looks like Flutter and works like Flutter. There's no 're-inventing of the wheel' or an extra learning curve.

It supplies the adaptive functions and features expected of a production-ready app:

  • Flutter's own intuitive State Management
  • Necessarily error handling capabilities
  • Easy implementation of both a Material & Cupertino interface
  • Omi-accessible system preferences
  • Built-in app notifications
  • A better menu bar
  • Built-in device event handling
  • A date picker
  • A color theme picker
  • An array of dialog windows
  • A customizable bottom bar
  • A loading screen option

Installing #

I don't like the version number suggested in the 'Installing' page. Instead, always go up to the 'minor' semantic version number when installing this library package. This means always trailing with one zero, '.0'. This allows you to take in any 'patch' versions that involves bugfixes.

For example, when installing version 7.9.2, use 7.9.0. That means, the bug fix, 7.9.3, will be installed the next time you 'upgrade' your dependencies.

Fluttery Framework Documentation #

Fluttery Framework

Free overview article on medium.com:

Fluttery Framework


Example Code: #

The Counter App
(Copy & paste and try it out.)
import 'package:fluttery_framework/view.dart';

import 'package:fluttery_framework/controller.dart';

void main() => runApp(MyApp());

class MyApp extends AppStatefulWidget {
  MyApp({Key? key}) : super(key: key);

  @override
  AppState createAppState() => _CounterAppState();
}

class _CounterAppState extends AppState {
  _CounterAppState()
      : super(
    title: 'Flutter Demo',
    home: const MyHomePage(),
    debugShowCheckedModeBanner: false,
    theme: ThemeData(
      primarySwatch: Colors.blue,
    ),
  );
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key, this.title = 'Flutter Demo Home Page'})
      : super(key: key);
  // Fields in a StatefulWidget should always be "final".
  final String title;
  @override
  State createState() => _MyHomePageState();
}

class _MyHomePageState extends StateX<MyHomePage> {
  _MyHomePageState() : super(controller: Controller()) {
    con = controller as Controller;
  }
  late Controller con;

  @override
  Widget buildAndroid(BuildContext context) => Scaffold(
    appBar: AppBar(
      title: Text(widget.title),
    ),
    body: Center(
      child: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: <Widget>[
          const Text('You have pushed the button this many times:'),
          Text(
            '${con.counter}',
            style: Theme.of(context).textTheme.headlineMedium,
          ),
        ],
      ),
    ),
    floatingActionButton: FloatingActionButton(
      /// Try this alternative approach.
      /// The Controller merely mimics the Flutter's API
      //         onPressed: con.onPressed,
      onPressed: () => setState(con.incrementCounter),
      tooltip: 'Increment',
      child: const Icon(Icons.add),
    ),
  );
}

class Controller extends StateXController {
  factory Controller() => _this ??= Controller._();
  Controller._()
      : _model = _Model(),
        super();

  static Controller? _this;
  final _Model _model;

  /// You're free to mimic Flutter's own API
  /// The Controller is able to talk to the View (the State object)
  void onPressed() => setState(() => _model._incrementCounter());

  int get counter => _model.integer;

  /// The Controller knows how to 'talk to' the Model.
  void incrementCounter() => _model._incrementCounter();
}

class _Model {
  int get integer => _integer;
  int _integer = 0;
  int _incrementCounter() => ++_integer;
}
Note, this package uses at its core the StateX package:

statex Pub.dev GitHub stars Last Commit