AFFunctionalTheme class
Functional themes are interfaces that provide UI theming for conceptual components that are shared across many pages in the app.
For example, a functional theme might answer the question, what does a recurring 'section header' look like across the app.
An app will have at least one functional theme, but it might split functional themes up into multiple areas (e.g. settings, signin, main app, etc).
Functional themes also provide a way for complex third party components (for example, an entire set of third party signin pages, a map or audio/video component) to delegate theming decisions to the app that contains them. Apps can override the functional themes provided by third parties.
Functional themes should never contain data. Data should be stored in the AFFundamentalThemeState, which is referenced by each functional theme.
Each AFConnectedWidget is parmeterized with a functional theme type, and that theme will be accessible via the context.theme and context.t methods.
- Mixed-in types
- Implementers
- Annotations
Constructors
- 
          AFFunctionalTheme(AFThemeID id, AFFundamentalThemeState fundamentals, AFBuildContext<AFFlexibleStateView, AFRouteParam> context)
Properties
- borderRadius → AFBorderRadius
- 
  
  no setter
- colorAlert → Color
- 
  
  no setter
- colorBackground → Color
- 
  
  no setter
- colorBlack → Color
- 
  
  no setter
- colorError → Color
- 
  
  no setter
- colorOnAlert → Color
- 
  
  no setter
- colorOnBackground → Color
- 
  
  no setter
- colorOnError → Color
- 
  
  no setter
- colorOnPrimary → Color
- 
  The foreground color on a primary background from ThemeData
  no setter
- colorOnSecondary → Color
- 
  
  no setter
- colorOnSurface → Color
- 
  
  no setter
- colorPrimary → Color
- 
  
  no setter
- colorPrimaryDarker → Color
- 
  
  no setter
- colorPrimaryDisabled → Color
- 
  
  no setter
- colorPrimaryLighter → Color
- 
  
  no setter
- colorSchemeBrightness → Brightness
- 
  
  no setter
- colorSecondary → Color
- 
  
  no setter
- colorSurface → Color
- 
  
  no setter
- colorTapableText → Color?
- 
  
  no setter
- colorWhite → Color
- 
  
  no setter
- contentPadding → AFSpacing
- 
  
  no setter
- 
  context
  → AFBuildContext<AFFlexibleStateView, AFRouteParam> 
- 
  
  final
- deviceAlwaysUse24HourFormat → bool
- 
  
  no setter
- deviceBrightness → Brightness
- 
  The light/dark mode setting of the device.
  no setter
- deviceFormFactor → AFFormFactor
- 
  An appoximate form factor for the device.
  no setter
- deviceIsDarkMode → bool
- 
  
  no setter
- deviceIsLandscape → bool
- 
  
  no setter
- deviceIsLandscapeTablet → bool
- 
  
  no setterinherited
- deviceIsLightMode → bool
- 
  
  no setter
- deviceIsPhone → bool
- 
  
  no setterinherited
- deviceIsPortrait → bool
- 
  
  no setter
- deviceIsTablet → bool
- 
  
  no setterinherited
- deviceLocale → Locale
- 
  The locale for the device.
  no setter
- deviceLogicalSize → Size
- 
  
  no setter
- deviceOrientation → Orientation
- 
  The orientation of the device.
  no setter
- devicePadding → WindowPadding
- 
  See Flutter Window
  no setter
- devicePhysicalSize → Size
- 
  The physical size of the screen.
  no setter
- deviceTextScaleFactor → double
- 
  The text scale factor for the device.
  no setter
- deviceViewInsets → WindowPadding
- 
  See Flutter Window
  no setter
- deviceViewPadding → WindowPadding
- 
  See Flutter Window
  no setter
- fundamentals → AFFundamentalThemeState
- 
  
  final
- hashCode → int
- 
  The hash code for this object.
  no setterinherited
- id → AFThemeID
- 
  
  final
- margin → AFSpacing
- 
  
  no setter
