fluttery_framework 4.0.1+12 fluttery_framework: ^4.0.1+12 copied to clipboard
Provides all the functions and features needed for a typical production app.
Fluttery Framework #
A Framework for Flutter's 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. If you know Flutter, you'll know Fluttery Framework.
It supplies the adaptive functions and features expected of a production-ready app:
- Flutter's own intuitive State Management
- Necessary error handling capabilities
- Easy implementation of both the Material & Cupertino interface
- App-wide accessibility to system preferences
- Built-in app notifications
- A better menu bar
- Event handling for the device the app runs on
- A date picker
- A color theme picker
- An array of dialog windows
- A customizable bottom bar
- A loading screen option
Installing #
Instead of using version number suggested in the 'Installing' page, always go up to the 'minor' semantic version number when installing this library package. This means always have a trailing 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 #
- Get started
- StateX class
- State Object Controller
- AppState class
- App's Preferences
- App object
- Error handling
- Extensions
- Device Information
Free overview article on medium.com:
The Counter Example 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;
}