DraftModeUIThemeData class
All design tokens consumed by DraftModeFramework UI widgets.
Use DraftModeUIThemeData.light or DraftModeUIThemeData.dark factories for pre-configured palettes. The cupertinoTheme field drives brightness resolution for CupertinoDynamicColor values at paint time.
Can be provided via DraftModeUITheme (InheritedWidget) or registered as a ThemeExtension on a Material ThemeData. The DraftModeUITheme.of helper checks both paths automatically.
- Inheritance
-
- Object
- ThemeExtension<
DraftModeUIThemeData> - DraftModeUIThemeData
Constructors
- DraftModeUIThemeData({required ColorRole primaryColor, required ColorRole secondaryColor, required ColorRole tertiaryColor, required Color accentColor, required Color dangerColor, required Color successColor, required Color warningColor, required Color separatorColor, double fontSizeXLarge = 20, double fontSizePrimary = 17, double fontSizeSecondary = 15, double fontSizeTertiary = 12, FontWeight fontWeightRegular = FontWeight.w400, FontWeight fontWeightMedium = FontWeight.w500, FontWeight fontWeightSemibold = FontWeight.w600, double spacingLarge = 20, double spacingPrimary = 16, double spacingSecondary = 14, double spacingTertiary = 10, double spacingSmall = 8, double radiusPrimary = 12, double radiusSecondary = 10, double radiusPill = 20, double iconSizeLarge = 22, double iconSizeMedium = 18, double iconSizeSmall = 16, ({double fontSize, FontWeight fontWeight, double height}) buttonLarge = (height: 50, fontSize: 17, fontWeight: FontWeight.normal), ({double fontSize, FontWeight fontWeight, double height}) buttonMedium = (height: 44, fontSize: 15, fontWeight: FontWeight.normal), ({double fontSize, FontWeight fontWeight, double height}) buttonSmall = (height: 34, fontSize: 13, fontWeight: FontWeight.normal), double rowMinHeight = 44, double rowPaddingHorizontal = 16, double labelWidth = 100, Color disclosureColor = CupertinoColors.systemGrey2, double disclosureSize = 14, double separatorHeight = 0.5, Color shadowColor = const Color(0x1F000000), double shadowBlurRadius = 12.0, double toastBottomOffset = 80, double toastOpacity = 0.9, double badgeMinSize = 18, double badgeRadius = 9, double badgePaddingHorizontal = 6, double badgePaddingVertical = 2, double badgeOffsetTop = -6, double badgeOffsetRight = -8, double dropDownMenuMinWidth = 180, double dropDownMenuMaxWidth = 260, double dropDownMenuGap = 4, Duration animationDurationFast = const Duration(milliseconds: 150), Duration animationDurationDefault = const Duration(milliseconds: 250), Curve animationCurve = Curves.easeInOut, required CupertinoThemeData cupertinoTheme})
- DraftModeUIThemeData.dark({double labelWidth = 100})
-
Pre-configured dark palette using Brightness.dark Cupertino colours.
factory
- DraftModeUIThemeData.light({double labelWidth = 100})
-
Pre-configured light palette using Brightness.light Cupertino colours.
factory
Properties
- accentColor → Color
-
final
- animationCurve → Curve
-
final
- animationDurationDefault → Duration
-
final
- animationDurationFast → Duration
-
final
- badgeMinSize → double
-
final
- badgeOffsetRight → double
-
final
- badgeOffsetTop → double
-
final
- badgePaddingHorizontal → double
-
final
- badgePaddingVertical → double
-
final
- badgeRadius → double
-
final
-
final
-
final
-
final
- cupertinoTheme → CupertinoThemeData
-
final
- dangerColor → Color
-
final
- disclosureColor → Color
-
final
- disclosureSize → double
-
final
- dropDownMenuGap → double
-
final
- dropDownMenuMaxWidth → double
-
final
- dropDownMenuMinWidth → double
-
final
- fontSizePrimary → double
-
final
- fontSizeSecondary → double
-
final
- fontSizeTertiary → double
-
final
- fontSizeXLarge → double
-
final
- fontWeightMedium → FontWeight
-
final
- fontWeightRegular → FontWeight
-
final
- fontWeightSemibold → FontWeight
-
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- iconSizeLarge → double
-
final
- iconSizeMedium → double
-
final
- iconSizeSmall → double
-
final
- labelWidth → double
-
final
-
final
-
final
-
final
-
final
- primaryColor → ColorRole
-
final
- radiusPill → double
-
final
- radiusPrimary → double
-
final
- radiusSecondary → double
-
final
- rowMinHeight → double
-
final
- rowPaddingHorizontal → double
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- secondaryColor → ColorRole
-
final
- separatorColor → Color
-
final
- separatorHeight → double
-
final
- shadowBlurRadius → double
-
final
- shadowColor → Color
-
final
- spacingLarge → double
-
final
- spacingPrimary → double
-
final
- spacingSecondary → double
-
final
- spacingSmall → double
-
final
- spacingTertiary → double
-
final
- successColor → Color
-
final
- tertiaryColor → ColorRole
-
final
- toastBottomOffset → double
-
final
- toastOpacity → double
-
final
- type → Object
-
The extension's type.
no setterinherited
- warningColor → Color
-
final
Methods
-
copyWith(
{ColorRole? primaryColor, ColorRole? secondaryColor, ColorRole? tertiaryColor, Color? accentColor, Color? dangerColor, Color? successColor, Color? warningColor, Color? separatorColor, double? fontSizeXLarge, double? fontSizePrimary, double? fontSizeSecondary, double? fontSizeTertiary, FontWeight? fontWeightRegular, FontWeight? fontWeightMedium, FontWeight? fontWeightSemibold, double? spacingLarge, double? spacingPrimary, double? spacingSecondary, double? spacingTertiary, double? spacingSmall, double? radiusPrimary, double? radiusSecondary, double? radiusPill, double? iconSizeLarge, double? iconSizeMedium, double? iconSizeSmall, ({double fontSize, FontWeight fontWeight, double height})? buttonLarge, ({double fontSize, FontWeight fontWeight, double height})? buttonMedium, ({double fontSize, FontWeight fontWeight, double height})? buttonSmall, double? rowMinHeight, double? rowPaddingHorizontal, double? labelWidth, Color? disclosureColor, double? disclosureSize, double? separatorHeight, Color? shadowColor, double? shadowBlurRadius, double? toastBottomOffset, double? toastOpacity, double? badgeMinSize, double? badgeRadius, double? badgePaddingHorizontal, double? badgePaddingVertical, double? badgeOffsetTop, double? badgeOffsetRight, double? dropDownMenuMinWidth, double? dropDownMenuMaxWidth, double? dropDownMenuGap, Duration? animationDurationFast, Duration? animationDurationDefault, Curve? animationCurve, CupertinoThemeData? cupertinoTheme}) → DraftModeUIThemeData -
Creates a copy of this theme extension with the given fields
replaced by the non-null parameter values.
override
-
lerp(
covariant DraftModeUIThemeData? other, double t) → DraftModeUIThemeData -
Linearly interpolate with another ThemeExtension object.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override