swatcher

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

swatcher

Swatcher #
A simple utility to convert a Flutter Color to a MaterialColor for a theme.
Example #
The simplest use of this package is:
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Swatcher.createMaterialColor(Color(0xFF37A0F4)),
),
home: MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
copied to clipboard
It'll generate a MaterialColor based on the color you provided.
About the precision of this tool #
This tool is not 100% working, as you can see from the tests it differs a little by the wanted result. It'll be updated as soon as I'll be able to convert correctly a color to a MaterialColor.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.