ColorToMaterial
Get a MaterialColor from a single line of code instead of creating a Map<int, Color>
Lets get started
Import it to your .dart
file using :
import 'package:color_to_material/color_to_material.dart';
From a Color
Simply give a Color
as a parameter and then get the materialColor.
ColorToMaterial(Colors.orange).getMaterialColor();
From HEX
You can just give it a String
in the .fromHex
ColorToMaterial.fromHEX('0055ff').getMaterialColor();