-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dv/form-builder
Signed-off-by: Divyanshu Bhargava <[email protected]>
- Loading branch information
Showing
10 changed files
with
395 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"type": "scaffold", | ||
"appBar": { | ||
"type": "appBar", | ||
"title": { | ||
"type": "text", | ||
"data": "Align" | ||
} | ||
}, | ||
"body": { | ||
"type": "align", | ||
"alignment": "topEnd", | ||
"child": { | ||
"type": "container", | ||
"color": "#FC5632", | ||
"clipBehavior": "hardEdge", | ||
"height": 250, | ||
"width": 200, | ||
"child": { | ||
"type": "align", | ||
"alignment": "bottomCenter", | ||
"child": { | ||
"type": "text", | ||
"data": "Flutter", | ||
"style": { | ||
"fontSize": 23, | ||
"fontWeight": "w600" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
packages/mirai/lib/src/parsers/mirai_align/mirai_align.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
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'; | ||
|
||
part 'mirai_align.freezed.dart'; | ||
part 'mirai_align.g.dart'; | ||
|
||
@freezed | ||
class MiraiAlign with _$MiraiAlign { | ||
const factory MiraiAlign({ | ||
@Default(MiraiAlignmentDirectional.center) | ||
MiraiAlignmentDirectional alignment, | ||
double? widthFactor, | ||
double? heightFactor, | ||
Map<String, dynamic>? child, | ||
}) = _MiraiAlign; | ||
|
||
factory MiraiAlign.fromJson(Map<String, dynamic> json) => | ||
_$MiraiAlignFromJson(json); | ||
} |
228 changes: 228 additions & 0 deletions
228
packages/mirai/lib/src/parsers/mirai_align/mirai_align.freezed.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,228 @@ | ||
// coverage:ignore-file | ||
// GENERATED CODE - DO NOT MODIFY BY HAND | ||
// 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_align.dart'; | ||
|
||
// ************************************************************************** | ||
// FreezedGenerator | ||
// ************************************************************************** | ||
|
||
T _$identity<T>(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#custom-getters-and-methods'); | ||
|
||
MiraiAlign _$MiraiAlignFromJson(Map<String, dynamic> json) { | ||
return _MiraiAlign.fromJson(json); | ||
} | ||
|
||
/// @nodoc | ||
mixin _$MiraiAlign { | ||
MiraiAlignmentDirectional get alignment => throw _privateConstructorUsedError; | ||
double? get widthFactor => throw _privateConstructorUsedError; | ||
double? get heightFactor => throw _privateConstructorUsedError; | ||
Map<String, dynamic>? get child => throw _privateConstructorUsedError; | ||
|
||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; | ||
@JsonKey(ignore: true) | ||
$MiraiAlignCopyWith<MiraiAlign> get copyWith => | ||
throw _privateConstructorUsedError; | ||
} | ||
|
||
/// @nodoc | ||
abstract class $MiraiAlignCopyWith<$Res> { | ||
factory $MiraiAlignCopyWith( | ||
MiraiAlign value, $Res Function(MiraiAlign) then) = | ||
_$MiraiAlignCopyWithImpl<$Res, MiraiAlign>; | ||
@useResult | ||
$Res call( | ||
{MiraiAlignmentDirectional alignment, | ||
double? widthFactor, | ||
double? heightFactor, | ||
Map<String, dynamic>? child}); | ||
} | ||
|
||
/// @nodoc | ||
class _$MiraiAlignCopyWithImpl<$Res, $Val extends MiraiAlign> | ||
implements $MiraiAlignCopyWith<$Res> { | ||
_$MiraiAlignCopyWithImpl(this._value, this._then); | ||
|
||
// ignore: unused_field | ||
final $Val _value; | ||
// ignore: unused_field | ||
final $Res Function($Val) _then; | ||
|
||
@pragma('vm:prefer-inline') | ||
@override | ||
$Res call({ | ||
Object? alignment = null, | ||
Object? widthFactor = freezed, | ||
Object? heightFactor = freezed, | ||
Object? child = freezed, | ||
}) { | ||
return _then(_value.copyWith( | ||
alignment: null == alignment | ||
? _value.alignment | ||
: alignment // ignore: cast_nullable_to_non_nullable | ||
as MiraiAlignmentDirectional, | ||
widthFactor: freezed == widthFactor | ||
? _value.widthFactor | ||
: widthFactor // ignore: cast_nullable_to_non_nullable | ||
as double?, | ||
heightFactor: freezed == heightFactor | ||
? _value.heightFactor | ||
: heightFactor // ignore: cast_nullable_to_non_nullable | ||
as double?, | ||
child: freezed == child | ||
? _value.child | ||
: child // ignore: cast_nullable_to_non_nullable | ||
as Map<String, dynamic>?, | ||
) as $Val); | ||
} | ||
} | ||
|
||
/// @nodoc | ||
abstract class _$$MiraiAlignImplCopyWith<$Res> | ||
implements $MiraiAlignCopyWith<$Res> { | ||
factory _$$MiraiAlignImplCopyWith( | ||
_$MiraiAlignImpl value, $Res Function(_$MiraiAlignImpl) then) = | ||
__$$MiraiAlignImplCopyWithImpl<$Res>; | ||
@override | ||
@useResult | ||
$Res call( | ||
{MiraiAlignmentDirectional alignment, | ||
double? widthFactor, | ||
double? heightFactor, | ||
Map<String, dynamic>? child}); | ||
} | ||
|
||
/// @nodoc | ||
class __$$MiraiAlignImplCopyWithImpl<$Res> | ||
extends _$MiraiAlignCopyWithImpl<$Res, _$MiraiAlignImpl> | ||
implements _$$MiraiAlignImplCopyWith<$Res> { | ||
__$$MiraiAlignImplCopyWithImpl( | ||
_$MiraiAlignImpl _value, $Res Function(_$MiraiAlignImpl) _then) | ||
: super(_value, _then); | ||
|
||
@pragma('vm:prefer-inline') | ||
@override | ||
$Res call({ | ||
Object? alignment = null, | ||
Object? widthFactor = freezed, | ||
Object? heightFactor = freezed, | ||
Object? child = freezed, | ||
}) { | ||
return _then(_$MiraiAlignImpl( | ||
alignment: null == alignment | ||
? _value.alignment | ||
: alignment // ignore: cast_nullable_to_non_nullable | ||
as MiraiAlignmentDirectional, | ||
widthFactor: freezed == widthFactor | ||
? _value.widthFactor | ||
: widthFactor // ignore: cast_nullable_to_non_nullable | ||
as double?, | ||
heightFactor: freezed == heightFactor | ||
? _value.heightFactor | ||
: heightFactor // ignore: cast_nullable_to_non_nullable | ||
as double?, | ||
child: freezed == child | ||
? _value._child | ||
: child // ignore: cast_nullable_to_non_nullable | ||
as Map<String, dynamic>?, | ||
)); | ||
} | ||
} | ||
|
||
/// @nodoc | ||
@JsonSerializable() | ||
class _$MiraiAlignImpl implements _MiraiAlign { | ||
const _$MiraiAlignImpl( | ||
{this.alignment = MiraiAlignmentDirectional.center, | ||
this.widthFactor, | ||
this.heightFactor, | ||
final Map<String, dynamic>? child}) | ||
: _child = child; | ||
|
||
factory _$MiraiAlignImpl.fromJson(Map<String, dynamic> json) => | ||
_$$MiraiAlignImplFromJson(json); | ||
|
||
@override | ||
@JsonKey() | ||
final MiraiAlignmentDirectional alignment; | ||
@override | ||
final double? widthFactor; | ||
@override | ||
final double? heightFactor; | ||
final Map<String, dynamic>? _child; | ||
@override | ||
Map<String, dynamic>? get child { | ||
final value = _child; | ||
if (value == null) return null; | ||
if (_child is EqualUnmodifiableMapView) return _child; | ||
// ignore: implicit_dynamic_type | ||
return EqualUnmodifiableMapView(value); | ||
} | ||
|
||
@override | ||
String toString() { | ||
return 'MiraiAlign(alignment: $alignment, widthFactor: $widthFactor, heightFactor: $heightFactor, child: $child)'; | ||
} | ||
|
||
@override | ||
bool operator ==(dynamic other) { | ||
return identical(this, other) || | ||
(other.runtimeType == runtimeType && | ||
other is _$MiraiAlignImpl && | ||
(identical(other.alignment, alignment) || | ||
other.alignment == alignment) && | ||
(identical(other.widthFactor, widthFactor) || | ||
other.widthFactor == widthFactor) && | ||
(identical(other.heightFactor, heightFactor) || | ||
other.heightFactor == heightFactor) && | ||
const DeepCollectionEquality().equals(other._child, _child)); | ||
} | ||
|
||
@JsonKey(ignore: true) | ||
@override | ||
int get hashCode => Object.hash(runtimeType, alignment, widthFactor, | ||
heightFactor, const DeepCollectionEquality().hash(_child)); | ||
|
||
@JsonKey(ignore: true) | ||
@override | ||
@pragma('vm:prefer-inline') | ||
_$$MiraiAlignImplCopyWith<_$MiraiAlignImpl> get copyWith => | ||
__$$MiraiAlignImplCopyWithImpl<_$MiraiAlignImpl>(this, _$identity); | ||
|
||
@override | ||
Map<String, dynamic> toJson() { | ||
return _$$MiraiAlignImplToJson( | ||
this, | ||
); | ||
} | ||
} | ||
|
||
abstract class _MiraiAlign implements MiraiAlign { | ||
const factory _MiraiAlign( | ||
{final MiraiAlignmentDirectional alignment, | ||
final double? widthFactor, | ||
final double? heightFactor, | ||
final Map<String, dynamic>? child}) = _$MiraiAlignImpl; | ||
|
||
factory _MiraiAlign.fromJson(Map<String, dynamic> json) = | ||
_$MiraiAlignImpl.fromJson; | ||
|
||
@override | ||
MiraiAlignmentDirectional get alignment; | ||
@override | ||
double? get widthFactor; | ||
@override | ||
double? get heightFactor; | ||
@override | ||
Map<String, dynamic>? get child; | ||
@override | ||
@JsonKey(ignore: true) | ||
_$$MiraiAlignImplCopyWith<_$MiraiAlignImpl> get copyWith => | ||
throw _privateConstructorUsedError; | ||
} |
Oops, something went wrong.