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';

to the top of the file and add annotation

    @generateColorScheme

to the class

    @generateColorScheme
    class MyColors 
        static Color get extra => const Color(0xFF003359);
    }

This will generate an extension to colorscheme

    extension MyColorsExtension on ColorScheme {
        Color get extra => MyColors.extra;
    }

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

Libraries

builder
annotations