flutter_dollar 0.0.1 copy "flutter_dollar: ^0.0.1" to clipboard
flutter_dollar: ^0.0.1 copied to clipboard

Keep state in your `build()` function.

flutter_dollar #

Keep state in your build() function.

Getting Started #

Add corresponding mixin to your StatefulWidget or StatelessWidget:


import 'package:flutter_dollar/flutter_dollar.dart';

class Stateful extends StatefulWidget with $StatefulWidget {
    // logic
}

class Stateless extends StatelessWidget with $StatelessWidget {
    // logic
}

You can now keep state inside your build() method:


Widget build(BuildContext context) {
  final a = $var(()=> 1);
  
  return Button(onClick: ()=> a.value ++); // widget will be automatically updated after click
}

There's many other dollar functions.

0
likes
20
pub points
0%
popularity

Publisher

unverified uploader

Keep state in your `build()` function.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

collection, dollar, flutter

More

Packages that depend on flutter_dollar