Featured

Getting Started with Powerflutter

How does Powerflutter work? Here is an example how to use the dependency injection, setup a model that automatically updates the UI and can be saved and loaded to shared preferences with a single line of code.

First lets look into the setup, which is called in your main method and fairly simple

setupCounterExample() {
  var model = CounterModel(); // Create the model
  Power.setDI(model); // Add it into the dependency injection
  PowerSharedPreferences.persistModel(model, "counterModel"); // Model is now loaded from SharedPrefrences & saved everytime something changes
}

How does our model look like?

class CounterModel with PowerModel {
  int get counter => get('counter', () => 0);
  set counter(int value) => set('counter', value);
}

We have have getters and setters for an int called counter that calls set and get function provided by the PowerModel mixin. This allows later for automatic UI updates whenever something changes and automatic saving to shared preferences. Well actually the code looks a bit different becaus we use code generation to create the getters and setters which makes it even simpler and more maintainable for large projects. Please see the Powerflutter Code Generation for more information.

Building the UI now is very simple:

class CounterExampleWidget extends PowerWidget<CounterModel> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(child: Text("You have tapped the button ${model.counter} times")),
      floatingActionButton: FloatingActionButton(onPressed: () => model.counter++, child: Icon(Icons.add)),
    );
  }
}

Using the PowerWidget will automatically update the view when any data changes and because we used the generic <CounterModel> the .model property is a typed data model taken from the dependency injection. The PowerWidget always updates any UI when an value from a PowerModelused in this widget changes, so no need to call setState or any other boilerplate code and we can just call odel.counter++ here or in any other part of the code and any UI that depends on this value will update.

Hello world, Poweflutter!

Powerflutter is an easy to use yet powerful framework for Flutter & Dart focussing on developer productivity.

Powerflutter wants to be what Rails is for Ruby, the go to Framework that makes all common Tasks easier. The focus is keeping things simple, developer productivity high, writing less boilerplate code, and getting maintainable, testable code.

Powerflutter will in the future give you the option to write your custom server code in dart using the Powerflutter Server Library.

Furthermore Powerflutter has an optional code generation library that will generate any even small boilerplate code and typed references to assets like images, sounds or localizations instead of manually added string based approaches which break easily and dont have compile time checks.

Getting Started

Examples and gettings Started Guides can be found in the Powerflutter Examples Repo.

Features & Roadmap for 2019

[X] Powerful and easy State management using automatic databinding

[X] Dependency Injection

[X] Eventbus to send events inside the application

[X] toJson and fromJson for automatic JSON serialization

[X] automatic saving of Application State to SharedPreferences with one line of Code

[ ] Saving & loading of data with referential Integrity using UUIDs

[ ] Firebase integrations with automatic loading & saving, data comes as strongly typed

[ ] Powerful and easy Animations

[ ] Powerful and easy Localization

[ ] Support for Flutter Web once it is merged into the stable branch

[ ] much more

Powerflutter Code Generation

[X] Model getter/setter code generation annotations
[ ] Strongly typed access to all your assets 

Powerflutter Server, write your server code in Dart with perfect client integration:

[ ] Share your logic and classes from client&server
[ ] Get the server running in minutes, easy to user yet powerful
[ ] Realtime (web)socket connections (alternativ traditional http connection)
[ ] Sending and receiving strongly typed objects, with automatic serialization and deserialization
[ ] Rooms that notify participants when somethings happens
[ ] Shared Objects, change data on the server from the client (and for other clients int the same room) by using assigning properties on an object without the need to send requests or handle responses (with access management) 
[ ] Server Hot Reload
[ ] DB Integrations / ORM / Querying 

Optional Powerflutter.com hosted Services:

[ ] Service for remote Localization updates. Change your Strings on the fly or add new languages not App Update needed. Full offline capable fallback and only send the minimum updates needed.
[ ] Build a community that helps each other localise their apps for free (e.g. you localise mine in spanish, I localise yours in german)
[ ] Service for remote Configuration Updates, 
[ ] Replace Images, Sounds on the fly

[ ] more examples

[ ] much more, any wishes?

Apps build with Powerflutter

Moves – design your play: Android