fromFlutterTheme static method
Implementation
static Map<String, dynamic> fromFlutterTheme(ThemeData theme) {
return {
'primaryColor': theme.colorScheme.primary.toARGB32(),
'secondaryColor': theme.colorScheme.secondary.toARGB32(),
'surfaceColor': theme.colorScheme.surface.toARGB32(),
'errorColor': theme.colorScheme.error.toARGB32(),
'backgroundColor': theme.scaffoldBackgroundColor.toARGB32(),
'brightness': theme.brightness == Brightness.dark ? 'dark' : 'light',
};
}