- padding → AFSpacing
- 
  
  no setter
- runtimeType → Type
- 
  A representation of the runtime type of the object.
  no setterinherited
- size1 → double
- 
  
  no setter
- size2 → double
- 
  
  no setter
- size3 → double
- 
  
  no setter
- size4 → double
- 
  
  no setter
- size5 → double
- 
  
  no setter
- styleOnCard → TextTheme
- 
  See TextTheme, text theme to use on a card background
  no setter
- styleOnPrimary → TextTheme
- 
  See TextTheme, text theme to use on a primary color background
  no setter
- styleOnSecondary → TextTheme
- 
  Flutter by default does not have a styleOnSecondary, I am not sure why.
  no setter
- themeData → ThemeData?
- 
  
  no setter
Methods
- 
  accessOnEventContext() → AFOnEventContext 
- Intended to be used in subclasses to access AFOnEventContext in event handlers for returned widgets.
- 
  accessTheme<TFunctionalTheme extends AFFunctionalTheme> (AFThemeID themeId) → TFunctionalTheme 
- 
  background(dynamic idOrColor) → Color 
- 
  borderRadiusScaled({double? all, double? left, double? right, double? top, double? bottom, double? leftTop, double? leftBottom, double? rightTop, double? rightBottom, Radius createRadius(double)?}) → BorderRadius 
- 
  childButton({AFWidgetID? wid, required Widget child, required AFPressedDelegate? onPressed, Color? color, Color? textColor}) → Widget 
- 
  childButtonFlat({AFWidgetID? wid, required Widget child, required AFPressedDelegate onPressed}) → Widget 
- Create a button that the user is most likely to click.
- 
  childButtonFlatText({AFWidgetID? wid, Object? text, required AFPressedDelegate onPressed}) → Widget 
- @see translate for all the ways text can be specified.
- 
  childButtonIcon({AFWidgetID? wid, required Widget child, required AFPressedDelegate onPressed, Color? color, VisualDensity? visualDensity}) → Widget 
- 
  childButtonPrimary({AFWidgetID? wid, required Widget child, required AFPressedDelegate? onPressed}) → Widget 
- Create a button that the user is most likely to click.
- 
  childButtonPrimaryText({AFWidgetID? wid, Object? text, required AFPressedDelegate onPressed}) → Widget 
- Create a button that the user is most likely to click.
- 
  childButtonSecondary({AFWidgetID? wid, required Widget child, required AFPressedDelegate onPressed}) → Widget 
- Create a button that the user is most likely to click.
- 
  childButtonSecondaryText({AFWidgetID? wid, Object? text, required AFPressedDelegate onPressed}) → Widget 
- Create a button that the user is most likely to click.
- 
  childButtonStandardBack(AFStateProgrammingInterface< AFComponentState, AFBuildContext< spi, {required AFScreenID screen, AFWidgetID wid = AFUIWidgetID.buttonBack, dynamic iconIdOrWidget = AFUIThemeID.iconBack, dynamic iconColor, dynamic iconSize, String tooltip = "Back", bool worksInSingleScreenTest = true, AFShouldContinueCheckDelegate? shouldContinueCheck}) → WidgetAFFlexibleStateView, AFRouteParam> , AFFunctionalTheme>
- Creates a standard back button, which navigates up the screen hierarchy.
- 
  childCard({required Widget child, AFWidgetID? wid, EdgeInsets? margin, Color? color}) → Widget 
- 
  childCardColumn(List< Widget> rows, {EdgeInsets? padding, CrossAxisAlignment? align, AFWidgetID? widColumn, AFWidgetID? widCard, Color? color}) → Widget
- 
  childChoiceChip({AFWidgetID? wid, required Widget label, required bool selected, Color? selectedColor, required AFOnChangedBoolDelegate onSelected}) → Widget 
