Theming
One theme — nineteen colour roles, a radius and a font, in light and dark — applied to every component.
Set a project theme in the console and every app that declares nothing gets it. Or declare your own in the app — it replaces the project theme; the two are never mixed.
Drawn with this site's theme — follows the docs' light/dark switch
.my-app { --gu-primary: #5b21b6; --gu-background: #ffffff; --gu-radius: 16px; }<div className="my-app"> <GenUiReplyView source={source} theme="inherit" /></div>themeStyle({ 'colors.primary': '#5b21b6', radius: '16' }) builds a complete set from a partial one.
final scheme = ColorScheme.fromSeed(seedColor: brandPurple);
MaterialApp( theme: ThemeData( colorScheme: scheme, extensions: [GenUiThemeExtension.fromColorScheme(scheme)], ),)Adjust what the mapping gets wrong: .copyWith(radius: 16).
Light and dark
Section titled “Light and dark”Every theme carries both. Pass the mode your app is in — the renderer won’t guess from the system setting.
<RenderWidget xml={xml} data={data} theme={theme} brightness="dark" />