encodeListTileThemeData static method

Map<String, dynamic>? encodeListTileThemeData(
  1. ListTileThemeData? value
)

Encodes the given value to a JSON representation.

{
  "contentPadding": <EdgeInsetsGeometry>,
  "dense": <bool>,
  "enableFeedback": <bool>,
  "horizontalTitleGap": <double>,
  "iconColor": <Color>,
  "minLeadingWidth": <double>,
  "minVerticalPadding": <double>,
  "selectedColor": <Color>,
  "selectedTileColor": <Color>,
  "shape": <ShapeBorder>,
  "style": <ListTileStyle>,
  "textColor": <Color>,
  "tileColor": <Color>
}

Implementation

static Map<String, dynamic>? encodeListTileThemeData(
    ListTileThemeData? value) {
  Map<String, dynamic>? result;

  if (value != null) {
    result = {
      'contentPadding': encodeEdgeInsetsGeometry(
        value.contentPadding as EdgeInsets?,
      ),
      'dense': value.dense,
      'enableFeedback': value.enableFeedback,
      'horizontalTitleGap': value.horizontalTitleGap,
      'iconColor': encodeColor(value.iconColor),
      'minLeadingWidth': value.minLeadingWidth,
      'minVerticalPadding': value.minVerticalPadding,
      'selectedColor': encodeColor(value.selectedColor),
      'selectedTileColor': encodeColor(value.selectedTileColor),
      'shape': encodeShapeBorder(value.shape),
      'style': encodeListTileStyle(value.style),
      'textColor': encodeColor(value.textColor),
      'tileColor': encodeColor(value.tileColor),
    };
  }

  return _stripNull(result);
}