toJson method

  1. @override
Map<String, dynamic>? toJson(
  1. DataTableThemeData? object
)
override

Implementation

@override
Map<String, dynamic>? toJson(DataTableThemeData? object) {
  if (object == null) return null;

  return <String, dynamic>{
    'columnSpacing': object.columnSpacing,
    'dataRowColor':
        const NullableMaterialStatePropertyColorConverter().toJson(
      object.dataRowColor,
    ),
    'dataRowHeight': object.dataRowHeight,
    'dataTextStyle': const NullableTextStyleConverter().toJson(
      object.dataTextStyle,
    ),
    'dividerThickness': object.dividerThickness,
    'headingRowColor':
        const NullableMaterialStatePropertyColorConverter().toJson(
      object.headingRowColor,
    ),
    'headingRowHeight': object.headingRowHeight,
    'headingTextStyle': const NullableTextStyleConverter().toJson(
      object.headingTextStyle,
    ),
    'horizontalMargin': object.horizontalMargin,
  };
}