UIProThemeData class

Core theme data class that defines all visual properties for the UI system.

This is the single source of truth for colors, typography, spacing, border radius, shimmer colors, and component-specific styles.

Example:

UIProThemeData(
  primaryColor: Colors.blue,
  secondaryColor: Colors.purple,
  backgroundColor: Colors.white,
  borderRadius: 12,
)

Constructors

UIProThemeData({Color primaryColor = const Color(0xFF2196F3), Color secondaryColor = const Color(0xFF9C27B0), Color backgroundColor = const Color(0xFFFFFFFF), Color surfaceColor = const Color(0xFFF5F5F5), Color textColor = const Color(0xFF212121), Color textSecondaryColor = const Color(0xFF757575), Color errorColor = const Color(0xFFE53935), Color successColor = const Color(0xFF43A047), Color warningColor = const Color(0xFFFFA726), Color dividerColor = const Color(0xFFE0E0E0), Color disabledColor = const Color(0xFFBDBDBD), String? fontFamily, double fontSizeBase = 14, double fontSizeSmall = 12, double fontSizeLarge = 16, double fontSizeXLarge = 20, FontWeight fontWeightRegular = FontWeight.w400, FontWeight fontWeightMedium = FontWeight.w500, FontWeight fontWeightBold = FontWeight.w700, double letterSpacing = 0.0, double lineHeight = 1.4, double spacingXS = 4, double spacingSM = 8, double spacingMD = 16, double spacingLG = 24, double spacingXL = 32, double borderRadius = 12, double borderRadiusSmall = 8, double borderRadiusLarge = 16, double borderWidth = 1, double buttonHeight = 48, double buttonPaddingHorizontal = 24, double buttonPaddingVertical = 12, double buttonElevation = 0, Color? buttonTextColor, Color? buttonDisabledColor, Color? buttonDisabledTextColor, Color? textFieldBackgroundColor, Color? textFieldBorderColor, Color? textFieldFocusedBorderColor, Color? textFieldHintColor, EdgeInsets? textFieldContentPadding, Color shimmerBaseColor = const Color(0xFFE0E0E0), Color shimmerHighlightColor = const Color(0xFFF5F5F5), Duration shimmerDuration = const Duration(milliseconds: 1500), double? shimmerBorderRadius, Color? appBarBackgroundColor, Color? appBarForegroundColor, double appBarElevation = 0, TextStyle? appBarTitleStyle, bool appBarCenterTitle = true, Color? bottomNavBackgroundColor, Color? bottomNavSelectedColor, Color? bottomNavUnselectedColor, double bottomNavElevation = 8, double bottomNavIconSize = 24, bool bottomNavShowLabels = true, double bottomNavIndicatorHeight = 3, Duration animationDuration = const Duration(milliseconds: 300), Duration animationDurationFast = const Duration(milliseconds: 150), Duration animationDurationSlow = const Duration(milliseconds: 500), Curve animationCurve = Curves.easeInOut})
const

Properties

