encodeTabBarTheme static method

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

Encodes the given value to the JSON representation.

{
  "indicatorSize": <TabBarIndicatorSize>,
  "labelPadding": <EdgeInsetsGeometry>,
  "labelColor": <Color>,
  "labelStyle": <TextStyle>,
  "unselectedLabelColor": <Color>,
  "unselectedLabelStyle": <TextStyle>,
}

See also:

Implementation

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

  if (value != null) {
    result = <String, dynamic>{
      'indicatorSize': encodeTabBarIndicatorSize(value.indicatorSize),
      'labelPadding':
          encodeEdgeInsetsGeometry(value.labelPadding as EdgeInsets?),
      'labelColor': encodeColor(value.labelColor),
      'labelStyle': encodeTextStyle(value.labelStyle),
      'unselectedLabelColor': encodeColor(value.unselectedLabelColor),
      'unselectedLabelStyle': encodeTextStyle(value.unselectedLabelStyle),
    };
  }

  return _stripNull(result);
}