Use dynamic_color by the Material team.
Monet Colors
A Flutter plugin that exposes Monet (Material You, Material 3) system colors on Android 12. Returns null
on unsupported platforms and leaves handling that to you. For a backwards compatible implementation, see monet.
Install & Use
See: Installing.
final MonetColors? colors = await Monet.get(); final primary200 = colors.primary[200]; final secondary400 = colors.secondary.shade400; final tertiary = colors.tertiary; final tertiary300 = tertiary[300];
GitHub
#Ui #Material #Design #Flutter