Created
January 26, 2026 14:44
-
-
Save fredgrott/d1c69aeb26524655c2c6470fccf8c424 to your computer and use it in GitHub Desktop.
using M3ETheme, non dynamic color way
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @override | |
| Widget build(BuildContext context) { | |
| final light = ColorScheme.fromSeed( | |
| seedColor: Colors.purple, brightness: Brightness.light); | |
| final dark = ColorScheme.fromSeed( | |
| seedColor: Colors.purple, brightness: Brightness.dark); | |
| return MaterialApp( | |
| title: 'M3E Gallery', | |
| theme: light.toM3EThemeData(override: M3eOverride(colors: M3ECustomColors.from(light), | |
| typography: M3ECustomTypography(base: CustomTextTheme, emphasized: MyM3ECustomEmphasized ), | |
| shapes: M3ECustomShapes.expressive(), | |
| spacing: M3ECustomSpacing.regular(), | |
| motion: M3EMotion.expressive()), | |
| base: ThemeDataWithCustomComponentThemes(colorScheme: light) ), | |
| darkTheme: dark.toM3EThemeData(override: M3eOverride(colors: M3ECustomColors(dark), | |
| typography: M3ECustomTypography(base: CustomTextTheme, emphasized: MyM3ECustomEmphasized ), | |
| shapes: M3ECustomShapes.expressive(), | |
| spacing: M3ECustomSpacing.regular(), | |
| motion: M3EMotion.expressive()), | |
| base: ThemeDataWithCustomComponentThemes(colorScheme: dark)), | |
| themeMode: _mode, | |
| home: GalleryHome( | |
| isDark: _mode == ThemeMode.dark, | |
| onToggleBrightness: _toggleMode, | |
| ), | |
| debugShowCheckedModeBanner: false, | |
| ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment