slim 1.0.3 slim: ^1.0.3 copied to clipboard
Super Light State Management using pure dart and flutter, making easy way to work with ChangeNotifier or any other model class
slim #
Super light statemanagment implemented pure out of the box.
Single Slim #
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Slim<Counter>(
stateObject: Counter(),
child: MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
),
home: MyHomePage(title: 'Flutter Demo Home Page'),
),
);
}
}
Multi Slim - Slimer #
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MultiSlim(
slimers: [Slimer<Counter>(Counter())],
child: MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
),
home: MyHomePage(title: 'Flutter Demo Home Page'),
),
);
}
}
Resolve Object #
Single Slim #
Slim.of<Counter>(context);