FThemeData constructor

FThemeData({
  1. required FColors colors,
  2. required bool touch,
  3. String? debugLabel,
  4. FBreakpoints breakpoints = const FBreakpoints(),
  5. FTypography? typography,
  6. FStyle? style,
  7. FAccordionStyle? accordionStyle,
  8. FAutocompleteStyle? autocompleteStyle,
  9. FVariants<FAlertVariantConstraint, FAlertVariant, FAlertStyle, FAlertStyleDelta>? alertStyles,
  10. FAvatarStyle? avatarStyle,
  11. FVariants<FBadgeVariantConstraint, FBadgeVariant, FBadgeStyle, FBadgeStyleDelta>? badgeStyles,
  12. FBottomNavigationBarStyle? bottomNavigationBarStyle,
  13. FBreadcrumbStyle? breadcrumbStyle,
  14. FVariants<FButtonVariantConstraint, FButtonVariant, FButtonSizeStyles, FButtonSizesDelta>? buttonStyles,
  15. FCalendarStyle? calendarStyle,
  16. FCardStyle? cardStyle,
  17. FCheckboxStyle? checkboxStyle,
  18. FVariants<FCircularProgressSizeVariantConstraint, FCircularProgressSizeVariant, FCircularProgressStyle, FCircularProgressStyleDelta>? circularProgressStyles,
  19. FDateFieldStyle? dateFieldStyle,
  20. FDeterminateProgressStyle? determinateProgressStyle,
  21. FDialogRouteStyle? dialogRouteStyle,
  22. FDialogStyle? dialogStyle,
  23. FVariants<FDividerAxisVariantConstraint, FDividerAxisVariant, FDividerStyle, FDividerStyleDelta>? dividerStyles,
  24. FVariants<FHeaderVariantConstraint, FHeaderVariant, FHeaderStyle, FHeaderStyleDelta>? headerStyles,
  25. FVariants<FItemVariantConstraint, FItemVariant, FItemStyle, FItemStyleDelta>? itemStyles,
  26. FItemGroupStyle? itemGroupStyle,
  27. FLabelStyles? labelStyles,
  28. FLineCalendarStyle? lineCalendarStyle,
  29. FMultiSelectStyle? multiSelectStyle,
  30. FModalSheetStyle? modalSheetStyle,
  31. FPaginationStyle? paginationStyle,
  32. FPersistentSheetStyle? persistentSheetStyle,
  33. FPickerStyle? pickerStyle,
  34. FPopoverStyle? popoverStyle,
  35. FPopoverMenuStyle? popoverMenuStyle,
  36. FProgressStyle? progressStyle,
  37. FRadioStyle? radioStyle,
  38. FVariants<FResizableAxisVariantConstraint, FResizableAxisVariant, FResizableDividerStyle, FResizableDividerStyleDelta>? resizableStyles,
  39. FScaffoldStyle? scaffoldStyle,
  40. FSelectStyle? selectStyle,
  41. FSelectGroupStyle? selectGroupStyle,
  42. FSelectMenuTileStyle? selectMenuTileStyle,
  43. FSidebarStyle? sidebarStyle,
  44. FVariants<FSliderAxisVariantConstraint, FSliderAxisVariant, FSliderStyle, FSliderStyleDelta>? sliderStyles,
  45. FToasterStyle? toasterStyle,
  46. FSwitchStyle? switchStyle,
  47. FTabsStyle? tabsStyle,
  48. FTappableStyle? tappableStyle,
  49. FVariants<FTextFieldSizeVariantConstraint, FTextFieldSizeVariant, FTextFieldStyle, FTextFieldStyleDelta>? textFieldStyles,
  50. FVariants<FItemVariantConstraint, FItemVariant, FTileStyle, FTileStyleDelta>? tileStyles,
  51. FTileGroupStyle? tileGroupStyle,
  52. FTimeFieldStyle? timeFieldStyle,
  53. FTimePickerStyle? timePickerStyle,
  54. FTooltipStyle? tooltipStyle,
  55. Iterable<ThemeExtension> extensions = const [],
})

Creates a FThemeData.

Set touch to true for touch-optimized sizing.

Implementation