- 
  childColumn(List< Widget> children, {AFWidgetID? wid, MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start, CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.start, MainAxisSize mainAxisSize = MainAxisSize.max}) → Column
- 
  childDebugDrawerBegin(Widget? beginDrawer) → Widget? 
- As long as you are calling AFFunctionalTheme.childScaffold, you don't need to worry about this, it will be done for you.
- 
  childDebugDrawerEnd(Widget? endDrawer) → Widget? 
- As long as you are calling AFFunctionalTheme.childScaffold, you don't need to worry about this, it will be done for you.
- 
  childDivider({Color? color}) → Widget 
- 
  childEmbeddedRender({required AFRenderEmbeddedChildDelegate render}) → Widget 
- 
  childExtraScrollSpacer({double height = 100}) → Widget 
- 
  childMargin({AFWidgetID? wid, required Widget child, required EdgeInsets? margin}) → Widget 
- 
  childMarginStandard({AFWidgetID? wid, required Widget child}) → Widget 
- 
  childPadding({AFWidgetID? wid, required Widget child, EdgeInsets? padding}) → Widget 
- 
  children() → List< Widget> 
- A utility for creating a list of child widgets
- 
  childrenColumn() → List< Widget> 
- Identical to column, except prefixed with children to enhance discoverability
- 
  childrenDivideWidgets(List< Widget> rows, AFWidgetID? widBase, {dynamic colorLine, dynamic thickness, dynamic height, dynamic indent}) → List<Widget> 
- 
  Replaces ListTile.divideTiles, including a key based on widBasefor each one.
- 
  childrenExpansionList() → List< ExpansionPanel> 
- A utility for creating a list of expansion panels in an expansion list.
- 
  childrenRow() → List< Widget> 
- Identical to row, except prefixed with children to enhance discoverability
- 
  childrenTable() → List< TableRow> 
- A utility for create a list of table rows in a table.
- 
  childRichTextBuilder({AFWidgetID? wid, dynamic styleNormal, dynamic styleBold, dynamic styleTapable, dynamic styleMuted}) → AFRichTextBuilder 
- 
  childRichTextBuilderOnCard({AFWidgetID? wid}) → AFRichTextBuilder 
- 
  childRow(List< Widget> children, {MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start}) → Row
- 
  childScaffold<TBuildContext extends AFBuildContext< (AFFlexibleStateView, AFRouteParam> >{Key? key, required AFStateProgrammingInterface< AFComponentState, AFBuildContext< spi, AFConnectedUIBase<AFFlexibleStateView, AFRouteParam> , AFFunctionalTheme>AFComponentState, AFFunctionalTheme, AFFlexibleStateView, AFRouteParam, AFStateProgrammingInterface< ? contextSource, PreferredSizeWidget? appBar, Widget? drawer, required Widget body, Widget? floatingActionButton, Color? backgroundColor, FloatingActionButtonLocation? floatingActionButtonLocation, FloatingActionButtonAnimator? floatingActionButtonAnimator, Widget? endDrawer, Widget? bottomSheet, bool? resizeToAvoidBottomPadding, bool? resizeToAvoidBottomInset, bool primary = true, DragStartBehavior drawerDragStartBehavior = DragStartBehavior.start, bool extendBody = false, bool extendBodyBehindAppBar = false, Color? drawerScrimColor, double? drawerEdgeDragWidth, bool drawerEnableOpenDragGesture = true, bool endDrawerEnableOpenDragGesture = true}) → WidgetAFComponentState, AFBuildContext< >AFFlexibleStateView, AFRouteParam> , AFFunctionalTheme>
