Created
November 12, 2025 19:09
-
-
Save fredgrott/439d499da9f6200fea835b23fa5fe0e2 to your computer and use it in GitHub Desktop.
themeextension ex
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
| Widget build(BuildContext context){ | |
| final light = ColorScheme.fromSeed(dynamicSchemeVariant: DynamicSchemeVariant.tonalSpot, | |
| contrastLevel: 0.1, | |
| seedColor: Colors.purple, brightness: Brightness.light).toM3EThemeData(); | |
| final dark = ColorScheme.fromSeed(dynamicSchemeVariant: DynamicSchemeVariant.tonalSpot, | |
| contrastLevel: 0.1, | |
| seedColor: Colors.purple, brightness: Brightness.dark).toM3EThemeData(); | |
| return MaterialApp( | |
| title: "Me". | |
| theme: light.toM3ETheme(), | |
| darkTheme: dark.toM3ETheme(), | |
| themeMode: ThemeMode.system, | |
| home: Child(), | |
| debugShowCheckedModeBanner: false, | |
| ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment