smart_color 0.2.2 copy "smart_color: ^0.2.2" to clipboard
smart_color: ^0.2.2 copied to clipboard

This is a package used to convert strings to flutter colors, along with all ant design colors

English | 简体中文

smart_color #

pub package

A smart color package, All ant design colors are included in the plugin

Usage #

To use this plugin, add smart_color as a dependency in your pubspec.yaml file.

Example #

// Import package
import 'package:flutter_icons/flutter_icons.dart';
import 'package:flutter/material.dart';

SmartColor.parse("#ffffff");
SmartColor.parse("white");
SmartColor.parse("rgb(0,0,0)")
SmartColor.parse("rgba(0,0,0,.5)")
SmartColor.antDColor(Color(0xFFf5222d)); //To get the color of ant design, you can get ten different colors from one base color
SmartColor.antDColor(Color(0xFFf5222d)).shade1; //Gets color 1
SmartColor.antDColor(Color(0xFFf5222d)).shade2; //Gets color 2
SmartColor.antDColor(Color(0xFFf5222d)).shade3; //Gets color 3
...
SmartColor.antDColor(Color(0xFFf5222d)).shade6; //Gets color 6, which is the same as the base color

...
//Some common colors are already defined in the library
SmartColor.red;
SmartColor.red.shade1;
SmartColor.green;
SmartColor.green.shade1;

4
likes
30
pub points
47%
popularity

Publisher

unverified uploader

This is a package used to convert strings to flutter colors, along with all ant design colors

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, pigment

More

Packages that depend on smart_color