From 8a8d1df720dea7877f39b8d0b38e8baeea9f7d1c Mon Sep 17 00:00:00 2001 From: Divyanshu Bhargava Date: Tue, 20 Feb 2024 14:27:05 +0400 Subject: [PATCH 1/2] Rename `scrollView` to `SingleChildScrollView` --- .../mirai_single_child_scroll_view.dart} | 16 ++-- ...rai_single_child_scroll_view.freezed.dart} | 90 ++++++++++--------- .../mirai_single_child_scroll_view.g.dart} | 10 +-- ...irai_single_child_scroll_view_parser.dart} | 19 ++-- 4 files changed, 71 insertions(+), 64 deletions(-) rename packages/mirai/lib/src/parsers/{mirai_scroll_view/mirai_scroll_view.dart => mirai_single_child_scroll_view/mirai_single_child_scroll_view.dart} (63%) rename packages/mirai/lib/src/parsers/{mirai_scroll_view/mirai_scroll_view.freezed.dart => mirai_single_child_scroll_view/mirai_single_child_scroll_view.freezed.dart} (78%) rename packages/mirai/lib/src/parsers/{mirai_scroll_view/mirai_scroll_view.g.dart => mirai_single_child_scroll_view/mirai_single_child_scroll_view.g.dart} (90%) rename packages/mirai/lib/src/parsers/{mirai_scroll_view/mirai_scroll_view_parser.dart => mirai_single_child_scroll_view/mirai_single_child_scroll_view_parser.dart} (58%) diff --git a/packages/mirai/lib/src/parsers/mirai_scroll_view/mirai_scroll_view.dart b/packages/mirai/lib/src/parsers/mirai_single_child_scroll_view/mirai_single_child_scroll_view.dart similarity index 63% rename from packages/mirai/lib/src/parsers/mirai_scroll_view/mirai_scroll_view.dart rename to packages/mirai/lib/src/parsers/mirai_single_child_scroll_view/mirai_single_child_scroll_view.dart index ca60a19f..ce627d19 100644 --- a/packages/mirai/lib/src/parsers/mirai_scroll_view/mirai_scroll_view.dart +++ b/packages/mirai/lib/src/parsers/mirai_single_child_scroll_view/mirai_single_child_scroll_view.dart @@ -4,14 +4,14 @@ import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:mirai/src/parsers/mirai_edge_insets/mirai_edge_insets.dart'; import 'package:mirai/src/utils/mirai_scroll_physics.dart'; -export 'package:mirai/src/parsers/mirai_scroll_view/mirai_scroll_view_parser.dart'; +export 'mirai_single_child_scroll_view_parser.dart'; -part 'mirai_scroll_view.freezed.dart'; -part 'mirai_scroll_view.g.dart'; +part 'mirai_single_child_scroll_view.freezed.dart'; +part 'mirai_single_child_scroll_view.g.dart'; @freezed -class MiraiScrollView with _$MiraiScrollView { - const factory MiraiScrollView({ +class MiraiSingleChildScrollView with _$MiraiSingleChildScrollView { + const factory MiraiSingleChildScrollView({ @Default(Axis.vertical) Axis scrollDirection, @Default(false) bool reverse, MiraiEdgeInsets? padding, @@ -23,8 +23,8 @@ class MiraiScrollView with _$MiraiScrollView { String? restorationId, @Default(ScrollViewKeyboardDismissBehavior.manual) ScrollViewKeyboardDismissBehavior keyboardDismissBehavior, - }) = _MiraiScrollView; + }) = _MiraiSingleChildScrollView; - factory MiraiScrollView.fromJson(Map json) => - _$MiraiScrollViewFromJson(json); + factory MiraiSingleChildScrollView.fromJson(Map json) => + _$MiraiSingleChildScrollViewFromJson(json); } diff --git a/packages/mirai/lib/src/parsers/mirai_scroll_view/mirai_scroll_view.freezed.dart b/packages/mirai/lib/src/parsers/mirai_single_child_scroll_view/mirai_single_child_scroll_view.freezed.dart similarity index 78% rename from packages/mirai/lib/src/parsers/mirai_scroll_view/mirai_scroll_view.freezed.dart rename to packages/mirai/lib/src/parsers/mirai_single_child_scroll_view/mirai_single_child_scroll_view.freezed.dart index dd2d9c6c..93307c80 100644 --- a/packages/mirai/lib/src/parsers/mirai_scroll_view/mirai_scroll_view.freezed.dart +++ b/packages/mirai/lib/src/parsers/mirai_single_child_scroll_view/mirai_single_child_scroll_view.freezed.dart @@ -3,7 +3,7 @@ // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark -part of 'mirai_scroll_view.dart'; +part of 'mirai_single_child_scroll_view.dart'; // ************************************************************************** // FreezedGenerator @@ -14,12 +14,13 @@ T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); -MiraiScrollView _$MiraiScrollViewFromJson(Map json) { - return _MiraiScrollView.fromJson(json); +MiraiSingleChildScrollView _$MiraiSingleChildScrollViewFromJson( + Map json) { + return _MiraiSingleChildScrollView.fromJson(json); } /// @nodoc -mixin _$MiraiScrollView { +mixin _$MiraiSingleChildScrollView { Axis get scrollDirection => throw _privateConstructorUsedError; bool get reverse => throw _privateConstructorUsedError; MiraiEdgeInsets? get padding => throw _privateConstructorUsedError; @@ -34,15 +35,16 @@ mixin _$MiraiScrollView { Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $MiraiScrollViewCopyWith get copyWith => - throw _privateConstructorUsedError; + $MiraiSingleChildScrollViewCopyWith + get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $MiraiScrollViewCopyWith<$Res> { - factory $MiraiScrollViewCopyWith( - MiraiScrollView value, $Res Function(MiraiScrollView) then) = - _$MiraiScrollViewCopyWithImpl<$Res, MiraiScrollView>; +abstract class $MiraiSingleChildScrollViewCopyWith<$Res> { + factory $MiraiSingleChildScrollViewCopyWith(MiraiSingleChildScrollView value, + $Res Function(MiraiSingleChildScrollView) then) = + _$MiraiSingleChildScrollViewCopyWithImpl<$Res, + MiraiSingleChildScrollView>; @useResult $Res call( {Axis scrollDirection, @@ -60,9 +62,10 @@ abstract class $MiraiScrollViewCopyWith<$Res> { } /// @nodoc -class _$MiraiScrollViewCopyWithImpl<$Res, $Val extends MiraiScrollView> - implements $MiraiScrollViewCopyWith<$Res> { - _$MiraiScrollViewCopyWithImpl(this._value, this._then); +class _$MiraiSingleChildScrollViewCopyWithImpl<$Res, + $Val extends MiraiSingleChildScrollView> + implements $MiraiSingleChildScrollViewCopyWith<$Res> { + _$MiraiSingleChildScrollViewCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -141,11 +144,12 @@ class _$MiraiScrollViewCopyWithImpl<$Res, $Val extends MiraiScrollView> } /// @nodoc -abstract class _$$MiraiScrollViewImplCopyWith<$Res> - implements $MiraiScrollViewCopyWith<$Res> { - factory _$$MiraiScrollViewImplCopyWith(_$MiraiScrollViewImpl value, - $Res Function(_$MiraiScrollViewImpl) then) = - __$$MiraiScrollViewImplCopyWithImpl<$Res>; +abstract class _$$MiraiSingleChildScrollViewImplCopyWith<$Res> + implements $MiraiSingleChildScrollViewCopyWith<$Res> { + factory _$$MiraiSingleChildScrollViewImplCopyWith( + _$MiraiSingleChildScrollViewImpl value, + $Res Function(_$MiraiSingleChildScrollViewImpl) then) = + __$$MiraiSingleChildScrollViewImplCopyWithImpl<$Res>; @override @useResult $Res call( @@ -165,11 +169,13 @@ abstract class _$$MiraiScrollViewImplCopyWith<$Res> } /// @nodoc -class __$$MiraiScrollViewImplCopyWithImpl<$Res> - extends _$MiraiScrollViewCopyWithImpl<$Res, _$MiraiScrollViewImpl> - implements _$$MiraiScrollViewImplCopyWith<$Res> { - __$$MiraiScrollViewImplCopyWithImpl( - _$MiraiScrollViewImpl _value, $Res Function(_$MiraiScrollViewImpl) _then) +class __$$MiraiSingleChildScrollViewImplCopyWithImpl<$Res> + extends _$MiraiSingleChildScrollViewCopyWithImpl<$Res, + _$MiraiSingleChildScrollViewImpl> + implements _$$MiraiSingleChildScrollViewImplCopyWith<$Res> { + __$$MiraiSingleChildScrollViewImplCopyWithImpl( + _$MiraiSingleChildScrollViewImpl _value, + $Res Function(_$MiraiSingleChildScrollViewImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -186,7 +192,7 @@ class __$$MiraiScrollViewImplCopyWithImpl<$Res> Object? restorationId = freezed, Object? keyboardDismissBehavior = null, }) { - return _then(_$MiraiScrollViewImpl( + return _then(_$MiraiSingleChildScrollViewImpl( scrollDirection: null == scrollDirection ? _value.scrollDirection : scrollDirection // ignore: cast_nullable_to_non_nullable @@ -233,8 +239,8 @@ class __$$MiraiScrollViewImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$MiraiScrollViewImpl implements _MiraiScrollView { - const _$MiraiScrollViewImpl( +class _$MiraiSingleChildScrollViewImpl implements _MiraiSingleChildScrollView { + const _$MiraiSingleChildScrollViewImpl( {this.scrollDirection = Axis.vertical, this.reverse = false, this.padding, @@ -247,8 +253,9 @@ class _$MiraiScrollViewImpl implements _MiraiScrollView { this.keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual}) : _child = child; - factory _$MiraiScrollViewImpl.fromJson(Map json) => - _$$MiraiScrollViewImplFromJson(json); + factory _$MiraiSingleChildScrollViewImpl.fromJson( + Map json) => + _$$MiraiSingleChildScrollViewImplFromJson(json); @override @JsonKey() @@ -286,14 +293,14 @@ class _$MiraiScrollViewImpl implements _MiraiScrollView { @override String toString() { - return 'MiraiScrollView(scrollDirection: $scrollDirection, reverse: $reverse, padding: $padding, primary: $primary, physics: $physics, child: $child, dragStartBehavior: $dragStartBehavior, clipBehavior: $clipBehavior, restorationId: $restorationId, keyboardDismissBehavior: $keyboardDismissBehavior)'; + return 'MiraiSingleChildScrollView(scrollDirection: $scrollDirection, reverse: $reverse, padding: $padding, primary: $primary, physics: $physics, child: $child, dragStartBehavior: $dragStartBehavior, clipBehavior: $clipBehavior, restorationId: $restorationId, keyboardDismissBehavior: $keyboardDismissBehavior)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$MiraiScrollViewImpl && + other is _$MiraiSingleChildScrollViewImpl && (identical(other.scrollDirection, scrollDirection) || other.scrollDirection == scrollDirection) && (identical(other.reverse, reverse) || other.reverse == reverse) && @@ -330,20 +337,21 @@ class _$MiraiScrollViewImpl implements _MiraiScrollView { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$MiraiScrollViewImplCopyWith<_$MiraiScrollViewImpl> get copyWith => - __$$MiraiScrollViewImplCopyWithImpl<_$MiraiScrollViewImpl>( - this, _$identity); + _$$MiraiSingleChildScrollViewImplCopyWith<_$MiraiSingleChildScrollViewImpl> + get copyWith => __$$MiraiSingleChildScrollViewImplCopyWithImpl< + _$MiraiSingleChildScrollViewImpl>(this, _$identity); @override Map toJson() { - return _$$MiraiScrollViewImplToJson( + return _$$MiraiSingleChildScrollViewImplToJson( this, ); } } -abstract class _MiraiScrollView implements MiraiScrollView { - const factory _MiraiScrollView( +abstract class _MiraiSingleChildScrollView + implements MiraiSingleChildScrollView { + const factory _MiraiSingleChildScrollView( {final Axis scrollDirection, final bool reverse, final MiraiEdgeInsets? padding, @@ -354,10 +362,10 @@ abstract class _MiraiScrollView implements MiraiScrollView { final Clip clipBehavior, final String? restorationId, final ScrollViewKeyboardDismissBehavior keyboardDismissBehavior}) = - _$MiraiScrollViewImpl; + _$MiraiSingleChildScrollViewImpl; - factory _MiraiScrollView.fromJson(Map json) = - _$MiraiScrollViewImpl.fromJson; + factory _MiraiSingleChildScrollView.fromJson(Map json) = + _$MiraiSingleChildScrollViewImpl.fromJson; @override Axis get scrollDirection; @@ -381,6 +389,6 @@ abstract class _MiraiScrollView implements MiraiScrollView { ScrollViewKeyboardDismissBehavior get keyboardDismissBehavior; @override @JsonKey(ignore: true) - _$$MiraiScrollViewImplCopyWith<_$MiraiScrollViewImpl> get copyWith => - throw _privateConstructorUsedError; + _$$MiraiSingleChildScrollViewImplCopyWith<_$MiraiSingleChildScrollViewImpl> + get copyWith => throw _privateConstructorUsedError; } diff --git a/packages/mirai/lib/src/parsers/mirai_scroll_view/mirai_scroll_view.g.dart b/packages/mirai/lib/src/parsers/mirai_single_child_scroll_view/mirai_single_child_scroll_view.g.dart similarity index 90% rename from packages/mirai/lib/src/parsers/mirai_scroll_view/mirai_scroll_view.g.dart rename to packages/mirai/lib/src/parsers/mirai_single_child_scroll_view/mirai_single_child_scroll_view.g.dart index d548bb80..f3100cc7 100644 --- a/packages/mirai/lib/src/parsers/mirai_scroll_view/mirai_scroll_view.g.dart +++ b/packages/mirai/lib/src/parsers/mirai_single_child_scroll_view/mirai_single_child_scroll_view.g.dart @@ -1,14 +1,14 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of 'mirai_scroll_view.dart'; +part of 'mirai_single_child_scroll_view.dart'; // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** -_$MiraiScrollViewImpl _$$MiraiScrollViewImplFromJson( +_$MiraiSingleChildScrollViewImpl _$$MiraiSingleChildScrollViewImplFromJson( Map json) => - _$MiraiScrollViewImpl( + _$MiraiSingleChildScrollViewImpl( scrollDirection: $enumDecodeNullable(_$AxisEnumMap, json['scrollDirection']) ?? Axis.vertical, @@ -32,8 +32,8 @@ _$MiraiScrollViewImpl _$$MiraiScrollViewImplFromJson( ScrollViewKeyboardDismissBehavior.manual, ); -Map _$$MiraiScrollViewImplToJson( - _$MiraiScrollViewImpl instance) => +Map _$$MiraiSingleChildScrollViewImplToJson( + _$MiraiSingleChildScrollViewImpl instance) => { 'scrollDirection': _$AxisEnumMap[instance.scrollDirection]!, 'reverse': instance.reverse, diff --git a/packages/mirai/lib/src/parsers/mirai_scroll_view/mirai_scroll_view_parser.dart b/packages/mirai/lib/src/parsers/mirai_single_child_scroll_view/mirai_single_child_scroll_view_parser.dart similarity index 58% rename from packages/mirai/lib/src/parsers/mirai_scroll_view/mirai_scroll_view_parser.dart rename to packages/mirai/lib/src/parsers/mirai_single_child_scroll_view/mirai_single_child_scroll_view_parser.dart index 7abd82f8..1f68a747 100644 --- a/packages/mirai/lib/src/parsers/mirai_scroll_view/mirai_scroll_view_parser.dart +++ b/packages/mirai/lib/src/parsers/mirai_single_child_scroll_view/mirai_single_child_scroll_view_parser.dart @@ -1,28 +1,27 @@ import 'package:flutter/material.dart'; import 'package:mirai/src/framework/framework.dart'; import 'package:mirai/src/parsers/mirai_edge_insets/mirai_edge_insets.dart'; -import 'package:mirai/src/parsers/mirai_scroll_view/mirai_scroll_view.dart'; +import 'package:mirai/src/parsers/mirai_single_child_scroll_view/mirai_single_child_scroll_view.dart'; import 'package:mirai/src/utils/widget_type.dart'; import 'package:mirai_framework/mirai_framework.dart'; -class MiraiScrollViewParser extends MiraiParser { - const MiraiScrollViewParser({this.controller}); - - final ScrollController? controller; +class MiraiSingleChildScrollViewParser + extends MiraiParser { + const MiraiSingleChildScrollViewParser(); @override - MiraiScrollView getModel(Map json) => - MiraiScrollView.fromJson(json); + MiraiSingleChildScrollView getModel(Map json) => + MiraiSingleChildScrollView.fromJson(json); @override - String get type => WidgetType.scrollView.name; + String get type => WidgetType.singleChildScrollView.name; @override - Widget parse(BuildContext context, MiraiScrollView model) { + Widget parse(BuildContext context, MiraiSingleChildScrollView model) { return SingleChildScrollView( scrollDirection: model.scrollDirection, reverse: model.reverse, - padding: model.padding.parse, + padding: model.padding?.parse, primary: model.primary, physics: model.physics?.parse, dragStartBehavior: model.dragStartBehavior, From dc359d46a8aadc8677354faccf9f707eb5d858c9 Mon Sep 17 00:00:00 2001 From: Divyanshu Bhargava Date: Tue, 20 Feb 2024 14:27:37 +0400 Subject: [PATCH 2/2] Refactor imports --- examples/mirai_gallery/macos/Podfile.lock | 2 +- .../macos/Runner.xcodeproj/project.pbxproj | 2 +- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- examples/mirai_gallery/pubspec.lock | 58 +++++++++++++------ .../mirai_dialog_action.g.dart | 1 + packages/mirai/lib/src/framework/mirai.dart | 11 +--- .../src/parsers/mirai_align/mirai_align.dart | 2 +- .../parsers/mirai_center/mirai_center.dart | 2 +- .../mirai_check_box_widget.dart | 2 + .../src/parsers/mirai_form/mirai_form.dart | 2 +- .../mirai_form_field/mirai_form_field.dart | 2 + .../mirai_fractionally_sized_box.dart | 2 +- .../mirai_refresh_indicator_parser.dart | 6 +- .../parsers/mirai_switch/mirai_switch.dart | 2 + .../mirai_switch/mirai_switch_parser.dart | 2 +- .../widget/mirai_switch_widget.dart | 2 +- .../lib/src/parsers/mirai_tab/mirai_tab.dart | 2 + packages/mirai/lib/src/parsers/parsers.dart | 9 ++- packages/mirai/lib/src/utils/widget_type.dart | 2 +- 19 files changed, 73 insertions(+), 40 deletions(-) diff --git a/examples/mirai_gallery/macos/Podfile.lock b/examples/mirai_gallery/macos/Podfile.lock index 79862f06..1f6779f9 100644 --- a/examples/mirai_gallery/macos/Podfile.lock +++ b/examples/mirai_gallery/macos/Podfile.lock @@ -13,4 +13,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 236401fc2c932af29a9fcf0e97baeeb2d750d367 -COCOAPODS: 1.12.1 +COCOAPODS: 1.14.3 diff --git a/examples/mirai_gallery/macos/Runner.xcodeproj/project.pbxproj b/examples/mirai_gallery/macos/Runner.xcodeproj/project.pbxproj index 39f233b6..110378e8 100644 --- a/examples/mirai_gallery/macos/Runner.xcodeproj/project.pbxproj +++ b/examples/mirai_gallery/macos/Runner.xcodeproj/project.pbxproj @@ -258,7 +258,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1430; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 331C80D4294CF70F00263BE5 = { diff --git a/examples/mirai_gallery/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/examples/mirai_gallery/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index ca25b4d5..8d1ec463 100644 --- a/examples/mirai_gallery/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/examples/mirai_gallery/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ _$$MiraiDialogActionImplToJson( const _$TraversalEdgeBehaviorEnumMap = { TraversalEdgeBehavior.closedLoop: 'closedLoop', TraversalEdgeBehavior.leaveFlutterView: 'leaveFlutterView', + TraversalEdgeBehavior.parentScope: 'parentScope', }; diff --git a/packages/mirai/lib/src/framework/mirai.dart b/packages/mirai/lib/src/framework/mirai.dart index 1007bf96..e066beff 100644 --- a/packages/mirai/lib/src/framework/mirai.dart +++ b/packages/mirai/lib/src/framework/mirai.dart @@ -8,15 +8,6 @@ import 'package:mirai/src/action_parsers/action_parsers.dart'; import 'package:mirai/src/framework/mirai_registry.dart'; import 'package:mirai/src/network/mirai_network.dart'; import 'package:mirai/src/network/mirai_request.dart'; -import 'package:mirai/src/parsers/mirai_align/mirai_align_parser.dart'; -import 'package:mirai/src/parsers/mirai_center/mirai_center_parser.dart'; -import 'package:mirai/src/parsers/mirai_check_box_widget/mirai_check_box_widget_parser.dart'; -import 'package:mirai/src/parsers/mirai_form/mirai_form_parser.dart'; -import 'package:mirai/src/parsers/mirai_form_field/mirai_form_field_parser.dart'; -import 'package:mirai/src/parsers/mirai_fractionally_sized_box/mirai_fractionally_sized_box_parser.dart'; -import 'package:mirai/src/parsers/mirai_refresh_indicator/mirai_refresh_indicator_parser.dart'; -import 'package:mirai/src/parsers/mirai_switch/mirai_switch_parser.dart'; -import 'package:mirai/src/parsers/mirai_tab/mirai_tab_parser.dart'; import 'package:mirai/src/parsers/parsers.dart'; import 'package:mirai/src/utils/log.dart'; import 'package:mirai_framework/mirai_framework.dart'; @@ -58,7 +49,7 @@ class Mirai { const MiraiBottomNavigationBarParser(), const MiraiListViewParser(), const MiraiDefaultTabControllerParser(), - const MiraiScrollViewParser(), + const MiraiSingleChildScrollViewParser(), const MiraiAlertDialogParser(), const MiraiTabParser(), const MiraiFormParser(), diff --git a/packages/mirai/lib/src/parsers/mirai_align/mirai_align.dart b/packages/mirai/lib/src/parsers/mirai_align/mirai_align.dart index 3341a28f..94ee40b6 100644 --- a/packages/mirai/lib/src/parsers/mirai_align/mirai_align.dart +++ b/packages/mirai/lib/src/parsers/mirai_align/mirai_align.dart @@ -1,7 +1,7 @@ import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:mirai/src/parsers/parsers.dart'; -export 'package:mirai/src/parsers/mirai_stack/mirai_stack_parser.dart'; +export 'package:mirai/src/parsers/mirai_align/mirai_align_parser.dart'; part 'mirai_align.freezed.dart'; part 'mirai_align.g.dart'; diff --git a/packages/mirai/lib/src/parsers/mirai_center/mirai_center.dart b/packages/mirai/lib/src/parsers/mirai_center/mirai_center.dart index aaf9754e..569f5ac8 100644 --- a/packages/mirai/lib/src/parsers/mirai_center/mirai_center.dart +++ b/packages/mirai/lib/src/parsers/mirai_center/mirai_center.dart @@ -1,6 +1,6 @@ import 'package:freezed_annotation/freezed_annotation.dart'; -export 'package:mirai/src/parsers/mirai_sized_box/mirai_sized_box_parser.dart'; +export 'package:mirai/src/parsers/mirai_center/mirai_center_parser.dart'; part 'mirai_center.freezed.dart'; part 'mirai_center.g.dart'; diff --git a/packages/mirai/lib/src/parsers/mirai_check_box_widget/mirai_check_box_widget.dart b/packages/mirai/lib/src/parsers/mirai_check_box_widget/mirai_check_box_widget.dart index 726bfd09..429a9cc7 100644 --- a/packages/mirai/lib/src/parsers/mirai_check_box_widget/mirai_check_box_widget.dart +++ b/packages/mirai/lib/src/parsers/mirai_check_box_widget/mirai_check_box_widget.dart @@ -1,6 +1,8 @@ import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:mirai/src/parsers/mirai_material_color/mirai_material_color.dart'; +export 'package:mirai/src/parsers/mirai_check_box_widget/mirai_check_box_widget_parser.dart'; + part 'mirai_check_box_widget.freezed.dart'; part 'mirai_check_box_widget.g.dart'; diff --git a/packages/mirai/lib/src/parsers/mirai_form/mirai_form.dart b/packages/mirai/lib/src/parsers/mirai_form/mirai_form.dart index af09e6d3..14ff52e9 100644 --- a/packages/mirai/lib/src/parsers/mirai_form/mirai_form.dart +++ b/packages/mirai/lib/src/parsers/mirai_form/mirai_form.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; -export 'package:mirai/src/parsers/mirai_form/mirai_form.dart'; +export 'package:mirai/src/parsers/mirai_form/mirai_form_parser.dart'; part 'mirai_form.freezed.dart'; part 'mirai_form.g.dart'; diff --git a/packages/mirai/lib/src/parsers/mirai_form_field/mirai_form_field.dart b/packages/mirai/lib/src/parsers/mirai_form_field/mirai_form_field.dart index 5d04cbca..d42b8af6 100644 --- a/packages/mirai/lib/src/parsers/mirai_form_field/mirai_form_field.dart +++ b/packages/mirai/lib/src/parsers/mirai_form_field/mirai_form_field.dart @@ -1,5 +1,7 @@ import 'package:freezed_annotation/freezed_annotation.dart'; +export 'package:mirai/src/parsers/mirai_form_field/mirai_form_field_parser.dart'; + part 'mirai_form_field.freezed.dart'; part 'mirai_form_field.g.dart'; diff --git a/packages/mirai/lib/src/parsers/mirai_fractionally_sized_box/mirai_fractionally_sized_box.dart b/packages/mirai/lib/src/parsers/mirai_fractionally_sized_box/mirai_fractionally_sized_box.dart index cd1be2e7..1d40b952 100644 --- a/packages/mirai/lib/src/parsers/mirai_fractionally_sized_box/mirai_fractionally_sized_box.dart +++ b/packages/mirai/lib/src/parsers/mirai_fractionally_sized_box/mirai_fractionally_sized_box.dart @@ -1,7 +1,7 @@ import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:mirai/mirai.dart'; -export 'package:mirai/src/parsers/mirai_sized_box/mirai_sized_box_parser.dart'; +export 'package:mirai/src/parsers/mirai_fractionally_sized_box/mirai_fractionally_sized_box_parser.dart'; part 'mirai_fractionally_sized_box.freezed.dart'; part 'mirai_fractionally_sized_box.g.dart'; diff --git a/packages/mirai/lib/src/parsers/mirai_refresh_indicator/mirai_refresh_indicator_parser.dart b/packages/mirai/lib/src/parsers/mirai_refresh_indicator/mirai_refresh_indicator_parser.dart index 726da9f9..5ce449ea 100644 --- a/packages/mirai/lib/src/parsers/mirai_refresh_indicator/mirai_refresh_indicator_parser.dart +++ b/packages/mirai/lib/src/parsers/mirai_refresh_indicator/mirai_refresh_indicator_parser.dart @@ -2,9 +2,11 @@ import 'dart:convert'; import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; -import 'package:mirai/mirai.dart'; +import 'package:mirai/src/framework/framework.dart'; import 'package:mirai/src/parsers/mirai_refresh_indicator/mirai_refresh_indicator.dart'; +import 'package:mirai/src/utils/color_utils.dart'; import 'package:mirai/src/utils/widget_type.dart'; +import 'package:mirai_framework/mirai_framework.dart'; class MiraiRefreshIndicatorParser extends MiraiParser { const MiraiRefreshIndicatorParser(); @@ -63,7 +65,7 @@ class _RefreshIndicatorWidgetState extends State<_RefreshIndicatorWidget> { } } }, - color: widget.model.color.toColor(context), + color: widget.model.color?.toColor(context), backgroundColor: widget.model.backgroundColor.toColor(context), semanticsLabel: widget.model.semanticsLabel, semanticsValue: widget.model.semanticsValue, diff --git a/packages/mirai/lib/src/parsers/mirai_switch/mirai_switch.dart b/packages/mirai/lib/src/parsers/mirai_switch/mirai_switch.dart index 9c9a8ae4..e580a744 100644 --- a/packages/mirai/lib/src/parsers/mirai_switch/mirai_switch.dart +++ b/packages/mirai/lib/src/parsers/mirai_switch/mirai_switch.dart @@ -4,6 +4,8 @@ import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:mirai/mirai.dart'; import 'package:mirai/src/parsers/mirai_material_color/mirai_material_color.dart'; +export 'package:mirai/src/parsers/mirai_switch/mirai_switch_parser.dart'; + part 'mirai_switch.freezed.dart'; part 'mirai_switch.g.dart'; diff --git a/packages/mirai/lib/src/parsers/mirai_switch/mirai_switch_parser.dart b/packages/mirai/lib/src/parsers/mirai_switch/mirai_switch_parser.dart index f4d7dde4..d60c1f11 100644 --- a/packages/mirai/lib/src/parsers/mirai_switch/mirai_switch_parser.dart +++ b/packages/mirai/lib/src/parsers/mirai_switch/mirai_switch_parser.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:mirai/mirai.dart'; import 'package:mirai/src/parsers/mirai_switch/mirai_switch.dart'; import 'package:mirai/src/parsers/mirai_switch/widget/mirai_switch_widget.dart'; import 'package:mirai/src/utils/widget_type.dart'; +import 'package:mirai_framework/mirai_framework.dart'; class MiraiSwitchParser extends MiraiParser { const MiraiSwitchParser(); diff --git a/packages/mirai/lib/src/parsers/mirai_switch/widget/mirai_switch_widget.dart b/packages/mirai/lib/src/parsers/mirai_switch/widget/mirai_switch_widget.dart index 8cf34d74..c0c15e9a 100644 --- a/packages/mirai/lib/src/parsers/mirai_switch/widget/mirai_switch_widget.dart +++ b/packages/mirai/lib/src/parsers/mirai_switch/widget/mirai_switch_widget.dart @@ -1,6 +1,6 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:mirai/mirai.dart'; +import 'package:mirai/src/framework/framework.dart'; import 'package:mirai/src/parsers/mirai_material_color/mirai_material_color.dart'; import 'package:mirai/src/parsers/mirai_switch/mirai_switch.dart'; diff --git a/packages/mirai/lib/src/parsers/mirai_tab/mirai_tab.dart b/packages/mirai/lib/src/parsers/mirai_tab/mirai_tab.dart index fef8b8fa..305934e5 100644 --- a/packages/mirai/lib/src/parsers/mirai_tab/mirai_tab.dart +++ b/packages/mirai/lib/src/parsers/mirai_tab/mirai_tab.dart @@ -1,6 +1,8 @@ import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:mirai/src/parsers/mirai_edge_insets/mirai_edge_insets.dart'; +export 'package:mirai/src/parsers/mirai_tab/mirai_tab_parser.dart'; + part 'mirai_tab.freezed.dart'; part 'mirai_tab.g.dart'; diff --git a/packages/mirai/lib/src/parsers/parsers.dart b/packages/mirai/lib/src/parsers/parsers.dart index 20ccab00..6b55a48b 100644 --- a/packages/mirai/lib/src/parsers/parsers.dart +++ b/packages/mirai/lib/src/parsers/parsers.dart @@ -17,6 +17,8 @@ export 'package:mirai/src/parsers/mirai_box_shadow/mirai_box_shadow.dart'; export 'package:mirai/src/parsers/mirai_button_style/mirai_button_style.dart'; export 'package:mirai/src/parsers/mirai_card/mirai_card.dart'; export 'package:mirai/src/parsers/mirai_card_theme_data/mirai_card_theme_data.dart'; +export 'package:mirai/src/parsers/mirai_center/mirai_center.dart'; +export 'package:mirai/src/parsers/mirai_check_box_widget/mirai_check_box_widget.dart'; export 'package:mirai/src/parsers/mirai_column/mirai_column.dart'; export 'package:mirai/src/parsers/mirai_container/mirai_container.dart'; export 'package:mirai/src/parsers/mirai_container_image/mirai_container_image.dart'; @@ -29,6 +31,8 @@ export 'package:mirai/src/parsers/mirai_flexible/mirai_flexible.dart'; export 'package:mirai/src/parsers/mirai_floating_action_button/mirai_floating_action_button.dart'; export 'package:mirai/src/parsers/mirai_floating_action_button_theme_data/mirai_floating_action_button_theme_data.dart'; export 'package:mirai/src/parsers/mirai_form/mirai_form.dart'; +export 'package:mirai/src/parsers/mirai_form_field/mirai_form_field.dart'; +export 'package:mirai/src/parsers/mirai_fractionally_sized_box/mirai_fractionally_sized_box.dart'; export 'package:mirai/src/parsers/mirai_gradient/mirai_gradient.dart'; export 'package:mirai/src/parsers/mirai_icon/mirai_icon.dart'; export 'package:mirai/src/parsers/mirai_icon_button/mirai_icon_button.dart'; @@ -45,13 +49,16 @@ export 'package:mirai/src/parsers/mirai_outlined_button/mirai_outlined_button.da export 'package:mirai/src/parsers/mirai_padding/mirai_padding.dart'; export 'package:mirai/src/parsers/mirai_page_view/mirai_page_view.dart'; export 'package:mirai/src/parsers/mirai_positioned/mirai_positioned.dart'; +export 'package:mirai/src/parsers/mirai_refresh_indicator/mirai_refresh_indicator.dart'; export 'package:mirai/src/parsers/mirai_row/mirai_row.dart'; export 'package:mirai/src/parsers/mirai_safe_area/mirai_safe_area.dart'; export 'package:mirai/src/parsers/mirai_scaffold/mirai_scaffold.dart'; -export 'package:mirai/src/parsers/mirai_scroll_view/mirai_scroll_view.dart'; +export 'package:mirai/src/parsers/mirai_single_child_scroll_view/mirai_single_child_scroll_view.dart'; export 'package:mirai/src/parsers/mirai_size/mirai_size.dart'; export 'package:mirai/src/parsers/mirai_sized_box/mirai_sized_box.dart'; export 'package:mirai/src/parsers/mirai_stack/mirai_stack.dart'; +export 'package:mirai/src/parsers/mirai_switch/mirai_switch.dart'; +export 'package:mirai/src/parsers/mirai_tab/mirai_tab.dart'; export 'package:mirai/src/parsers/mirai_tab_bar/mirai_tab_bar.dart'; export 'package:mirai/src/parsers/mirai_tab_bar_theme_data/mirai_tab_bar_theme_data.dart'; export 'package:mirai/src/parsers/mirai_tab_bar_view/mirai_tab_bar_view.dart'; diff --git a/packages/mirai/lib/src/utils/widget_type.dart b/packages/mirai/lib/src/utils/widget_type.dart index d9c2e9e4..e28b3f50 100644 --- a/packages/mirai/lib/src/utils/widget_type.dart +++ b/packages/mirai/lib/src/utils/widget_type.dart @@ -28,7 +28,7 @@ enum WidgetType { bottomNavigationBar, listView, defaultTabController, - scrollView, + singleChildScrollView, tab, form, formField,