C Scheme Gen | Coderz Product

c_scheme_gen

Last updated:

0 purchases

c_scheme_gen Image
c_scheme_gen Images

Free

Languages

Categories

Add to Cart

Description:

c scheme gen

C-Scheme Gen #
This is a package of generators. Currently, you can generate a color scheme from a class of static colors.
example. #
in file colors.dart add
part 'colors.g.dart';
copied to clipboard
to the top of the file
and add annotation
@generateColorScheme
copied to clipboard
to the class
@generateColorScheme
class MyColors
static Color get extra => const Color(0xFF003359);
}
copied to clipboard
This will generate an extension to colorscheme
extension MyColorsExtension on ColorScheme {
Color get extra => MyColors.extra;
}
copied to clipboard
The reason you might want this is so that you can access the colors through the context in widgets like so
Theme.of(context).colorScheme.extra
copied to clipboard

License:

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

Files In This Product: (if this is empty don't purchase this product)

Customer Reviews

There are no reviews.