- A method used to create a standard scaffold, please use this instead of creating you scaffold manually with return Scaffold(...
- 
  childSwitch({AFWidgetID? wid, required bool value, required AFOnChangedBoolDelegate onChanged}) → Widget 
- 
  childText({Object? text, AFWidgetID? wid, dynamic style, dynamic textColor, dynamic fontSize, dynamic fontWeight, TextAlign? textAlign, TextOverflow? overflow, int? maxLines, bool? softWrap}) → Text 
- @see translate for all the ways text can be specified.
- 
  childTextBuilder({AFWidgetID? wid, dynamic style}) → AFTextBuilder 
- 
  childTextEmpty() → Widget 
- 
  childTextField({required AFScreenID screenId, required AFWidgetID wid, AFTextEditingControllers? controllers, AFTextEditingController? controller, AFBuildContext< AFFlexibleStateView, AFRouteParam> ? context, AFRouteParamWithFlutterState? parentParam, required AFOnChangedStringDelegate onChanged, String? expectedText, bool? enabled, bool obscureText = false, bool autofocus = false, int? minLines, int maxLines = 1, FocusNode? focusNode, InputDecoration? decoration, bool autocorrect = true, TextAlign textAlign = TextAlign.start, TextInputType? keyboardType, TextStyle? style, Color? cursorColor, ValueChanged<String> ? onSubmitted}) → Widget
- Create a text field with the specified text.
- 
  childTopBottomHostedControls(BuildContext context, Widget main, {Widget? bottomControls, Widget? topControls, double topHeight = 0.0}) → Widget 
- 
  Create a widget that has the bottomControlsandtopControlspermenantly affixed above/below themainwidget.
- 
  childTopTab({AFWidgetID? wid, required Widget child, required bool isSel, required AFPressedDelegate onPressed}) → Widget 
- 
  childTopTabContainer({required List< Widget> children, Color? color, BorderRadius? borderRadius}) → Widget
- 
  childTopTabText({AFWidgetID? wid, required String text, required bool isSel, required AFPressedDelegate onPressed}) → Widget 
- 
  color(dynamic idOrColor) → Color? 
- 
  colorDarker(dynamic color, {int percent = 10}) → Color 
- 
  colorForeground(dynamic idOrColor) → Color 
- 
  colorGreyShade(int shade) → Color 
- 
  colorLighter(dynamic c, {int percent = 10}) → Color 
- 
  column() → List< Widget> 
- A utility for creating a list of widgets in a column.
- 
  columnTable() → List< TableRow> 
- A utility for create a list of table rows in a table.
- 
  deviceHasFormFactor({AFFormFactor? atLeast, AFFormFactor? atMost, Orientation? withOrientation}) → bool 
- 
  
  override
- 
  errorStyle() → TextStyle 
- 
  hintStyle() → TextStyle 
- 
  icon(dynamic id, {dynamic iconColor, dynamic iconSize}) → Widget? 
- 
  iconBack({dynamic iconColor, dynamic iconSize}) → Widget? 
- 
  iconStandard(AFUIStandardChoiceDialogIcon icon, {double? size}) → Widget? 
- 
  keyForWID(AFID? wid) → LocalKey? 
- Returns a unique key for the specified widget.
- 
  keyForWIDNotNull(AFID wid) → LocalKey 
- Returns a unique key for the specified widget.
- 
  leadingButtonStandardBack(AFStateProgrammingInterface< AFComponentState, AFBuildContext< spi, {required AFScreenID screen, AFWidgetID wid = AFUIWidgetID.buttonBack, dynamic iconIdOrWidget = AFUIThemeID.iconBack, dynamic iconColor, dynamic iconSize, String tooltip = "Back", bool worksInSingleScreenTest = true, AFShouldContinueCheckDelegate? shouldContinueCheck}) → WidgetAFFlexibleStateView, AFRouteParam> , AFFunctionalTheme>
- 
  marginCustom({int? all, int? horizontal, int? vertical, int? top, int? bottom, int? left, int? right}) → EdgeInsets 
- Create a custom margin based on the standard sizes you setup in your fundamental theme.
- 
  noSuchMethod(Invocation invocation) → dynamic 
- 
  Invoked when a nonexistent method or property is accessed.
  inherited
- 
  notTranslated(Object value) → AFNotTranslated 
- 
  paddingCustom({int? horizontal, int? vertical, int? top, int? bottom, int? left, int? right, int? all}) → EdgeInsets 
- Important: the values you are passing in are scale factors on the value specified by your fundamental theme they are not absolute measurements.
- 
  radiusCircular(double r) → Radius 
- 
  row() → List< Widget> 
- A utility for creating a list of widgets in a row.
- 
  showBottomSheet({required AFStateProgrammingInterface< AFComponentState, AFBuildContext< spi, Color? backgroundColor, double? elevation, ShapeBorder? shape, Clip? clipBehavior}) → voidAFFlexibleStateView, AFRouteParam> , AFFunctionalTheme>
- 
  See AFBuildContext.showBottomSheet, this is a one line call to that method, here for discoverability.
- 
  showDialog<TReturn> ({required AFStateProgrammingInterface< AFComponentState, AFBuildContext< spi, void onReturn(TReturn?)?, bool barrierDismissible = true, Color? barrierColor, bool useSafeArea = true, RouteSettings? routeSettings}) → voidAFFlexibleStateView, AFRouteParam> , AFFunctionalTheme>
- 
  See AFBuildContext.showDialogAFib, this is just a one line call to that method for discoverability.
- 
  showModalBottomSheet({required AFStateProgrammingInterface< AFComponentState, AFBuildContext< spi, AFReturnValueDelegate<AFFlexibleStateView, AFRouteParam> , AFFunctionalTheme>Object?> ? onReturn, Color? backgroundColor, double? elevation, ShapeBorder? shape, Clip? clipBehavior, Color? barrierColor, bool isScrollControlled = false, bool isDismissible = true, bool enableDrag = true, RouteSettings? routeSettings}) → void
- 
  See AFBuildContext.showModalBottomSheetAFib, this is a one line call to that method, here for discoverability.
- 
  showSnackbarText(AFStateProgrammingInterface< AFComponentState, AFBuildContext< spi, String text) → voidAFFlexibleStateView, AFRouteParam> , AFFunctionalTheme>
- Show the text in a snackbar.
- 
  size(dynamic id, {double scale = 1.0}) → double? 
- 
  standardShouldContinueAlertCheck({required AFStateProgrammingInterface< AFComponentState, AFBuildContext< spi, required bool shouldAsk, }) → AFShouldContinueCheckDelegateAFFlexibleStateView, AFRouteParam> , AFFunctionalTheme>
- 
  styleBold() → TextStyle 
- Merges bold into whatever the style would have been.
- 
  styleError() → TextStyle 
- 
  styleHint() → TextStyle 
- 
  styleText(dynamic idOrTextStyle) → TextStyle? 
- 
  styleTextButton({Color? color, Color? textColor}) → ButtonStyle 
- 
  styleTextButtonPrimary() → ButtonStyle 
- 
  tapRecognizerFor({required AFWidgetID wid, AFTapGestureRecognizersHolder? recognizers, AFRouteParamWithFlutterState? parentParam, required AFPressedDelegate onTap}) → TapGestureRecognizer 
- 
  textHourMinuteLabel(int hour, int minute, {bool? alwaysUse24Hours}) → String 
- Returns a string label fpor hours and minutes that respects the device's always24Hours settings
- 
  toString() → String 
- 
  A string representation of this object.
  inherited
- 
  translate({AFWidgetID? wid, Object? text}) → String 
- Translate the specified string id and return it.
- 
  translateNever(Object value) → AFNotTranslated 
- Here for discoverability, you might prefer notTranslated.
- 
  translateTemplate({required Object template, required Map< Object, Object> insertions}) → AFTranslationTemplate
- 
  weight(dynamic weight) → FontWeight? 
Operators
- 
  operator ==(Object other) → bool 
- 
  The equality operator.
  inherited
Static Methods
- 
  keyForWIDStatic(AFID? wid) → LocalKey?