fromJson method

  1. @override
DataTableThemeData? fromJson(
  1. Map<String, dynamic>? json
)
override

Implementation

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

  return DataTableThemeData(
    columnSpacing: (json['columnSpacing'] as num?)?.toDouble(),
    dataRowColor:
        const NullableMaterialStatePropertyColorConverter().fromJson(
      json['dataRowColor'],
    ),
    dataRowHeight: (json['dataRowHeight'] as num?)?.toDouble(),
    dataTextStyle: const NullableTextStyleConverter().fromJson(
      json['dataTextStyle'],
    ),
    dividerThickness: (json['dividerThickness'] as num?)?.toDouble(),
    headingRowColor:
        const NullableMaterialStatePropertyColorConverter().fromJson(
      json['headingRowColor'],
    ),
    headingRowHeight: (json['headingRowHeight'] as num?)?.toDouble(),
    headingTextStyle: const NullableTextStyleConverter().fromJson(
      json['headingTextStyle'],
    ),
    horizontalMargin: (json['horizontalMargin'] as num?)?.toDouble(),
  );
}