Last updated:
0 purchases
flutter tailwind colors
flutter_tailwind_colors #
Tailwind CSS 3 Colors
Dart package exposing Tailwind Colors to be used in flutter in a way similar to the Material colors.
Installation #
Add to your pubspec.yaml file:
dependencies:
tailwind_colors: ^0.0.2
copied to clipboard
Get the package via your IDE or via the command line by typing:
$ pub get
copied to clipboard
Import the flutter_tailwind_colors package
import 'package:flutter_tailwind_colors/flutter_tailwind_colors.dart';
copied to clipboard
How to Use #
Tailwind Colors can be created and used in the same way as the usual Material color palette.
// TWColors has shades starting from 100 up to 900 in increment of 100
Color primaryColor = TWColors.emerald.shade100;
Color secondColor = TWColors.rose.shade900;
copied to clipboard
TWColors features:
slate
gray
zinc
neutral
stone
red
orange
amber
yellow
lime
green
emerald
teal
cyan
sky
blue
indigo
violet
purple
pink
rose
TWColors features the Tailwind 3.0 color palette:
The palette can be found on the TailwindCSS website
Use as a theme #
Every colors from the TWColors palettes can be used.
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: TWColors.emrald,
),
home: MyHomePage(
title: 'Flutter Demo Home Page',
),
);
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.