mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-14 17:55:58 -07:00
chore: Shortcuts improvements (#446)
Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
d0d6a2ffa6
commit
70e346b8a2
15 changed files with 481 additions and 198 deletions
|
|
@ -20,38 +20,173 @@ KeyCombination _$KeyCombinationFromJson(Map<String, dynamic> json) {
|
|||
|
||||
/// @nodoc
|
||||
mixin _$KeyCombination {
|
||||
@LogicalKeyboardSerializer()
|
||||
LogicalKeyboardKey? get key => throw _privateConstructorUsedError;
|
||||
@LogicalKeyboardSerializer()
|
||||
LogicalKeyboardKey? get modifier => throw _privateConstructorUsedError;
|
||||
@LogicalKeyboardSerializer()
|
||||
LogicalKeyboardKey get key => throw _privateConstructorUsedError;
|
||||
LogicalKeyboardKey? get altKey => throw _privateConstructorUsedError;
|
||||
@LogicalKeyboardSerializer()
|
||||
LogicalKeyboardKey? get altModifier => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this KeyCombination to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of KeyCombination
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$KeyCombinationCopyWith<KeyCombination> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $KeyCombinationCopyWith<$Res> {
|
||||
factory $KeyCombinationCopyWith(
|
||||
KeyCombination value, $Res Function(KeyCombination) then) =
|
||||
_$KeyCombinationCopyWithImpl<$Res, KeyCombination>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{@LogicalKeyboardSerializer() LogicalKeyboardKey? key,
|
||||
@LogicalKeyboardSerializer() LogicalKeyboardKey? modifier,
|
||||
@LogicalKeyboardSerializer() LogicalKeyboardKey? altKey,
|
||||
@LogicalKeyboardSerializer() LogicalKeyboardKey? altModifier});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$KeyCombinationCopyWithImpl<$Res, $Val extends KeyCombination>
|
||||
implements $KeyCombinationCopyWith<$Res> {
|
||||
_$KeyCombinationCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of KeyCombination
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? key = freezed,
|
||||
Object? modifier = freezed,
|
||||
Object? altKey = freezed,
|
||||
Object? altModifier = freezed,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
key: freezed == key
|
||||
? _value.key
|
||||
: key // ignore: cast_nullable_to_non_nullable
|
||||
as LogicalKeyboardKey?,
|
||||
modifier: freezed == modifier
|
||||
? _value.modifier
|
||||
: modifier // ignore: cast_nullable_to_non_nullable
|
||||
as LogicalKeyboardKey?,
|
||||
altKey: freezed == altKey
|
||||
? _value.altKey
|
||||
: altKey // ignore: cast_nullable_to_non_nullable
|
||||
as LogicalKeyboardKey?,
|
||||
altModifier: freezed == altModifier
|
||||
? _value.altModifier
|
||||
: altModifier // ignore: cast_nullable_to_non_nullable
|
||||
as LogicalKeyboardKey?,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$KeyCombinationImplCopyWith<$Res>
|
||||
implements $KeyCombinationCopyWith<$Res> {
|
||||
factory _$$KeyCombinationImplCopyWith(_$KeyCombinationImpl value,
|
||||
$Res Function(_$KeyCombinationImpl) then) =
|
||||
__$$KeyCombinationImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{@LogicalKeyboardSerializer() LogicalKeyboardKey? key,
|
||||
@LogicalKeyboardSerializer() LogicalKeyboardKey? modifier,
|
||||
@LogicalKeyboardSerializer() LogicalKeyboardKey? altKey,
|
||||
@LogicalKeyboardSerializer() LogicalKeyboardKey? altModifier});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$KeyCombinationImplCopyWithImpl<$Res>
|
||||
extends _$KeyCombinationCopyWithImpl<$Res, _$KeyCombinationImpl>
|
||||
implements _$$KeyCombinationImplCopyWith<$Res> {
|
||||
__$$KeyCombinationImplCopyWithImpl(
|
||||
_$KeyCombinationImpl _value, $Res Function(_$KeyCombinationImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of KeyCombination
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? key = freezed,
|
||||
Object? modifier = freezed,
|
||||
Object? altKey = freezed,
|
||||
Object? altModifier = freezed,
|
||||
}) {
|
||||
return _then(_$KeyCombinationImpl(
|
||||
key: freezed == key
|
||||
? _value.key
|
||||
: key // ignore: cast_nullable_to_non_nullable
|
||||
as LogicalKeyboardKey?,
|
||||
modifier: freezed == modifier
|
||||
? _value.modifier
|
||||
: modifier // ignore: cast_nullable_to_non_nullable
|
||||
as LogicalKeyboardKey?,
|
||||
altKey: freezed == altKey
|
||||
? _value.altKey
|
||||
: altKey // ignore: cast_nullable_to_non_nullable
|
||||
as LogicalKeyboardKey?,
|
||||
altModifier: freezed == altModifier
|
||||
? _value.altModifier
|
||||
: altModifier // ignore: cast_nullable_to_non_nullable
|
||||
as LogicalKeyboardKey?,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$KeyCombinationImpl extends _KeyCombination {
|
||||
_$KeyCombinationImpl(
|
||||
{@LogicalKeyboardSerializer() this.modifier,
|
||||
@LogicalKeyboardSerializer() required this.key})
|
||||
{@LogicalKeyboardSerializer() this.key,
|
||||
@LogicalKeyboardSerializer() this.modifier,
|
||||
@LogicalKeyboardSerializer() this.altKey,
|
||||
@LogicalKeyboardSerializer() this.altModifier})
|
||||
: super._();
|
||||
|
||||
factory _$KeyCombinationImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$KeyCombinationImplFromJson(json);
|
||||
|
||||
@override
|
||||
@LogicalKeyboardSerializer()
|
||||
final LogicalKeyboardKey? key;
|
||||
@override
|
||||
@LogicalKeyboardSerializer()
|
||||
final LogicalKeyboardKey? modifier;
|
||||
@override
|
||||
@LogicalKeyboardSerializer()
|
||||
final LogicalKeyboardKey key;
|
||||
final LogicalKeyboardKey? altKey;
|
||||
@override
|
||||
@LogicalKeyboardSerializer()
|
||||
final LogicalKeyboardKey? altModifier;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'KeyCombination(modifier: $modifier, key: $key)';
|
||||
return 'KeyCombination(key: $key, modifier: $modifier, altKey: $altKey, altModifier: $altModifier)';
|
||||
}
|
||||
|
||||
/// Create a copy of KeyCombination
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$KeyCombinationImplCopyWith<_$KeyCombinationImpl> get copyWith =>
|
||||
__$$KeyCombinationImplCopyWithImpl<_$KeyCombinationImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$KeyCombinationImplToJson(
|
||||
|
|
@ -62,18 +197,33 @@ class _$KeyCombinationImpl extends _KeyCombination {
|
|||
|
||||
abstract class _KeyCombination extends KeyCombination {
|
||||
factory _KeyCombination(
|
||||
{@LogicalKeyboardSerializer() final LogicalKeyboardKey? modifier,
|
||||
@LogicalKeyboardSerializer() required final LogicalKeyboardKey key}) =
|
||||
{@LogicalKeyboardSerializer() final LogicalKeyboardKey? key,
|
||||
@LogicalKeyboardSerializer() final LogicalKeyboardKey? modifier,
|
||||
@LogicalKeyboardSerializer() final LogicalKeyboardKey? altKey,
|
||||
@LogicalKeyboardSerializer() final LogicalKeyboardKey? altModifier}) =
|
||||
_$KeyCombinationImpl;
|
||||
_KeyCombination._() : super._();
|
||||
|
||||
factory _KeyCombination.fromJson(Map<String, dynamic> json) =
|
||||
_$KeyCombinationImpl.fromJson;
|
||||
|
||||
@override
|
||||
@LogicalKeyboardSerializer()
|
||||
LogicalKeyboardKey? get key;
|
||||
@override
|
||||
@LogicalKeyboardSerializer()
|
||||
LogicalKeyboardKey? get modifier;
|
||||
@override
|
||||
@LogicalKeyboardSerializer()
|
||||
LogicalKeyboardKey get key;
|
||||
LogicalKeyboardKey? get altKey;
|
||||
@override
|
||||
@LogicalKeyboardSerializer()
|
||||
LogicalKeyboardKey? get altModifier;
|
||||
|
||||
/// Create a copy of KeyCombination
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$KeyCombinationImplCopyWith<_$KeyCombinationImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue