Skip to content

Commit

Permalink
Merge branch 'main' into asim/mirai_web3
Browse files Browse the repository at this point in the history
  • Loading branch information
divyanshub024 authored Feb 8, 2024
2 parents 61b6162 + 2453e70 commit 93e6272
Show file tree
Hide file tree
Showing 17 changed files with 576 additions and 353 deletions.
2 changes: 2 additions & 0 deletions packages/mirai/lib/src/framework/mirai.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import 'package:mirai/src/parsers/mirai_check_box_widget/mirai_check_box_widget_
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_network_widget/mirai_network_widget_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';
Expand Down Expand Up @@ -69,6 +70,7 @@ class Mirai {
const MiraiSwitchParser(),
const MiraiAlignParser(),
const MiraiPageViewParser(),
const MiraiNetworkWidgetParser(),
];

static final _actionParsers = <MiraiActionParser>[
Expand Down
42 changes: 21 additions & 21 deletions packages/mirai/lib/src/parsers/mirai_align/mirai_align.freezed.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ class _$MiraiAlignCopyWithImpl<$Res, $Val extends MiraiAlign>
}

/// @nodoc
abstract class _$$MiraiAlignImplCopyWith<$Res>
abstract class _$$_MiraiAlignCopyWith<$Res>
implements $MiraiAlignCopyWith<$Res> {
factory _$$MiraiAlignImplCopyWith(
_$MiraiAlignImpl value, $Res Function(_$MiraiAlignImpl) then) =
__$$MiraiAlignImplCopyWithImpl<$Res>;
factory _$$_MiraiAlignCopyWith(
_$_MiraiAlign value, $Res Function(_$_MiraiAlign) then) =
__$$_MiraiAlignCopyWithImpl<$Res>;
@override
@useResult
$Res call(
Expand All @@ -99,11 +99,11 @@ abstract class _$$MiraiAlignImplCopyWith<$Res>
}

/// @nodoc
class __$$MiraiAlignImplCopyWithImpl<$Res>
extends _$MiraiAlignCopyWithImpl<$Res, _$MiraiAlignImpl>
implements _$$MiraiAlignImplCopyWith<$Res> {
__$$MiraiAlignImplCopyWithImpl(
_$MiraiAlignImpl _value, $Res Function(_$MiraiAlignImpl) _then)
class __$$_MiraiAlignCopyWithImpl<$Res>
extends _$MiraiAlignCopyWithImpl<$Res, _$_MiraiAlign>
implements _$$_MiraiAlignCopyWith<$Res> {
__$$_MiraiAlignCopyWithImpl(
_$_MiraiAlign _value, $Res Function(_$_MiraiAlign) _then)
: super(_value, _then);

@pragma('vm:prefer-inline')
Expand All @@ -114,7 +114,7 @@ class __$$MiraiAlignImplCopyWithImpl<$Res>
Object? heightFactor = freezed,
Object? child = freezed,
}) {
return _then(_$MiraiAlignImpl(
return _then(_$_MiraiAlign(
alignment: null == alignment
? _value.alignment
: alignment // ignore: cast_nullable_to_non_nullable
Expand All @@ -137,16 +137,16 @@ class __$$MiraiAlignImplCopyWithImpl<$Res>

/// @nodoc
@JsonSerializable()
class _$MiraiAlignImpl implements _MiraiAlign {
const _$MiraiAlignImpl(
class _$_MiraiAlign implements _MiraiAlign {
const _$_MiraiAlign(
{this.alignment = MiraiAlignmentDirectional.center,
this.widthFactor,
this.heightFactor,
final Map<String, dynamic>? child})
: _child = child;

factory _$MiraiAlignImpl.fromJson(Map<String, dynamic> json) =>
_$$MiraiAlignImplFromJson(json);
factory _$_MiraiAlign.fromJson(Map<String, dynamic> json) =>
_$$_MiraiAlignFromJson(json);

@override
@JsonKey()
Expand Down Expand Up @@ -174,7 +174,7 @@ class _$MiraiAlignImpl implements _MiraiAlign {
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$MiraiAlignImpl &&
other is _$_MiraiAlign &&
(identical(other.alignment, alignment) ||
other.alignment == alignment) &&
(identical(other.widthFactor, widthFactor) ||
Expand All @@ -192,12 +192,12 @@ class _$MiraiAlignImpl implements _MiraiAlign {
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$MiraiAlignImplCopyWith<_$MiraiAlignImpl> get copyWith =>
__$$MiraiAlignImplCopyWithImpl<_$MiraiAlignImpl>(this, _$identity);
_$$_MiraiAlignCopyWith<_$_MiraiAlign> get copyWith =>
__$$_MiraiAlignCopyWithImpl<_$_MiraiAlign>(this, _$identity);

@override
Map<String, dynamic> toJson() {
return _$$MiraiAlignImplToJson(
return _$$_MiraiAlignToJson(
this,
);
}
Expand All @@ -208,10 +208,10 @@ abstract class _MiraiAlign implements MiraiAlign {
{final MiraiAlignmentDirectional alignment,
final double? widthFactor,
final double? heightFactor,
final Map<String, dynamic>? child}) = _$MiraiAlignImpl;
final Map<String, dynamic>? child}) = _$_MiraiAlign;

factory _MiraiAlign.fromJson(Map<String, dynamic> json) =
_$MiraiAlignImpl.fromJson;
_$_MiraiAlign.fromJson;

@override
MiraiAlignmentDirectional get alignment;
Expand All @@ -223,6 +223,6 @@ abstract class _MiraiAlign implements MiraiAlign {
Map<String, dynamic>? get child;
@override
@JsonKey(ignore: true)
_$$MiraiAlignImplCopyWith<_$MiraiAlignImpl> get copyWith =>
_$$_MiraiAlignCopyWith<_$_MiraiAlign> get copyWith =>
throw _privateConstructorUsedError;
}
6 changes: 3 additions & 3 deletions packages/mirai/lib/src/parsers/mirai_align/mirai_align.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -68,22 +68,22 @@ class _$MiraiExpandedCopyWithImpl<$Res, $Val extends MiraiExpanded>
}

/// @nodoc
abstract class _$$MiraiExpandedImplCopyWith<$Res>
abstract class _$$_MiraiExpandedCopyWith<$Res>
implements $MiraiExpandedCopyWith<$Res> {
factory _$$MiraiExpandedImplCopyWith(
_$MiraiExpandedImpl value, $Res Function(_$MiraiExpandedImpl) then) =
__$$MiraiExpandedImplCopyWithImpl<$Res>;
factory _$$_MiraiExpandedCopyWith(
_$_MiraiExpanded value, $Res Function(_$_MiraiExpanded) then) =
__$$_MiraiExpandedCopyWithImpl<$Res>;
@override
@useResult
$Res call({int flex, Map<String, dynamic>? child});
}

/// @nodoc
class __$$MiraiExpandedImplCopyWithImpl<$Res>
extends _$MiraiExpandedCopyWithImpl<$Res, _$MiraiExpandedImpl>
implements _$$MiraiExpandedImplCopyWith<$Res> {
__$$MiraiExpandedImplCopyWithImpl(
_$MiraiExpandedImpl _value, $Res Function(_$MiraiExpandedImpl) _then)
class __$$_MiraiExpandedCopyWithImpl<$Res>
extends _$MiraiExpandedCopyWithImpl<$Res, _$_MiraiExpanded>
implements _$$_MiraiExpandedCopyWith<$Res> {
__$$_MiraiExpandedCopyWithImpl(
_$_MiraiExpanded _value, $Res Function(_$_MiraiExpanded) _then)
: super(_value, _then);

@pragma('vm:prefer-inline')
Expand All @@ -92,7 +92,7 @@ class __$$MiraiExpandedImplCopyWithImpl<$Res>
Object? flex = null,
Object? child = freezed,
}) {
return _then(_$MiraiExpandedImpl(
return _then(_$_MiraiExpanded(
flex: null == flex
? _value.flex
: flex // ignore: cast_nullable_to_non_nullable
Expand All @@ -107,12 +107,12 @@ class __$$MiraiExpandedImplCopyWithImpl<$Res>

/// @nodoc
@JsonSerializable()
class _$MiraiExpandedImpl implements _MiraiExpanded {
const _$MiraiExpandedImpl({this.flex = 1, final Map<String, dynamic>? child})
class _$_MiraiExpanded implements _MiraiExpanded {
const _$_MiraiExpanded({this.flex = 1, final Map<String, dynamic>? child})
: _child = child;

factory _$MiraiExpandedImpl.fromJson(Map<String, dynamic> json) =>
_$$MiraiExpandedImplFromJson(json);
factory _$_MiraiExpanded.fromJson(Map<String, dynamic> json) =>
_$$_MiraiExpandedFromJson(json);

@override
@JsonKey()
Expand All @@ -136,7 +136,7 @@ class _$MiraiExpandedImpl implements _MiraiExpanded {
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$MiraiExpandedImpl &&
other is _$_MiraiExpanded &&
(identical(other.flex, flex) || other.flex == flex) &&
const DeepCollectionEquality().equals(other._child, _child));
}
Expand All @@ -149,31 +149,30 @@ class _$MiraiExpandedImpl implements _MiraiExpanded {
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$MiraiExpandedImplCopyWith<_$MiraiExpandedImpl> get copyWith =>
__$$MiraiExpandedImplCopyWithImpl<_$MiraiExpandedImpl>(this, _$identity);
_$$_MiraiExpandedCopyWith<_$_MiraiExpanded> get copyWith =>
__$$_MiraiExpandedCopyWithImpl<_$_MiraiExpanded>(this, _$identity);

@override
Map<String, dynamic> toJson() {
return _$$MiraiExpandedImplToJson(
return _$$_MiraiExpandedToJson(
this,
);
}
}

abstract class _MiraiExpanded implements MiraiExpanded {
const factory _MiraiExpanded(
{final int flex,
final Map<String, dynamic>? child}) = _$MiraiExpandedImpl;
{final int flex, final Map<String, dynamic>? child}) = _$_MiraiExpanded;

factory _MiraiExpanded.fromJson(Map<String, dynamic> json) =
_$MiraiExpandedImpl.fromJson;
_$_MiraiExpanded.fromJson;

@override
int get flex;
@override
Map<String, dynamic>? get child;
@override
@JsonKey(ignore: true)
_$$MiraiExpandedImplCopyWith<_$MiraiExpandedImpl> get copyWith =>
_$$_MiraiExpandedCopyWith<_$_MiraiExpanded> get copyWith =>
throw _privateConstructorUsedError;
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:mirai/mirai.dart';

export 'mirai_network_widget_parser.dart';

part 'mirai_network_widget.freezed.dart';
part 'mirai_network_widget.g.dart';

@freezed
class MiraiNetworkWidget with _$MiraiNetworkWidget {
const factory MiraiNetworkWidget({
required MiraiRequest request,
}) = _MiraiNetworkWidget;

factory MiraiNetworkWidget.fromJson(Map<String, dynamic> json) =>
_$MiraiNetworkWidgetFromJson(json);
}
Loading

0 comments on commit 93e6272

Please sign in to comment.