animationCurve Curve
Default animation curve.
final
animationDuration Duration
Default animation duration.
final
animationDurationFast Duration
Fast animation duration.
final
animationDurationSlow Duration
Slow animation duration.
final
appBarBackgroundColor Color?
App bar background color.
final
appBarCenterTitle bool
App bar center title.
final
appBarElevation double
App bar elevation.
final
appBarForegroundColor Color?
App bar foreground/icon color.
final
appBarTitleStyle TextStyle?
App bar title text style.
final
backgroundColor Color
Main background color for screens and surfaces.
final
borderRadius double
Default border radius for all components.
final
borderRadiusLarge double
Large border radius.
final
borderRadiusSmall double
Small border radius.
final
borderWidth double
Border width.
final
bottomNavBackgroundColor Color?
Bottom navigation background color.
final
bottomNavElevation double
Bottom navigation elevation.
final
bottomNavIconSize double
Bottom navigation icon size.
final
bottomNavIndicatorHeight double
Bottom navigation indicator height.
final
bottomNavSelectedColor Color?
Bottom navigation selected item color.
final
bottomNavShowLabels bool
Bottom navigation show labels.
final
bottomNavUnselectedColor Color?
Bottom navigation unselected item color.
final
buttonDisabledColor Color?
Button disabled background color.
final
buttonDisabledTextColor Color?
Button disabled text color.
final
buttonElevation double
Button elevation.
final
buttonHeight double
Button height.
final
buttonPaddingHorizontal double
Button horizontal padding.
final
buttonPaddingVertical double
Button vertical padding.
final
buttonTextColor Color?
Button text color (defaults to white on primary).
final
defaultBorderRadius BorderRadius
Get border radius.
no setter
disabledColor Color
Disabled state color.
final
dividerColor Color
Divider/border color.
final
effectiveAppBarBackgroundColor Color
Effective app bar background color.
no setter
effectiveAppBarForegroundColor Color
Effective app bar foreground color.
no setter
effectiveBottomNavBackgroundColor Color
Effective bottom nav background color.
no setter
effectiveBottomNavSelectedColor Color
Effective bottom nav selected color.
no setter
effectiveBottomNavUnselectedColor Color
Effective bottom nav unselected color.
no setter
effectiveButtonDisabledColor Color
Effective button disabled background color.
no setter
effectiveButtonDisabledTextColor Color
Effective button disabled text color.
no setter
effectiveButtonTextColor Color
Effective button text color (defaults to contrasting color on primary).
no setter
effectiveShimmerBorderRadius double
Effective shimmer border radius.
no setter
effectiveTextFieldBackgroundColor Color
Effective text field background color.
no setter
effectiveTextFieldBorderColor Color
Effective text field border color.
no setter
effectiveTextFieldContentPadding EdgeInsets
Effective text field content padding.
no setter
effectiveTextFieldFocusedBorderColor Color
Effective text field focused border color.
no setter
effectiveTextFieldHintColor Color
Effective text field hint color.
no setter
errorColor Color
Error color for validation states.
final
fontFamily String?
Font family for all text.
final
fontSizeBase double
Base font size.
final
fontSizeLarge double
Large font size.
final
fontSizeSmall double
Small font size.
final
fontSizeXLarge double
Extra large font size for headings.
final
fontWeightBold FontWeight
Font weight for bold/strong emphasis.
final
fontWeightMedium FontWeight
Font weight for medium emphasis.
final
fontWeightRegular FontWeight
Font weight for regular text.
final
hashCode int
The hash code for this object.
no setteroverride
largeBorderRadius BorderRadius
Get large border radius.
no setter
letterSpacing double
Default letter spacing.
final
lineHeight double
Line height multiplier.
final
primaryColor Color
Primary brand color used for buttons, active states, links.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secondaryColor Color
Secondary brand color for accents and highlights.
final
shimmerBaseColor Color
Shimmer base color (darker shade).
final
shimmerBorderRadius double?
Shimmer item border radius.
final
shimmerDuration Duration
Shimmer animation duration.
final
shimmerHighlightColor Color
Shimmer highlight color (lighter shade for animation).
final
smallBorderRadius BorderRadius
Get small border radius.
no setter
spacingLG double
Large spacing (24).
final
spacingMD double
Medium spacing (16).
final
spacingSM double
Small spacing (8).
final
spacingXL double
Extra large spacing (32).
final
spacingXS double
Extra small spacing (4).
final
successColor Color
Success color for positive states.
final
surfaceColor Color
Surface color for cards, dialogs, and elevated surfaces.
final
textColor Color
Primary text color.
final
textFieldBackgroundColor Color?
Text field background color.
final
textFieldBorderColor Color?
Text field border color.
final
textFieldContentPadding EdgeInsets?
Text field content padding.
final
textFieldFocusedBorderColor Color?
Text field focused border color.
final
textFieldHintColor Color?
Text field hint color.
final
textSecondaryColor Color
Secondary/muted text color for hints, labels.
final
warningColor Color
Warning color for caution states.
final

Methods

copyWith({Color? primaryColor, Color? secondaryColor, Color? backgroundColor, Color? surfaceColor, Color? textColor, Color? textSecondaryColor, Color? errorColor, Color? successColor, Color? warningColor, Color? dividerColor, Color? disabledColor, String? fontFamily, double? fontSizeBase, double? fontSizeSmall, double? fontSizeLarge, double? fontSizeXLarge, FontWeight? fontWeightRegular, FontWeight? fontWeightMedium, FontWeight? fontWeightBold, double? letterSpacing, double? lineHeight, double? spacingXS, double? spacingSM, double? spacingMD, double? spacingLG, double? spacingXL, double? borderRadius, double? borderRadiusSmall, double? borderRadiusLarge, double? borderWidth, double? buttonHeight, double? buttonPaddingHorizontal, double? buttonPaddingVertical, double? buttonElevation, Color? buttonTextColor, Color? buttonDisabledColor, Color? buttonDisabledTextColor, Color? textFieldBackgroundColor, Color? textFieldBorderColor, Color? textFieldFocusedBorderColor, Color? textFieldHintColor, EdgeInsets? textFieldContentPadding, Color? shimmerBaseColor, Color? shimmerHighlightColor, Duration? shimmerDuration, double? shimmerBorderRadius, Color? appBarBackgroundColor, Color? appBarForegroundColor, double? appBarElevation, TextStyle? appBarTitleStyle, bool? appBarCenterTitle, Color? bottomNavBackgroundColor, Color? bottomNavSelectedColor, Color? bottomNavUnselectedColor, double? bottomNavElevation, double? bottomNavIconSize, bool? bottomNavShowLabels, double? bottomNavIndicatorHeight, Duration? animationDuration, Duration? animationDurationFast, Duration? animationDurationSlow, Curve? animationCurve}) UIProThemeData
Creates a copy of this theme data with the given fields replaced.
customBorderRadius(double radius) BorderRadius
Get custom border radius.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
textStyle({double? fontSize, FontWeight? fontWeight, Color? color, double? letterSpacing, double? height}) TextStyle
Get text style with theme defaults applied.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override

Constants

dark → const UIProThemeData
Dark theme preset.
light → const UIProThemeData
Default light theme preset.