UI Constants
KitColors
Itβs just as important to have a consistent color palette. Our favourite color is the Neutral Colors from Tailwind CSS (you can see it used thoughout all of Hungrimind).
There is a utility class called KitColors
that contains all the shades of the neutral colors and other colors that might be relevant for you.
The colors in the theme class will be inverted correctly depending on the current theme.
context.kitColors.neutral500context.kitColors.red500context.kitColors.green500context.kitColors.yellow500
Consistent UI
For your apps to have a professional look and feel, it is important to have a consistent UI. We have created a set of utility classes to help you create a consistent UI.
β TIP
All of these are accessible through extensions on the
BuildContext
.
AppSpacing
The AppSpacing
class helps you to create consistent spacing between your UI elements.
context.spacings.xxscontext.spacings.xscontext.spacings.smcontext.spacings.mdcontext.spacings.lgcontext.spacings.xlcontext.spacings.xxl
BorderRadius
The BorderRadius
class helps you to create consistent border radii.
context.borderRadius.nonecontext.borderRadius.smcontext.borderRadius.mdcontext.borderRadius.lgcontext.borderRadius.lgcontext.borderRadius.xxlcontext.borderRadius.xxxlcontext.borderRadius.full
Breakpoints
The Breakpoints
class helps you to create responsive UI.
context.breakpoints.smcontext.breakpoints.mdcontext.breakpoints.lgcontext.breakpoints.xlcontext.breakpoints.xxl
Durations
The Durations
class helps you to create consistent durations.
context.durations.duration75context.durations.duration100context.durations.duration150context.durations.duration200context.durations.duration300context.durations.duration500context.durations.duration700context.durations.duration1000
Shadows
The Shadows
class helps you to create consistent shadows.
context.shadows.smcontext.shadows.mdcontext.shadows.lgcontext.shadows.xlcontext.shadows.xxl
Text Styles
The TextStyles
class helps you to create consistent text styles.
context.textStyles.xscontext.textStyles.smcontext.textStyles.standardcontext.textStyles.lgcontext.textStyles.xlcontext.textStyles.xxlcontext.textStyles.xxxl