Open DanielSmith1239 opened 5 years ago
Hello, I'm confused about how we're supposed to maintain the theme after the app is closed. Right now, here is my code for creating the app:
return DynamicTheme( defaultBrightness: Brightness.light, data: (brightness) => DynamicTheme.of(context)?.data ?? Themes.light.getThemeData(context), themedWidgetBuilder: (context, theme) { return MaterialApp( theme: theme, debugShowCheckedModeBanner: false, title: 'Is It Raining?', home: DataContainerView() ); } );
This doesn't seem to be working for me. DynamicTheme.of(context) always returns null.
DynamicTheme.of(context)
Dynamic Theme only persists the brightness.
data: (brightness) => ...
contains the brightness which you can use. There you can construct your usual theme using that brightness.
Hello, I'm confused about how we're supposed to maintain the theme after the app is closed. Right now, here is my code for creating the app:
This doesn't seem to be working for me.
DynamicTheme.of(context)
always returns null.