Skip to content

Instantly share code, notes, and snippets.

@fredgrott
Created November 8, 2025 20:03
Show Gist options
  • Select an option

  • Save fredgrott/4efc6752b848dbf0f8207e7c90cd37c6 to your computer and use it in GitHub Desktop.

Select an option

Save fredgrott/4efc6752b848dbf0f8207e7c90cd37c6 to your computer and use it in GitHub Desktop.
M3E ThemeExtension call
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,
darkTheme: dark,
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