Skip to content

Instantly share code, notes, and snippets.

@fredgrott
Created November 12, 2025 19:09
Show Gist options
  • Select an option

  • Save fredgrott/439d499da9f6200fea835b23fa5fe0e2 to your computer and use it in GitHub Desktop.

Select an option

Save fredgrott/439d499da9f6200fea835b23fa5fe0e2 to your computer and use it in GitHub Desktop.
themeextension ex
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