diff --git a/packages/mirai/lib/src/parsers/mirai_alert_dialog/mirai_alert_dialog.g.dart b/packages/mirai/lib/src/parsers/mirai_alert_dialog/mirai_alert_dialog.g.dart index f71dbf46..6b8f18e8 100644 --- a/packages/mirai/lib/src/parsers/mirai_alert_dialog/mirai_alert_dialog.g.dart +++ b/packages/mirai/lib/src/parsers/mirai_alert_dialog/mirai_alert_dialog.g.dart @@ -12,22 +12,19 @@ _$MiraiAlertDialogImpl _$$MiraiAlertDialogImplFromJson( icon: json['icon'] as Map?, iconPadding: json['iconPadding'] == null ? null - : MiraiEdgeInsets.fromJson( - json['iconPadding'] as Map), + : MiraiEdgeInsets.fromJson(json['iconPadding']), iconColor: json['iconColor'] as String?, title: json['title'] as Map?, titlePadding: json['titlePadding'] == null ? null - : MiraiEdgeInsets.fromJson( - json['titlePadding'] as Map), + : MiraiEdgeInsets.fromJson(json['titlePadding']), titleTextStyle: json['titleTextStyle'] == null ? null : MiraiTextStyle.fromJson(json['titleTextStyle']), content: json['content'] as Map?, contentPadding: json['contentPadding'] == null ? null - : MiraiEdgeInsets.fromJson( - json['contentPadding'] as Map), + : MiraiEdgeInsets.fromJson(json['contentPadding']), contentTextStyle: json['contentTextStyle'] == null ? null : MiraiTextStyle.fromJson(json['contentTextStyle']), @@ -36,8 +33,7 @@ _$MiraiAlertDialogImpl _$$MiraiAlertDialogImplFromJson( .toList(), actionsPadding: json['actionsPadding'] == null ? null - : MiraiEdgeInsets.fromJson( - json['actionsPadding'] as Map), + : MiraiEdgeInsets.fromJson(json['actionsPadding']), actionsAlignment: $enumDecodeNullable( _$MainAxisAlignmentEnumMap, json['actionsAlignment']), actionsOverflowAlignment: $enumDecodeNullable( @@ -48,15 +44,13 @@ _$MiraiAlertDialogImpl _$$MiraiAlertDialogImplFromJson( (json['actionsOverflowButtonSpacing'] as num?)?.toDouble(), buttonPadding: json['buttonPadding'] == null ? null - : MiraiEdgeInsets.fromJson( - json['buttonPadding'] as Map), + : MiraiEdgeInsets.fromJson(json['buttonPadding']), backgroundColor: json['backgroundColor'] as String?, elevation: (json['elevation'] as num?)?.toDouble(), semanticLabel: json['semanticLabel'] as String?, insetPadding: json['insetPadding'] == null ? const MiraiEdgeInsets(left: 40, right: 40, top: 24, bottom: 24) - : MiraiEdgeInsets.fromJson( - json['insetPadding'] as Map), + : MiraiEdgeInsets.fromJson(json['insetPadding']), clipBehavior: $enumDecodeNullable(_$ClipEnumMap, json['clipBehavior']) ?? Clip.none, scrollable: json['scrollable'] as bool? ?? false, diff --git a/packages/mirai/lib/src/parsers/mirai_bottom_app_bar_theme/mirai_bottom_app_bar_theme.g.dart b/packages/mirai/lib/src/parsers/mirai_bottom_app_bar_theme/mirai_bottom_app_bar_theme.g.dart index 3adaaa22..104b7846 100644 --- a/packages/mirai/lib/src/parsers/mirai_bottom_app_bar_theme/mirai_bottom_app_bar_theme.g.dart +++ b/packages/mirai/lib/src/parsers/mirai_bottom_app_bar_theme/mirai_bottom_app_bar_theme.g.dart @@ -16,7 +16,7 @@ _$MiraiBottomAppBarThemeImpl _$$MiraiBottomAppBarThemeImplFromJson( shadowColor: json['shadowColor'] as String?, padding: json['padding'] == null ? null - : MiraiEdgeInsets.fromJson(json['padding'] as Map), + : MiraiEdgeInsets.fromJson(json['padding']), ); Map _$$MiraiBottomAppBarThemeImplToJson( diff --git a/packages/mirai/lib/src/parsers/mirai_button_style/mirai_button_style.g.dart b/packages/mirai/lib/src/parsers/mirai_button_style/mirai_button_style.g.dart index ec7c50fe..abb26d58 100644 --- a/packages/mirai/lib/src/parsers/mirai_button_style/mirai_button_style.g.dart +++ b/packages/mirai/lib/src/parsers/mirai_button_style/mirai_button_style.g.dart @@ -23,7 +23,7 @@ _$MiraiButtonStyleImpl _$$MiraiButtonStyleImplFromJson( : MiraiTextStyle.fromJson(json['textStyle']), padding: json['padding'] == null ? null - : MiraiEdgeInsets.fromJson(json['padding'] as Map), + : MiraiEdgeInsets.fromJson(json['padding']), minimumSize: json['minimumSize'] == null ? null : MiraiSize.fromJson(json['minimumSize'] as Map), diff --git a/packages/mirai/lib/src/parsers/mirai_card/mirai_card.g.dart b/packages/mirai/lib/src/parsers/mirai_card/mirai_card.g.dart index 8cb1cc2d..fcba443e 100644 --- a/packages/mirai/lib/src/parsers/mirai_card/mirai_card.g.dart +++ b/packages/mirai/lib/src/parsers/mirai_card/mirai_card.g.dart @@ -15,7 +15,7 @@ _$MiraiCardImpl _$$MiraiCardImplFromJson(Map json) => borderOnForeground: json['borderOnForeground'] as bool? ?? true, margin: json['margin'] == null ? null - : MiraiEdgeInsets.fromJson(json['margin'] as Map), + : MiraiEdgeInsets.fromJson(json['margin']), clipBehavior: $enumDecodeNullable(_$ClipEnumMap, json['clipBehavior']), child: json['child'] as Map?, semanticContainer: json['semanticContainer'] as bool? ?? true, diff --git a/packages/mirai/lib/src/parsers/mirai_card_theme_data/mirai_card_theme_data.g.dart b/packages/mirai/lib/src/parsers/mirai_card_theme_data/mirai_card_theme_data.g.dart index a23a5e9f..a8f077e7 100644 --- a/packages/mirai/lib/src/parsers/mirai_card_theme_data/mirai_card_theme_data.g.dart +++ b/packages/mirai/lib/src/parsers/mirai_card_theme_data/mirai_card_theme_data.g.dart @@ -16,7 +16,7 @@ _$MiraiCardThemeDataImpl _$$MiraiCardThemeDataImplFromJson( elevation: (json['elevation'] as num?)?.toDouble(), margin: json['margin'] == null ? null - : MiraiEdgeInsets.fromJson(json['margin'] as Map), + : MiraiEdgeInsets.fromJson(json['margin']), shape: json['shape'] == null ? null : MiraiBorder.fromJson(json['shape'] as Map), diff --git a/packages/mirai/lib/src/parsers/mirai_chip/mirai_chip.g.dart b/packages/mirai/lib/src/parsers/mirai_chip/mirai_chip.g.dart index 20a8c622..8674dd01 100644 --- a/packages/mirai/lib/src/parsers/mirai_chip/mirai_chip.g.dart +++ b/packages/mirai/lib/src/parsers/mirai_chip/mirai_chip.g.dart @@ -15,8 +15,7 @@ _$MiraiChipImpl _$$MiraiChipImplFromJson(Map json) => : MiraiTextStyle.fromJson(json['labelStyle']), labelPadding: json['labelPadding'] == null ? null - : MiraiEdgeInsets.fromJson( - json['labelPadding'] as Map), + : MiraiEdgeInsets.fromJson(json['labelPadding']), deleteIcon: json['deleteIcon'] as Map?, deleteIconColor: json['deleteIconColor'] as String?, deleteButtonTooltipMessage: json['deleteButtonTooltipMessage'] as String?, @@ -32,7 +31,7 @@ _$MiraiChipImpl _$$MiraiChipImplFromJson(Map json) => backgroundColor: json['backgroundColor'] as String?, padding: json['padding'] == null ? null - : MiraiEdgeInsets.fromJson(json['padding'] as Map), + : MiraiEdgeInsets.fromJson(json['padding']), elevation: (json['elevation'] as num?)?.toDouble(), shadowColor: json['shadowColor'] as String?, surfaceTintColor: json['surfaceTintColor'] as String?, diff --git a/packages/mirai/lib/src/parsers/mirai_container/mirai_container.g.dart b/packages/mirai/lib/src/parsers/mirai_container/mirai_container.g.dart index e975bebd..8ddede8c 100644 --- a/packages/mirai/lib/src/parsers/mirai_container/mirai_container.g.dart +++ b/packages/mirai/lib/src/parsers/mirai_container/mirai_container.g.dart @@ -12,7 +12,7 @@ _$MiraiContainerImpl _$$MiraiContainerImplFromJson(Map json) => $enumDecodeNullable(_$MiraiAlignmentEnumMap, json['alignment']), padding: json['padding'] == null ? null - : MiraiEdgeInsets.fromJson(json['padding'] as Map), + : MiraiEdgeInsets.fromJson(json['padding']), decoration: json['decoration'] == null ? null : MiraiBoxDecoration.fromJson( @@ -22,7 +22,7 @@ _$MiraiContainerImpl _$$MiraiContainerImplFromJson(Map json) => height: (json['height'] as num?)?.toDouble(), margin: json['margin'] == null ? null - : MiraiEdgeInsets.fromJson(json['margin'] as Map), + : MiraiEdgeInsets.fromJson(json['margin']), child: json['child'] as Map?, clipBehavior: $enumDecodeNullable(_$ClipEnumMap, json['clipBehavior']) ?? Clip.none, diff --git a/packages/mirai/lib/src/parsers/mirai_dialog_theme/mirai_dialog_theme.g.dart b/packages/mirai/lib/src/parsers/mirai_dialog_theme/mirai_dialog_theme.g.dart index 5d77b1b7..d4268980 100644 --- a/packages/mirai/lib/src/parsers/mirai_dialog_theme/mirai_dialog_theme.g.dart +++ b/packages/mirai/lib/src/parsers/mirai_dialog_theme/mirai_dialog_theme.g.dart @@ -28,8 +28,7 @@ _$MiraiDialogThemeImpl _$$MiraiDialogThemeImplFromJson( : MiraiTextStyle.fromJson(json['contentTextStyle']), actionsPadding: json['actionsPadding'] == null ? null - : MiraiEdgeInsets.fromJson( - json['actionsPadding'] as Map), + : MiraiEdgeInsets.fromJson(json['actionsPadding']), iconColor: json['iconColor'] as String?, ); diff --git a/packages/mirai/lib/src/parsers/mirai_edge_insets/mirai_edge_insets.dart b/packages/mirai/lib/src/parsers/mirai_edge_insets/mirai_edge_insets.dart index 70843e48..87a678b6 100644 --- a/packages/mirai/lib/src/parsers/mirai_edge_insets/mirai_edge_insets.dart +++ b/packages/mirai/lib/src/parsers/mirai_edge_insets/mirai_edge_insets.dart @@ -13,8 +13,37 @@ class MiraiEdgeInsets with _$MiraiEdgeInsets { double? bottom, }) = _MiraiEdgeInsets; - factory MiraiEdgeInsets.fromJson(Map json) => - _$MiraiEdgeInsetsFromJson(json); + factory MiraiEdgeInsets.fromJson(dynamic json) => _fromJson(json); + + static MiraiEdgeInsets _fromJson(dynamic json) { + Map resultantJson; + + if (json is num) { + resultantJson = { + "left": json, + "top": json, + "right": json, + "bottom": json + }; + } else if (json is List && json.length == 4) { + bool allElementsNum = json.every((element) => element is num); + if (!allElementsNum) { + throw ArgumentError('Invalid input format for MiraiEdgeInsets'); + } + resultantJson = { + "left": json[0], + "top": json[1], + "right": json[2], + "bottom": json[3] + }; + } else if (json is Map) { + resultantJson = json; + } else { + throw ArgumentError('Invalid input format for MiraiEdgeInsets'); + } + + return _$MiraiEdgeInsetsFromJson(resultantJson); + } } extension MiraiEdgeInsetsParser on MiraiEdgeInsets? { diff --git a/packages/mirai/lib/src/parsers/mirai_floating_action_button_theme_data/mirai_floating_action_button_theme_data.g.dart b/packages/mirai/lib/src/parsers/mirai_floating_action_button_theme_data/mirai_floating_action_button_theme_data.g.dart index 1448d8f3..c44aaf66 100644 --- a/packages/mirai/lib/src/parsers/mirai_floating_action_button_theme_data/mirai_floating_action_button_theme_data.g.dart +++ b/packages/mirai/lib/src/parsers/mirai_floating_action_button_theme_data/mirai_floating_action_button_theme_data.g.dart @@ -26,8 +26,7 @@ _$MiraiFloatingActionButtonThemeDataImpl (json['extendedIconLabelSpacing'] as num?)?.toDouble(), extendedPadding: json['extendedPadding'] == null ? null - : MiraiEdgeInsets.fromJson( - json['extendedPadding'] as Map), + : MiraiEdgeInsets.fromJson(json['extendedPadding']), extendedTextStyle: json['extendedTextStyle'] == null ? null : MiraiTextStyle.fromJson(json['extendedTextStyle']), diff --git a/packages/mirai/lib/src/parsers/mirai_grid_view/mirai_grid_view.g.dart b/packages/mirai/lib/src/parsers/mirai_grid_view/mirai_grid_view.g.dart index ad33bb82..2f40ef13 100644 --- a/packages/mirai/lib/src/parsers/mirai_grid_view/mirai_grid_view.g.dart +++ b/packages/mirai/lib/src/parsers/mirai_grid_view/mirai_grid_view.g.dart @@ -18,7 +18,7 @@ _$MiraiGridViewImpl _$$MiraiGridViewImplFromJson(Map json) => shrinkWrap: json['shrinkWrap'] as bool? ?? false, padding: json['padding'] == null ? null - : MiraiEdgeInsets.fromJson(json['padding'] as Map), + : MiraiEdgeInsets.fromJson(json['padding']), crossAxisCount: json['crossAxisCount'] as int?, mainAxisSpacing: (json['mainAxisSpacing'] as num?)?.toDouble() ?? 0.0, crossAxisSpacing: (json['crossAxisSpacing'] as num?)?.toDouble() ?? 0.0, diff --git a/packages/mirai/lib/src/parsers/mirai_icon_button/mirai_icon_button.g.dart b/packages/mirai/lib/src/parsers/mirai_icon_button/mirai_icon_button.g.dart index 180fe11f..b8cad032 100644 --- a/packages/mirai/lib/src/parsers/mirai_icon_button/mirai_icon_button.g.dart +++ b/packages/mirai/lib/src/parsers/mirai_icon_button/mirai_icon_button.g.dart @@ -13,7 +13,7 @@ _$MiraiIconButtonImpl _$$MiraiIconButtonImplFromJson( iconSize: (json['iconSize'] as num?)?.toDouble(), padding: json['padding'] == null ? null - : MiraiEdgeInsets.fromJson(json['padding'] as Map), + : MiraiEdgeInsets.fromJson(json['padding']), alignment: $enumDecodeNullable(_$MiraiAlignmentEnumMap, json['alignment']) ?? MiraiAlignment.center, diff --git a/packages/mirai/lib/src/parsers/mirai_input_decoration/mirai_input_decoration.g.dart b/packages/mirai/lib/src/parsers/mirai_input_decoration/mirai_input_decoration.g.dart index 5a451bcf..9d632535 100644 --- a/packages/mirai/lib/src/parsers/mirai_input_decoration/mirai_input_decoration.g.dart +++ b/packages/mirai/lib/src/parsers/mirai_input_decoration/mirai_input_decoration.g.dart @@ -44,8 +44,7 @@ _$MiraiInputDecorationImpl _$$MiraiInputDecorationImplFromJson( isDense: json['isDense'] as bool? ?? false, contentPadding: json['contentPadding'] == null ? null - : MiraiEdgeInsets.fromJson( - json['contentPadding'] as Map), + : MiraiEdgeInsets.fromJson(json['contentPadding']), prefixIcon: json['prefixIcon'] as Map?, prefixIconConstraints: json['prefixIconConstraints'] == null ? null diff --git a/packages/mirai/lib/src/parsers/mirai_input_decoration_theme/mirai_input_decoration_theme.g.dart b/packages/mirai/lib/src/parsers/mirai_input_decoration_theme/mirai_input_decoration_theme.g.dart index c6eb82a8..346aaf6e 100644 --- a/packages/mirai/lib/src/parsers/mirai_input_decoration_theme/mirai_input_decoration_theme.g.dart +++ b/packages/mirai/lib/src/parsers/mirai_input_decoration_theme/mirai_input_decoration_theme.g.dart @@ -33,8 +33,7 @@ _$MiraiInputDecorationThemeImpl _$$MiraiInputDecorationThemeImplFromJson( isDense: json['isDense'] as bool? ?? false, contentPadding: json['contentPadding'] == null ? null - : MiraiEdgeInsets.fromJson( - json['contentPadding'] as Map), + : MiraiEdgeInsets.fromJson(json['contentPadding']), isCollapsed: json['isCollapsed'] as bool? ?? false, iconColor: json['iconColor'] as String?, prefixStyle: json['prefixStyle'] == null diff --git a/packages/mirai/lib/src/parsers/mirai_list_tile/mirai_list_tile.g.dart b/packages/mirai/lib/src/parsers/mirai_list_tile/mirai_list_tile.g.dart index 149a1a41..9986a274 100644 --- a/packages/mirai/lib/src/parsers/mirai_list_tile/mirai_list_tile.g.dart +++ b/packages/mirai/lib/src/parsers/mirai_list_tile/mirai_list_tile.g.dart @@ -22,8 +22,7 @@ _$MiraiListTileImpl _$$MiraiListTileImplFromJson(Map json) => textColor: json['textColor'] as String?, contentPadding: json['contentPadding'] == null ? null - : MiraiEdgeInsets.fromJson( - json['contentPadding'] as Map), + : MiraiEdgeInsets.fromJson(json['contentPadding']), enabled: json['enabled'] as bool? ?? true, selected: json['selected'] as bool? ?? false, focusColor: json['focusColor'] as String?, diff --git a/packages/mirai/lib/src/parsers/mirai_list_tile_theme_data/mirai_list_tile_theme_data.g.dart b/packages/mirai/lib/src/parsers/mirai_list_tile_theme_data/mirai_list_tile_theme_data.g.dart index 84e79686..c3026173 100644 --- a/packages/mirai/lib/src/parsers/mirai_list_tile_theme_data/mirai_list_tile_theme_data.g.dart +++ b/packages/mirai/lib/src/parsers/mirai_list_tile_theme_data/mirai_list_tile_theme_data.g.dart @@ -28,8 +28,7 @@ _$MiraiListTileThemeDataImpl _$$MiraiListTileThemeDataImplFromJson( : MiraiTextStyle.fromJson(json['leadingAndTrailingTextStyle']), contentPadding: json['contentPadding'] == null ? null - : MiraiEdgeInsets.fromJson( - json['contentPadding'] as Map), + : MiraiEdgeInsets.fromJson(json['contentPadding']), tileColor: json['tileColor'] as String?, selectedTileColor: json['selectedTileColor'] as String?, horizontalTitleGap: (json['horizontalTitleGap'] as num?)?.toDouble(), diff --git a/packages/mirai/lib/src/parsers/mirai_list_view/mirai_list_view.g.dart b/packages/mirai/lib/src/parsers/mirai_list_view/mirai_list_view.g.dart index 12a4a585..169fa4fb 100644 --- a/packages/mirai/lib/src/parsers/mirai_list_view/mirai_list_view.g.dart +++ b/packages/mirai/lib/src/parsers/mirai_list_view/mirai_list_view.g.dart @@ -18,7 +18,7 @@ _$MiraiListViewImpl _$$MiraiListViewImplFromJson(Map json) => shrinkWrap: json['shrinkWrap'] as bool? ?? false, padding: json['padding'] == null ? null - : MiraiEdgeInsets.fromJson(json['padding'] as Map), + : MiraiEdgeInsets.fromJson(json['padding']), addAutomaticKeepAlives: json['addAutomaticKeepAlives'] as bool? ?? true, addRepaintBoundaries: json['addRepaintBoundaries'] as bool? ?? true, addSemanticIndexes: json['addSemanticIndexes'] as bool? ?? true, diff --git a/packages/mirai/lib/src/parsers/mirai_padding/mirai_padding.g.dart b/packages/mirai/lib/src/parsers/mirai_padding/mirai_padding.g.dart index 46a05bb9..c611038d 100644 --- a/packages/mirai/lib/src/parsers/mirai_padding/mirai_padding.g.dart +++ b/packages/mirai/lib/src/parsers/mirai_padding/mirai_padding.g.dart @@ -8,8 +8,7 @@ part of 'mirai_padding.dart'; _$MiraiPaddingImpl _$$MiraiPaddingImplFromJson(Map json) => _$MiraiPaddingImpl( - padding: - MiraiEdgeInsets.fromJson(json['padding'] as Map), + padding: MiraiEdgeInsets.fromJson(json['padding']), child: json['child'] as Map?, ); diff --git a/packages/mirai/lib/src/parsers/mirai_safe_area/mirai_safe_area.g.dart b/packages/mirai/lib/src/parsers/mirai_safe_area/mirai_safe_area.g.dart index aeec9e1a..bd317b61 100644 --- a/packages/mirai/lib/src/parsers/mirai_safe_area/mirai_safe_area.g.dart +++ b/packages/mirai/lib/src/parsers/mirai_safe_area/mirai_safe_area.g.dart @@ -15,7 +15,7 @@ _$MiraiSafeAreaImpl _$$MiraiSafeAreaImplFromJson(Map json) => bottom: json['bottom'] as bool? ?? true, minimum: json['minimum'] == null ? const MiraiEdgeInsets() - : MiraiEdgeInsets.fromJson(json['minimum'] as Map), + : MiraiEdgeInsets.fromJson(json['minimum']), maintainBottomViewPadding: json['maintainBottomViewPadding'] as bool? ?? false, ); diff --git a/packages/mirai/lib/src/parsers/mirai_single_child_scroll_view/mirai_single_child_scroll_view.g.dart b/packages/mirai/lib/src/parsers/mirai_single_child_scroll_view/mirai_single_child_scroll_view.g.dart index f3100cc7..2b3e275e 100644 --- a/packages/mirai/lib/src/parsers/mirai_single_child_scroll_view/mirai_single_child_scroll_view.g.dart +++ b/packages/mirai/lib/src/parsers/mirai_single_child_scroll_view/mirai_single_child_scroll_view.g.dart @@ -15,7 +15,7 @@ _$MiraiSingleChildScrollViewImpl _$$MiraiSingleChildScrollViewImplFromJson( reverse: json['reverse'] as bool? ?? false, padding: json['padding'] == null ? null - : MiraiEdgeInsets.fromJson(json['padding'] as Map), + : MiraiEdgeInsets.fromJson(json['padding']), primary: json['primary'] as bool?, physics: $enumDecodeNullable(_$MiraiScrollPhysicsEnumMap, json['physics']), diff --git a/packages/mirai/lib/src/parsers/mirai_tab/mirai_tab.g.dart b/packages/mirai/lib/src/parsers/mirai_tab/mirai_tab.g.dart index a0599172..72de8814 100644 --- a/packages/mirai/lib/src/parsers/mirai_tab/mirai_tab.g.dart +++ b/packages/mirai/lib/src/parsers/mirai_tab/mirai_tab.g.dart @@ -12,8 +12,7 @@ _$MiraiTabImpl _$$MiraiTabImplFromJson(Map json) => icon: json['icon'] as Map?, iconMargin: json['iconMargin'] == null ? null - : MiraiEdgeInsets.fromJson( - json['iconMargin'] as Map), + : MiraiEdgeInsets.fromJson(json['iconMargin']), height: (json['height'] as num?)?.toDouble(), child: json['child'] as Map?, ); diff --git a/packages/mirai/lib/src/parsers/mirai_tab_bar/mirai_tab_bar.g.dart b/packages/mirai/lib/src/parsers/mirai_tab_bar/mirai_tab_bar.g.dart index 95429789..529446c4 100644 --- a/packages/mirai/lib/src/parsers/mirai_tab_bar/mirai_tab_bar.g.dart +++ b/packages/mirai/lib/src/parsers/mirai_tab_bar/mirai_tab_bar.g.dart @@ -15,15 +15,14 @@ _$MiraiTabBarImpl _$$MiraiTabBarImplFromJson(Map json) => isScrollable: json['isScrollable'] as bool? ?? false, padding: json['padding'] == null ? null - : MiraiEdgeInsets.fromJson(json['padding'] as Map), + : MiraiEdgeInsets.fromJson(json['padding']), indicatorColor: json['indicatorColor'] as String?, automaticIndicatorColorAdjustment: json['automaticIndicatorColorAdjustment'] as bool? ?? true, indicatorWeight: (json['indicatorWeight'] as num?)?.toDouble() ?? 2.0, indicatorPadding: json['indicatorPadding'] == null ? null - : MiraiEdgeInsets.fromJson( - json['indicatorPadding'] as Map), + : MiraiEdgeInsets.fromJson(json['indicatorPadding']), indicatorSize: $enumDecodeNullable( _$TabBarIndicatorSizeEnumMap, json['indicatorSize']), labelColor: json['labelColor'] as String?, @@ -32,8 +31,7 @@ _$MiraiTabBarImpl _$$MiraiTabBarImplFromJson(Map json) => : MiraiTextStyle.fromJson(json['labelStyle']), labelPadding: json['labelPadding'] == null ? null - : MiraiEdgeInsets.fromJson( - json['labelPadding'] as Map), + : MiraiEdgeInsets.fromJson(json['labelPadding']), unselectedLabelColor: json['unselectedLabelColor'] as String?, unselectedLabelStyle: json['unselectedLabelStyle'] == null ? null diff --git a/packages/mirai/lib/src/parsers/mirai_tab_bar_theme_data/mirai_tab_bar_theme_data.g.dart b/packages/mirai/lib/src/parsers/mirai_tab_bar_theme_data/mirai_tab_bar_theme_data.g.dart index e9a2c6ff..4044a121 100644 --- a/packages/mirai/lib/src/parsers/mirai_tab_bar_theme_data/mirai_tab_bar_theme_data.g.dart +++ b/packages/mirai/lib/src/parsers/mirai_tab_bar_theme_data/mirai_tab_bar_theme_data.g.dart @@ -20,8 +20,7 @@ _$MiraiTabBarThemeDataImpl _$$MiraiTabBarThemeDataImplFromJson( labelColor: json['labelColor'] as String?, labelPadding: json['labelPadding'] == null ? null - : MiraiEdgeInsets.fromJson( - json['labelPadding'] as Map), + : MiraiEdgeInsets.fromJson(json['labelPadding']), labelStyle: json['labelStyle'] == null ? null : MiraiTextStyle.fromJson(json['labelStyle']), diff --git a/packages/mirai/lib/src/parsers/mirai_text_form_field/mirai_text_form_field.g.dart b/packages/mirai/lib/src/parsers/mirai_text_form_field/mirai_text_form_field.g.dart index 7afac555..5bd5e971 100644 --- a/packages/mirai/lib/src/parsers/mirai_text_form_field/mirai_text_form_field.g.dart +++ b/packages/mirai/lib/src/parsers/mirai_text_form_field/mirai_text_form_field.g.dart @@ -51,8 +51,7 @@ _$MiraiTextFormFieldImpl _$$MiraiTextFormFieldImplFromJson( $enumDecodeNullable(_$BrightnessEnumMap, json['keyboardAppearance']), scrollPadding: json['scrollPadding'] == null ? const MiraiEdgeInsets(bottom: 20, top: 20, left: 20, right: 20) - : MiraiEdgeInsets.fromJson( - json['scrollPadding'] as Map), + : MiraiEdgeInsets.fromJson(json['scrollPadding']), restorationId: json['restorationId'] as String?, enableIMEPersonalizedLearning: json['enableIMEPersonalizedLearning'] as bool? ?? true,