Skip to content

Commit f06986b

Browse files
committed
Fix mistakes in README.md section about useExpressiveOnContainerColors
1 parent d2afb79 commit f06986b

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -452,18 +452,15 @@ When `useExpressiveOnContainerColors` is `true`, the seed generated `ColorScheme
452452

453453
Prior to MCU version 0.12.0 the `MaterialDynamicColors` used an older Material-3 spec. Flutter stable **3.38.x** still use MCU versions lower than 0.12.0 and thus default to the older color tones 10 in light mode. This will be changed when Flutter is updated to use MCU 0.12.0 or later. With FSS 3.0.0, you could already opt in on using the new spec, with FSS 4.0.0 the default is changed to use the new spec by default. This is done to align FSS with a coming change to update the pinned version of MCU to 0.13.0 or later in next Flutter stable after version 0.38.x.
454454

455-
If you need to keep the older higher contrast on-container colors, or just to get identical results as you got bu default before version 4.0.0, you can set `useExpressiveOnContainerColors` to `false` in `SeedColorScheme.fromSeeds` for your light mode `ColorScheme` generation.
456-
455+
If you need to keep the older higher contrast on-container colors, or must get identical results as you got before version 4.0.0, you can set `useExpressiveOnContainerColors` to `false` in `SeedColorScheme.fromSeeds` for your light mode `ColorScheme` generation.
457456

458457
```dart
459458
// Make a light ColorScheme from a seeds using variant style vibrant.
460459
final ColorScheme schemeLight = SeedColorScheme.fromSeeds(
461460
brightness: Brightness.light,
462461
primaryKey: primarySeedColor,
463-
variant: FlexSchemeVariant.vibrant,
464-
// Use the coming new standard. It does nothing in dark mode,
465-
// so no point in using it there and it defaults to false.
466-
useExpressiveOnContainerColors: false,
462+
variant: FlexSchemeVariant.vibrant,
463+
useExpressiveOnContainerColors: false, // Opt out of expressive on colors
467464
);
468465
// Make a dark ColorScheme from a seeds using variant style vibrant.
469466
final ColorScheme schemeDark = SeedColorScheme.fromSeeds(

0 commit comments

Comments
 (0)