-
genMixinForWM
→ const CuteThemeOptions
-
class SomeWM extends WidgetModel with AppThemeWidgetModelMixin {
...
}
@override
Widget build(SomeWM wm) {
return Scaffold(
appBar: AppBar(title: const Text('Cute Theme demo')),
body: Padding(
padding: wm.appTheme.paddingX1,
child: Text('CuteTheme', style: wm.appTheme.textH1),
),
);
}
-
genBuildContextExtension
→ const CuteThemeOptions
-
Generates an extension for the BuildContext
.
@override
Widget build(BuildContext context) {
return Text('CuteTheme', style: context.appTheme.textH1);
}
-
genThemeWidgetBuilder
→ const CuteThemeOptions
-
AppThemeBuilder(
builder: (context, theme) => Padding(
padding: theme.paddingX1,
child: Text('CuteTheme', style: theme.textH1),
),
)