fromJson method

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

Implementation

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

  return ButtonBarThemeData(
    alignment: const NullableMainAxisAlignmentConverter().fromJson(
      json['alignment'],
    ),
    buttonAlignedDropdown: json['buttonAlignedDropdown'] == null
        ? null
        : (json['buttonAlignedDropdown'] as bool),
    buttonHeight: (json['buttonHeight'] as num?)?.toDouble(),
    buttonMinWidth: (json['buttonMinWidth'] as num?)?.toDouble(),
    buttonPadding: const NullableEdgeInsetsGeometryConverter().fromJson(
      json['buttonPadding'],
    ),
    buttonTextTheme: const NullableButtonTextThemeConverter().fromJson(
      json['buttonTextTheme'],
    ),
    layoutBehavior: const NullableButtonBarLayoutBehaviorConverter().fromJson(
      json['layoutBehavior'],
    ),
    mainAxisSize: const NullableMainAxisSizeConverter().fromJson(
      json['mainAxisSize'],
    ),
    overflowDirection: const NullableVerticalDirectionConverter().fromJson(
      json['overflowDirection'],
    ),
  );
}