encodeTabBarTheme static method

Map<String, dynamic>? encodeTabBarTheme(
  1. TabBarTheme? value
)

Encodes the given value to the JSON representation.

{
  "dividerColor": "<Color>",
  "dividerHeight": "<double>",
  "indicatorColor": "<Color>",
  "indicatorSize": "<TabBarIndicatorSize>",
  "labelPadding": "<EdgeInsetsGeometry>",
  "labelColor": "<Color>",
  "labelStyle": "<TextStyle>",
  "mouseCursor": "<MaterialStateProperty<MouseCursor>>",
  "overlayColor": "<MaterialStateProperty<Color>>",
  "splashFactory": "<InteractiveInkSplashFactory>",
  "tabAlignment": "<TabAlignment>"
  "unselectedLabelColor": "<Color>",
  "unselectedLabelStyle": "<TextStyle>",
}

See also:

Implementation

static Map<String, dynamic>? encodeTabBarTheme(TabBarTheme? value) {
  Map<String, dynamic>? result;

  if (value != null) {
    result = <String, dynamic>{
      'dividerColor': encodeColor(value.dividerColor),
      'dividerHeight': value.dividerHeight,
      'indicatorColor': encodeColor(value.dividerColor),
      'indicatorSize': encodeTabBarIndicatorSize(value.indicatorSize),
      'labelPadding':
          encodeEdgeInsetsGeometry(value.labelPadding as EdgeInsets?),
      'labelColor': encodeColor(value.labelColor),
      'labelStyle': encodeTextStyle(value.labelStyle),
      'mouseCursor': encodeWidgetStatePropertyMouseCursor(
        value.mouseCursor,
      ),
      'overlayColor': encodeWidgetStatePropertyColor(
        value.overlayColor,
      ),
      'splashFactory': encodeInteractiveInkFeatureFactory(
        value.splashFactory,
      ),
      'tabAlignment': encodeTabAlignment(value.tabAlignment),
      'unselectedLabelColor': encodeColor(value.unselectedLabelColor),
      'unselectedLabelStyle': encodeTextStyle(value.unselectedLabelStyle),
    };
  }

  return _stripDynamicNull(result);
}