toMap method
Converts this color palette to a map for platform channel communication Deliberately using deprecated methods to avoid breaking changes
Implementation
Map<String, dynamic> toMap() {
return {
'surface': surface.value, // ignore: deprecated_member_use
'onSurface': onSurface.value, // ignore: deprecated_member_use
'onSurfaceVariant': onSurfaceVariant.value, // ignore: deprecated_member_use
'primary': primary.value, // ignore: deprecated_member_use
'onPrimary': onPrimary.value, // ignore: deprecated_member_use
if (textFieldBackground != null)
'textFieldBackground': textFieldBackground!.value, // ignore: deprecated_member_use
if (cursor != null) 'cursor': cursor!.value, // ignore: deprecated_member_use
};
}