color library Null safety
Based on the Color class in the Flutter SDK.
Since we can't look up the ThemeData class in the build method there are helpful methods to get the design tokens for Material 3 colors.
- Theme.of(context).textTheme.colorScheme.primary;
+ Color.primary();
Classes
- BackgroundColor
- Color
- ColorAlphaBlend
- ColorARGB
- ColorRGBO
- ErrorColor
- ErrorContainerColor
- InversePrimaryColor
- InverseSurfaceColor
- MaterialAccentColor
- MaterialColor
- OnBackgroundColor
- OnErrorColor
- OnErrorContainerColor
- OnInverseSurfaceColor
- OnPrimaryColor
- OnPrimaryContainerColor
- OnSecondaryColor
- OnSecondaryContainerColor
- OnSurfaceColor
- OnSurfaceVariantColor
- OnTertiaryColor
- OnTertiaryContainerColor
- OutlineColor
- OutlineVariantColor
- PrimaryColor
- PrimaryContainerColor
- ScrimColor
- SecondaryColor
- SecondaryContainerColor
- ShadowColor
- SurfaceColor
- SurfaceTintColor
- SurfaceVariantColor
- TertiaryColor
- TertiaryContainerColor