factory FThemeData({
  required FColors colors,
  required bool touch,
  String? debugLabel,
  FBreakpoints breakpoints = const FBreakpoints(),
  FTypography? typography,
  FStyle? style,
  FAccordionStyle? accordionStyle,
  FAutocompleteStyle? autocompleteStyle,
  FVariants<FAlertVariantConstraint, FAlertVariant, FAlertStyle, FAlertStyleDelta>? alertStyles,
  FAvatarStyle? avatarStyle,
  FVariants<FBadgeVariantConstraint, FBadgeVariant, FBadgeStyle, FBadgeStyleDelta>? badgeStyles,
  FBottomNavigationBarStyle? bottomNavigationBarStyle,
  FBreadcrumbStyle? breadcrumbStyle,
  FVariants<FButtonVariantConstraint, FButtonVariant, FButtonSizeStyles, FButtonSizesDelta>? buttonStyles,
  FCalendarStyle? calendarStyle,
  FCardStyle? cardStyle,
  FCheckboxStyle? checkboxStyle,
  FVariants<
    FCircularProgressSizeVariantConstraint,
    FCircularProgressSizeVariant,
    FCircularProgressStyle,
    FCircularProgressStyleDelta
  >?
  circularProgressStyles,
  FDateFieldStyle? dateFieldStyle,
  FDeterminateProgressStyle? determinateProgressStyle,
  FDialogRouteStyle? dialogRouteStyle,
  FDialogStyle? dialogStyle,
  FVariants<FDividerAxisVariantConstraint, FDividerAxisVariant, FDividerStyle, FDividerStyleDelta>? dividerStyles,
  FVariants<FHeaderVariantConstraint, FHeaderVariant, FHeaderStyle, FHeaderStyleDelta>? headerStyles,
  FVariants<FItemVariantConstraint, FItemVariant, FItemStyle, FItemStyleDelta>? itemStyles,
  FItemGroupStyle? itemGroupStyle,
  FLabelStyles? labelStyles,
  FLineCalendarStyle? lineCalendarStyle,
  FMultiSelectStyle? multiSelectStyle,
  FModalSheetStyle? modalSheetStyle,
  FPaginationStyle? paginationStyle,
  FPersistentSheetStyle? persistentSheetStyle,
  FPickerStyle? pickerStyle,
  FPopoverStyle? popoverStyle,
  FPopoverMenuStyle? popoverMenuStyle,
  FProgressStyle? progressStyle,
  FRadioStyle? radioStyle,
  FVariants<
    FResizableAxisVariantConstraint,
    FResizableAxisVariant,
    FResizableDividerStyle,
    FResizableDividerStyleDelta
  >?
  resizableStyles,
  FScaffoldStyle? scaffoldStyle,
  FSelectStyle? selectStyle,
  FSelectGroupStyle? selectGroupStyle,
  FSelectMenuTileStyle? selectMenuTileStyle,
  FSidebarStyle? sidebarStyle,
  FVariants<FSliderAxisVariantConstraint, FSliderAxisVariant, FSliderStyle, FSliderStyleDelta>? sliderStyles,
  FToasterStyle? toasterStyle,
  FSwitchStyle? switchStyle,
  FTabsStyle? tabsStyle,
  FTappableStyle? tappableStyle,
  FVariants<FTextFieldSizeVariantConstraint, FTextFieldSizeVariant, FTextFieldStyle, FTextFieldStyleDelta>?
  textFieldStyles,
  FVariants<FItemVariantConstraint, FItemVariant, FTileStyle, FTileStyleDelta>? tileStyles,
  FTileGroupStyle? tileGroupStyle,
  FTimeFieldStyle? timeFieldStyle,
  FTimePickerStyle? timePickerStyle,
  FTooltipStyle? tooltipStyle,
  Iterable<ThemeExtension<dynamic>> extensions = const [],
}) {
  typography ??= .inherit(colors: colors, touch: touch);
  style ??= .inherit(colors: colors, typography: typography, touch: touch);
  return ._(
    debugLabel: debugLabel,
    breakpoints: breakpoints,
    colors: colors,
    typography: typography,
    style: style,
    accordionStyle: accordionStyle ?? .inherit(colors: colors, typography: typography, style: style, touch: touch),
    autocompleteStyle:
        autocompleteStyle ?? .inherit(colors: colors, typography: typography, style: style, touch: touch),
    alertStyles: alertStyles == null
        ? FAlertStyles.inherit(colors: colors, typography: typography, style: style, touch: touch)
        : FAlertStyles(alertStyles),
    avatarStyle: avatarStyle ?? .inherit(colors: colors, typography: typography),
    badgeStyles: badgeStyles == null
        ? FBadgeStyles.inherit(colors: colors, typography: typography, style: style, touch: touch)
        : FBadgeStyles(badgeStyles),
    bottomNavigationBarStyle:
        bottomNavigationBarStyle ?? .inherit(colors: colors, typography: typography, style: style),
    breadcrumbStyle: breadcrumbStyle ?? .inherit(colors: colors, typography: typography, style: style, touch: touch),
    buttonStyles: buttonStyles == null
        ? FButtonStyles.inherit(colors: colors, typography: typography, style: style, touch: touch)
        : FButtonStyles(buttonStyles),
    calendarStyle: calendarStyle ?? .inherit(colors: colors, typography: typography, style: style, touch: touch),
    cardStyle: cardStyle ?? .inherit(colors: colors, typography: typography, style: style, touch: touch),
    checkboxStyle: checkboxStyle ?? .inherit(colors: colors, style: style, touch: touch),
    circularProgressStyles: circularProgressStyles == null
        ? FCircularProgressSizeStyles.inherit(colors: colors, typography: typography)
        : FCircularProgressSizeStyles(circularProgressStyles),
    dateFieldStyle: dateFieldStyle ?? .inherit(colors: colors, typography: typography, style: style, touch: touch),
    determinateProgressStyle: determinateProgressStyle ?? .inherit(colors: colors, style: style),
    dialogRouteStyle: dialogRouteStyle ?? .inherit(colors: colors),
    dialogStyle: dialogStyle ?? .inherit(colors: colors, typography: typography, style: style),
    dividerStyles: dividerStyles == null
        ? FDividerStyles.inherit(colors: colors, style: style)
        : FDividerStyles(dividerStyles),
    headerStyles: headerStyles == null
        ? FHeaderStyles.inherit(colors: colors, typography: typography, style: style)
        : FHeaderStyles(headerStyles),
    itemStyles: itemStyles == null
        ? FItemStyles.inherit(colors: colors, typography: typography, style: style, touch: touch)
        : FItemStyles(itemStyles),
    itemGroupStyle: itemGroupStyle ?? .inherit(colors: colors, typography: typography, style: style, touch: touch),
    labelStyles: labelStyles ?? .inherit(style: style),
    lineCalendarStyle: lineCalendarStyle ?? .inherit(colors: colors, typography: typography, style: style),
    multiSelectStyle:
        multiSelectStyle ?? .inherit(colors: colors, typography: typography, style: style, touch: touch),
    modalSheetStyle: modalSheetStyle ?? .inherit(colors: colors),
    paginationStyle: paginationStyle ?? .inherit(colors: colors, typography: typography, style: style, touch: touch),
    persistentSheetStyle: persistentSheetStyle ?? const FPersistentSheetStyle(),
    pickerStyle: pickerStyle ?? .inherit(colors: colors, style: style, typography: typography),
    popoverStyle: popoverStyle ?? .inherit(colors: colors, style: style),
    popoverMenuStyle:
        popoverMenuStyle ?? .inherit(colors: colors, style: style, typography: typography, touch: touch),
    progressStyle: progressStyle ?? .inherit(colors: colors, style: style),
    radioStyle: radioStyle ?? .inherit(colors: colors, style: style, touch: touch),
    resizableStyles: resizableStyles == null
        ? FResizableStyles.inherit(colors: colors, style: style)
        : FResizableStyles(resizableStyles),
    scaffoldStyle: scaffoldStyle ?? .inherit(colors: colors, style: style),
    selectStyle: selectStyle ?? .inherit(colors: colors, typography: typography, style: style, touch: touch),
    selectGroupStyle:
        selectGroupStyle ?? .inherit(colors: colors, typography: typography, style: style, touch: touch),
    selectMenuTileStyle:
        selectMenuTileStyle ?? .inherit(colors: colors, typography: typography, style: style, touch: touch),
    sidebarStyle: sidebarStyle ?? .inherit(colors: colors, typography: typography, style: style, touch: touch),
    sliderStyles: sliderStyles == null
        ? FSliderStyles.inherit(colors: colors, typography: typography, style: style)
        : FSliderStyles(sliderStyles),
    toasterStyle: toasterStyle ?? .inherit(colors: colors, typography: typography, style: style, touch: touch),
    switchStyle: switchStyle ?? .inherit(colors: colors, style: style),
    tabsStyle: tabsStyle ?? .inherit(colors: colors, typography: typography, style: style),
    tappableStyle: tappableStyle ?? FTappableStyle(),
    textFieldStyles: textFieldStyles == null
        ? FTextFieldSizeStyles.inherit(colors: colors, typography: typography, style: style, touch: touch)
        : FTextFieldSizeStyles(textFieldStyles),
    tileStyles: tileStyles == null
        ? FTileStyles.inherit(colors: colors, typography: typography, style: style)
        : FTileStyles(tileStyles),
    tileGroupStyle: tileGroupStyle ?? .inherit(colors: colors, typography: typography, style: style),
    timeFieldStyle: timeFieldStyle ?? .inherit(colors: colors, typography: typography, style: style, touch: touch),
    timePickerStyle: timePickerStyle ?? .inherit(colors: colors, typography: typography, style: style),
    tooltipStyle: tooltipStyle ?? .inherit(colors: colors, typography: typography, style: style),
    extensions: .unmodifiable({for (final extension in extensions) extension.type: extension}),
  );
}