diff --git a/examples/stac_gallery/assets/json/image_example.json b/examples/stac_gallery/assets/json/image_example.json index c340c887..a8ef0ba9 100644 --- a/examples/stac_gallery/assets/json/image_example.json +++ b/examples/stac_gallery/assets/json/image_example.json @@ -29,9 +29,16 @@ "crossAxisAlignment": "center", "children": [ { - "type": "image", - "src": "https://images.pexels.com/photos/15113967/pexels-photo-15113967.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2", - "height": 150 + "type": "gestureDetector", + "child": { + "type": "image", + "src": "https://images.pexels.com/photos/15113967/pexels-photo-15113967.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2", + "height": 150 + }, + "onTap": { + "actionType": "navigate", + "assetPath": "assets/json/form_example.json" + } }, { "type": "sizedBox", diff --git a/packages/stac/lib/src/framework/stac.dart b/packages/stac/lib/src/framework/stac.dart index 14119e09..240dcf30 100644 --- a/packages/stac/lib/src/framework/stac.dart +++ b/packages/stac/lib/src/framework/stac.dart @@ -98,6 +98,7 @@ class Stac { const StacDynamicViewParser(), const StacDropdownMenuParser(), const StacClipRRectParser(), + const StacGestureDetectorParser(), ]; static final _actionParsers = [ diff --git a/packages/stac/lib/src/parsers/widgets/stac_gesture_detector/stac_gesture_detector.dart b/packages/stac/lib/src/parsers/widgets/stac_gesture_detector/stac_gesture_detector.dart new file mode 100644 index 00000000..d142455d --- /dev/null +++ b/packages/stac/lib/src/parsers/widgets/stac_gesture_detector/stac_gesture_detector.dart @@ -0,0 +1,68 @@ +import 'package:flutter/gestures.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; + +export 'stac_gesture_detector_parser.dart'; + +part 'stac_gesture_detector.freezed.dart'; +part 'stac_gesture_detector.g.dart'; + +@freezed +abstract class StacGestureDetector with _$StacGestureDetector { + const factory StacGestureDetector({ + Map? child, + Map? onTapDown, + Map? onTapUp, + Map? onTap, + Map? onTapCancel, + Map? onSecondaryTap, + Map? onSecondaryTapDown, + Map? onSecondaryTapUp, + Map? onSecondaryTapCancel, + Map? onTertiaryTapDown, + Map? onTertiaryTapUp, + Map? onTertiaryTapCancel, + Map? onDoubleTapDown, + Map? onDoubleTap, + Map? onDoubleTapCancel, + Map? onLongPressDown, + Map? onLongPressCancel, + Map? onLongPress, + Map? onLongPressStart, + Map? onLongPressMoveUpdate, + Map? onLongPressUp, + Map? onLongPressEnd, + Map? onSecondaryLongPressDown, + Map? onSecondaryLongPressCancel, + Map? onSecondaryLongPress, + Map? onSecondaryLongPressStart, + Map? onSecondaryLongPressMoveUpdate, + Map? onSecondaryLongPressUp, + Map? onSecondaryLongPressEnd, + Map? onTertiaryLongPressDown, + Map? onTertiaryLongPressCancel, + Map? onTertiaryLongPress, + Map? onTertiaryLongPressStart, + Map? onTertiaryLongPressMoveUpdate, + Map? onTertiaryLongPressUp, + Map? onTertiaryLongPressEnd, + Map? onVerticalDragDown, + Map? onVerticalDragStart, + Map? onVerticalDragUpdate, + Map? onVerticalDragEnd, + Map? onVerticalDragCancel, + Map? onHorizontalDragDown, + Map? onHorizontalDragStart, + Map? onHorizontalDragUpdate, + Map? onHorizontalDragEnd, + Map? onHorizontalDragCancel, + Map? onForcePressStart, + Map? onForcePressPeak, + Map? onForcePressUpdate, + Map? onForcePressEnd, + @Default(false) bool excludeFromSemantics, + @Default(DragStartBehavior.start) DragStartBehavior dragStartBehavior, + }) = _StacGestureDetector; + + factory StacGestureDetector.fromJson(Map json) => + _$StacGestureDetectorFromJson(json); +} diff --git a/packages/stac/lib/src/parsers/widgets/stac_gesture_detector/stac_gesture_detector.freezed.dart b/packages/stac/lib/src/parsers/widgets/stac_gesture_detector/stac_gesture_detector.freezed.dart new file mode 100644 index 00000000..e8a58e0b --- /dev/null +++ b/packages/stac/lib/src/parsers/widgets/stac_gesture_detector/stac_gesture_detector.freezed.dart @@ -0,0 +1,1757 @@ +// dart format width=80 +// 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 'stac_gesture_detector.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$StacGestureDetector { + Map? get child; + Map? get onTapDown; + Map? get onTapUp; + Map? get onTap; + Map? get onTapCancel; + Map? get onSecondaryTap; + Map? get onSecondaryTapDown; + Map? get onSecondaryTapUp; + Map? get onSecondaryTapCancel; + Map? get onTertiaryTapDown; + Map? get onTertiaryTapUp; + Map? get onTertiaryTapCancel; + Map? get onDoubleTapDown; + Map? get onDoubleTap; + Map? get onDoubleTapCancel; + Map? get onLongPressDown; + Map? get onLongPressCancel; + Map? get onLongPress; + Map? get onLongPressStart; + Map? get onLongPressMoveUpdate; + Map? get onLongPressUp; + Map? get onLongPressEnd; + Map? get onSecondaryLongPressDown; + Map? get onSecondaryLongPressCancel; + Map? get onSecondaryLongPress; + Map? get onSecondaryLongPressStart; + Map? get onSecondaryLongPressMoveUpdate; + Map? get onSecondaryLongPressUp; + Map? get onSecondaryLongPressEnd; + Map? get onTertiaryLongPressDown; + Map? get onTertiaryLongPressCancel; + Map? get onTertiaryLongPress; + Map? get onTertiaryLongPressStart; + Map? get onTertiaryLongPressMoveUpdate; + Map? get onTertiaryLongPressUp; + Map? get onTertiaryLongPressEnd; + Map? get onVerticalDragDown; + Map? get onVerticalDragStart; + Map? get onVerticalDragUpdate; + Map? get onVerticalDragEnd; + Map? get onVerticalDragCancel; + Map? get onHorizontalDragDown; + Map? get onHorizontalDragStart; + Map? get onHorizontalDragUpdate; + Map? get onHorizontalDragEnd; + Map? get onHorizontalDragCancel; + Map? get onForcePressStart; + Map? get onForcePressPeak; + Map? get onForcePressUpdate; + Map? get onForcePressEnd; + bool get excludeFromSemantics; + DragStartBehavior get dragStartBehavior; + + /// Create a copy of StacGestureDetector + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $StacGestureDetectorCopyWith get copyWith => + _$StacGestureDetectorCopyWithImpl( + this as StacGestureDetector, _$identity); + + /// Serializes this StacGestureDetector to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacGestureDetector && + const DeepCollectionEquality().equals(other.child, child) && + const DeepCollectionEquality().equals(other.onTapDown, onTapDown) && + const DeepCollectionEquality().equals(other.onTapUp, onTapUp) && + const DeepCollectionEquality().equals(other.onTap, onTap) && + const DeepCollectionEquality() + .equals(other.onTapCancel, onTapCancel) && + const DeepCollectionEquality() + .equals(other.onSecondaryTap, onSecondaryTap) && + const DeepCollectionEquality() + .equals(other.onSecondaryTapDown, onSecondaryTapDown) && + const DeepCollectionEquality() + .equals(other.onSecondaryTapUp, onSecondaryTapUp) && + const DeepCollectionEquality() + .equals(other.onSecondaryTapCancel, onSecondaryTapCancel) && + const DeepCollectionEquality() + .equals(other.onTertiaryTapDown, onTertiaryTapDown) && + const DeepCollectionEquality() + .equals(other.onTertiaryTapUp, onTertiaryTapUp) && + const DeepCollectionEquality() + .equals(other.onTertiaryTapCancel, onTertiaryTapCancel) && + const DeepCollectionEquality() + .equals(other.onDoubleTapDown, onDoubleTapDown) && + const DeepCollectionEquality() + .equals(other.onDoubleTap, onDoubleTap) && + const DeepCollectionEquality() + .equals(other.onDoubleTapCancel, onDoubleTapCancel) && + const DeepCollectionEquality() + .equals(other.onLongPressDown, onLongPressDown) && + const DeepCollectionEquality() + .equals(other.onLongPressCancel, onLongPressCancel) && + const DeepCollectionEquality() + .equals(other.onLongPress, onLongPress) && + const DeepCollectionEquality() + .equals(other.onLongPressStart, onLongPressStart) && + const DeepCollectionEquality() + .equals(other.onLongPressMoveUpdate, onLongPressMoveUpdate) && + const DeepCollectionEquality() + .equals(other.onLongPressUp, onLongPressUp) && + const DeepCollectionEquality() + .equals(other.onLongPressEnd, onLongPressEnd) && + const DeepCollectionEquality().equals( + other.onSecondaryLongPressDown, onSecondaryLongPressDown) && + const DeepCollectionEquality().equals( + other.onSecondaryLongPressCancel, onSecondaryLongPressCancel) && + const DeepCollectionEquality() + .equals(other.onSecondaryLongPress, onSecondaryLongPress) && + const DeepCollectionEquality().equals( + other.onSecondaryLongPressStart, onSecondaryLongPressStart) && + const DeepCollectionEquality().equals( + other.onSecondaryLongPressMoveUpdate, + onSecondaryLongPressMoveUpdate) && + const DeepCollectionEquality() + .equals(other.onSecondaryLongPressUp, onSecondaryLongPressUp) && + const DeepCollectionEquality().equals( + other.onSecondaryLongPressEnd, onSecondaryLongPressEnd) && + const DeepCollectionEquality().equals( + other.onTertiaryLongPressDown, onTertiaryLongPressDown) && + const DeepCollectionEquality().equals( + other.onTertiaryLongPressCancel, onTertiaryLongPressCancel) && + const DeepCollectionEquality() + .equals(other.onTertiaryLongPress, onTertiaryLongPress) && + const DeepCollectionEquality().equals( + other.onTertiaryLongPressStart, onTertiaryLongPressStart) && + const DeepCollectionEquality().equals( + other.onTertiaryLongPressMoveUpdate, + onTertiaryLongPressMoveUpdate) && + const DeepCollectionEquality() + .equals(other.onTertiaryLongPressUp, onTertiaryLongPressUp) && + const DeepCollectionEquality() + .equals(other.onTertiaryLongPressEnd, onTertiaryLongPressEnd) && + const DeepCollectionEquality() + .equals(other.onVerticalDragDown, onVerticalDragDown) && + const DeepCollectionEquality() + .equals(other.onVerticalDragStart, onVerticalDragStart) && + const DeepCollectionEquality() + .equals(other.onVerticalDragUpdate, onVerticalDragUpdate) && + const DeepCollectionEquality() + .equals(other.onVerticalDragEnd, onVerticalDragEnd) && + const DeepCollectionEquality() + .equals(other.onVerticalDragCancel, onVerticalDragCancel) && + const DeepCollectionEquality() + .equals(other.onHorizontalDragDown, onHorizontalDragDown) && + const DeepCollectionEquality() + .equals(other.onHorizontalDragStart, onHorizontalDragStart) && + const DeepCollectionEquality().equals(other.onHorizontalDragUpdate, onHorizontalDragUpdate) && + const DeepCollectionEquality().equals(other.onHorizontalDragEnd, onHorizontalDragEnd) && + const DeepCollectionEquality().equals(other.onHorizontalDragCancel, onHorizontalDragCancel) && + const DeepCollectionEquality().equals(other.onForcePressStart, onForcePressStart) && + const DeepCollectionEquality().equals(other.onForcePressPeak, onForcePressPeak) && + const DeepCollectionEquality().equals(other.onForcePressUpdate, onForcePressUpdate) && + const DeepCollectionEquality().equals(other.onForcePressEnd, onForcePressEnd) && + (identical(other.excludeFromSemantics, excludeFromSemantics) || other.excludeFromSemantics == excludeFromSemantics) && + (identical(other.dragStartBehavior, dragStartBehavior) || other.dragStartBehavior == dragStartBehavior)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hashAll([ + runtimeType, + const DeepCollectionEquality().hash(child), + const DeepCollectionEquality().hash(onTapDown), + const DeepCollectionEquality().hash(onTapUp), + const DeepCollectionEquality().hash(onTap), + const DeepCollectionEquality().hash(onTapCancel), + const DeepCollectionEquality().hash(onSecondaryTap), + const DeepCollectionEquality().hash(onSecondaryTapDown), + const DeepCollectionEquality().hash(onSecondaryTapUp), + const DeepCollectionEquality().hash(onSecondaryTapCancel), + const DeepCollectionEquality().hash(onTertiaryTapDown), + const DeepCollectionEquality().hash(onTertiaryTapUp), + const DeepCollectionEquality().hash(onTertiaryTapCancel), + const DeepCollectionEquality().hash(onDoubleTapDown), + const DeepCollectionEquality().hash(onDoubleTap), + const DeepCollectionEquality().hash(onDoubleTapCancel), + const DeepCollectionEquality().hash(onLongPressDown), + const DeepCollectionEquality().hash(onLongPressCancel), + const DeepCollectionEquality().hash(onLongPress), + const DeepCollectionEquality().hash(onLongPressStart), + const DeepCollectionEquality().hash(onLongPressMoveUpdate), + const DeepCollectionEquality().hash(onLongPressUp), + const DeepCollectionEquality().hash(onLongPressEnd), + const DeepCollectionEquality().hash(onSecondaryLongPressDown), + const DeepCollectionEquality().hash(onSecondaryLongPressCancel), + const DeepCollectionEquality().hash(onSecondaryLongPress), + const DeepCollectionEquality().hash(onSecondaryLongPressStart), + const DeepCollectionEquality().hash(onSecondaryLongPressMoveUpdate), + const DeepCollectionEquality().hash(onSecondaryLongPressUp), + const DeepCollectionEquality().hash(onSecondaryLongPressEnd), + const DeepCollectionEquality().hash(onTertiaryLongPressDown), + const DeepCollectionEquality().hash(onTertiaryLongPressCancel), + const DeepCollectionEquality().hash(onTertiaryLongPress), + const DeepCollectionEquality().hash(onTertiaryLongPressStart), + const DeepCollectionEquality().hash(onTertiaryLongPressMoveUpdate), + const DeepCollectionEquality().hash(onTertiaryLongPressUp), + const DeepCollectionEquality().hash(onTertiaryLongPressEnd), + const DeepCollectionEquality().hash(onVerticalDragDown), + const DeepCollectionEquality().hash(onVerticalDragStart), + const DeepCollectionEquality().hash(onVerticalDragUpdate), + const DeepCollectionEquality().hash(onVerticalDragEnd), + const DeepCollectionEquality().hash(onVerticalDragCancel), + const DeepCollectionEquality().hash(onHorizontalDragDown), + const DeepCollectionEquality().hash(onHorizontalDragStart), + const DeepCollectionEquality().hash(onHorizontalDragUpdate), + const DeepCollectionEquality().hash(onHorizontalDragEnd), + const DeepCollectionEquality().hash(onHorizontalDragCancel), + const DeepCollectionEquality().hash(onForcePressStart), + const DeepCollectionEquality().hash(onForcePressPeak), + const DeepCollectionEquality().hash(onForcePressUpdate), + const DeepCollectionEquality().hash(onForcePressEnd), + excludeFromSemantics, + dragStartBehavior + ]); + + @override + String toString() { + return 'StacGestureDetector(child: $child, onTapDown: $onTapDown, onTapUp: $onTapUp, onTap: $onTap, onTapCancel: $onTapCancel, onSecondaryTap: $onSecondaryTap, onSecondaryTapDown: $onSecondaryTapDown, onSecondaryTapUp: $onSecondaryTapUp, onSecondaryTapCancel: $onSecondaryTapCancel, onTertiaryTapDown: $onTertiaryTapDown, onTertiaryTapUp: $onTertiaryTapUp, onTertiaryTapCancel: $onTertiaryTapCancel, onDoubleTapDown: $onDoubleTapDown, onDoubleTap: $onDoubleTap, onDoubleTapCancel: $onDoubleTapCancel, onLongPressDown: $onLongPressDown, onLongPressCancel: $onLongPressCancel, onLongPress: $onLongPress, onLongPressStart: $onLongPressStart, onLongPressMoveUpdate: $onLongPressMoveUpdate, onLongPressUp: $onLongPressUp, onLongPressEnd: $onLongPressEnd, onSecondaryLongPressDown: $onSecondaryLongPressDown, onSecondaryLongPressCancel: $onSecondaryLongPressCancel, onSecondaryLongPress: $onSecondaryLongPress, onSecondaryLongPressStart: $onSecondaryLongPressStart, onSecondaryLongPressMoveUpdate: $onSecondaryLongPressMoveUpdate, onSecondaryLongPressUp: $onSecondaryLongPressUp, onSecondaryLongPressEnd: $onSecondaryLongPressEnd, onTertiaryLongPressDown: $onTertiaryLongPressDown, onTertiaryLongPressCancel: $onTertiaryLongPressCancel, onTertiaryLongPress: $onTertiaryLongPress, onTertiaryLongPressStart: $onTertiaryLongPressStart, onTertiaryLongPressMoveUpdate: $onTertiaryLongPressMoveUpdate, onTertiaryLongPressUp: $onTertiaryLongPressUp, onTertiaryLongPressEnd: $onTertiaryLongPressEnd, onVerticalDragDown: $onVerticalDragDown, onVerticalDragStart: $onVerticalDragStart, onVerticalDragUpdate: $onVerticalDragUpdate, onVerticalDragEnd: $onVerticalDragEnd, onVerticalDragCancel: $onVerticalDragCancel, onHorizontalDragDown: $onHorizontalDragDown, onHorizontalDragStart: $onHorizontalDragStart, onHorizontalDragUpdate: $onHorizontalDragUpdate, onHorizontalDragEnd: $onHorizontalDragEnd, onHorizontalDragCancel: $onHorizontalDragCancel, onForcePressStart: $onForcePressStart, onForcePressPeak: $onForcePressPeak, onForcePressUpdate: $onForcePressUpdate, onForcePressEnd: $onForcePressEnd, excludeFromSemantics: $excludeFromSemantics, dragStartBehavior: $dragStartBehavior)'; + } +} + +/// @nodoc +abstract mixin class $StacGestureDetectorCopyWith<$Res> { + factory $StacGestureDetectorCopyWith( + StacGestureDetector value, $Res Function(StacGestureDetector) _then) = + _$StacGestureDetectorCopyWithImpl; + @useResult + $Res call( + {Map? child, + Map? onTapDown, + Map? onTapUp, + Map? onTap, + Map? onTapCancel, + Map? onSecondaryTap, + Map? onSecondaryTapDown, + Map? onSecondaryTapUp, + Map? onSecondaryTapCancel, + Map? onTertiaryTapDown, + Map? onTertiaryTapUp, + Map? onTertiaryTapCancel, + Map? onDoubleTapDown, + Map? onDoubleTap, + Map? onDoubleTapCancel, + Map? onLongPressDown, + Map? onLongPressCancel, + Map? onLongPress, + Map? onLongPressStart, + Map? onLongPressMoveUpdate, + Map? onLongPressUp, + Map? onLongPressEnd, + Map? onSecondaryLongPressDown, + Map? onSecondaryLongPressCancel, + Map? onSecondaryLongPress, + Map? onSecondaryLongPressStart, + Map? onSecondaryLongPressMoveUpdate, + Map? onSecondaryLongPressUp, + Map? onSecondaryLongPressEnd, + Map? onTertiaryLongPressDown, + Map? onTertiaryLongPressCancel, + Map? onTertiaryLongPress, + Map? onTertiaryLongPressStart, + Map? onTertiaryLongPressMoveUpdate, + Map? onTertiaryLongPressUp, + Map? onTertiaryLongPressEnd, + Map? onVerticalDragDown, + Map? onVerticalDragStart, + Map? onVerticalDragUpdate, + Map? onVerticalDragEnd, + Map? onVerticalDragCancel, + Map? onHorizontalDragDown, + Map? onHorizontalDragStart, + Map? onHorizontalDragUpdate, + Map? onHorizontalDragEnd, + Map? onHorizontalDragCancel, + Map? onForcePressStart, + Map? onForcePressPeak, + Map? onForcePressUpdate, + Map? onForcePressEnd, + bool excludeFromSemantics, + DragStartBehavior dragStartBehavior}); +} + +/// @nodoc +class _$StacGestureDetectorCopyWithImpl<$Res> + implements $StacGestureDetectorCopyWith<$Res> { + _$StacGestureDetectorCopyWithImpl(this._self, this._then); + + final StacGestureDetector _self; + final $Res Function(StacGestureDetector) _then; + + /// Create a copy of StacGestureDetector + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? child = freezed, + Object? onTapDown = freezed, + Object? onTapUp = freezed, + Object? onTap = freezed, + Object? onTapCancel = freezed, + Object? onSecondaryTap = freezed, + Object? onSecondaryTapDown = freezed, + Object? onSecondaryTapUp = freezed, + Object? onSecondaryTapCancel = freezed, + Object? onTertiaryTapDown = freezed, + Object? onTertiaryTapUp = freezed, + Object? onTertiaryTapCancel = freezed, + Object? onDoubleTapDown = freezed, + Object? onDoubleTap = freezed, + Object? onDoubleTapCancel = freezed, + Object? onLongPressDown = freezed, + Object? onLongPressCancel = freezed, + Object? onLongPress = freezed, + Object? onLongPressStart = freezed, + Object? onLongPressMoveUpdate = freezed, + Object? onLongPressUp = freezed, + Object? onLongPressEnd = freezed, + Object? onSecondaryLongPressDown = freezed, + Object? onSecondaryLongPressCancel = freezed, + Object? onSecondaryLongPress = freezed, + Object? onSecondaryLongPressStart = freezed, + Object? onSecondaryLongPressMoveUpdate = freezed, + Object? onSecondaryLongPressUp = freezed, + Object? onSecondaryLongPressEnd = freezed, + Object? onTertiaryLongPressDown = freezed, + Object? onTertiaryLongPressCancel = freezed, + Object? onTertiaryLongPress = freezed, + Object? onTertiaryLongPressStart = freezed, + Object? onTertiaryLongPressMoveUpdate = freezed, + Object? onTertiaryLongPressUp = freezed, + Object? onTertiaryLongPressEnd = freezed, + Object? onVerticalDragDown = freezed, + Object? onVerticalDragStart = freezed, + Object? onVerticalDragUpdate = freezed, + Object? onVerticalDragEnd = freezed, + Object? onVerticalDragCancel = freezed, + Object? onHorizontalDragDown = freezed, + Object? onHorizontalDragStart = freezed, + Object? onHorizontalDragUpdate = freezed, + Object? onHorizontalDragEnd = freezed, + Object? onHorizontalDragCancel = freezed, + Object? onForcePressStart = freezed, + Object? onForcePressPeak = freezed, + Object? onForcePressUpdate = freezed, + Object? onForcePressEnd = freezed, + Object? excludeFromSemantics = null, + Object? dragStartBehavior = null, + }) { + return _then(_self.copyWith( + child: freezed == child + ? _self.child + : child // ignore: cast_nullable_to_non_nullable + as Map?, + onTapDown: freezed == onTapDown + ? _self.onTapDown + : onTapDown // ignore: cast_nullable_to_non_nullable + as Map?, + onTapUp: freezed == onTapUp + ? _self.onTapUp + : onTapUp // ignore: cast_nullable_to_non_nullable + as Map?, + onTap: freezed == onTap + ? _self.onTap + : onTap // ignore: cast_nullable_to_non_nullable + as Map?, + onTapCancel: freezed == onTapCancel + ? _self.onTapCancel + : onTapCancel // ignore: cast_nullable_to_non_nullable + as Map?, + onSecondaryTap: freezed == onSecondaryTap + ? _self.onSecondaryTap + : onSecondaryTap // ignore: cast_nullable_to_non_nullable + as Map?, + onSecondaryTapDown: freezed == onSecondaryTapDown + ? _self.onSecondaryTapDown + : onSecondaryTapDown // ignore: cast_nullable_to_non_nullable + as Map?, + onSecondaryTapUp: freezed == onSecondaryTapUp + ? _self.onSecondaryTapUp + : onSecondaryTapUp // ignore: cast_nullable_to_non_nullable + as Map?, + onSecondaryTapCancel: freezed == onSecondaryTapCancel + ? _self.onSecondaryTapCancel + : onSecondaryTapCancel // ignore: cast_nullable_to_non_nullable + as Map?, + onTertiaryTapDown: freezed == onTertiaryTapDown + ? _self.onTertiaryTapDown + : onTertiaryTapDown // ignore: cast_nullable_to_non_nullable + as Map?, + onTertiaryTapUp: freezed == onTertiaryTapUp + ? _self.onTertiaryTapUp + : onTertiaryTapUp // ignore: cast_nullable_to_non_nullable + as Map?, + onTertiaryTapCancel: freezed == onTertiaryTapCancel + ? _self.onTertiaryTapCancel + : onTertiaryTapCancel // ignore: cast_nullable_to_non_nullable + as Map?, + onDoubleTapDown: freezed == onDoubleTapDown + ? _self.onDoubleTapDown + : onDoubleTapDown // ignore: cast_nullable_to_non_nullable + as Map?, + onDoubleTap: freezed == onDoubleTap + ? _self.onDoubleTap + : onDoubleTap // ignore: cast_nullable_to_non_nullable + as Map?, + onDoubleTapCancel: freezed == onDoubleTapCancel + ? _self.onDoubleTapCancel + : onDoubleTapCancel // ignore: cast_nullable_to_non_nullable + as Map?, + onLongPressDown: freezed == onLongPressDown + ? _self.onLongPressDown + : onLongPressDown // ignore: cast_nullable_to_non_nullable + as Map?, + onLongPressCancel: freezed == onLongPressCancel + ? _self.onLongPressCancel + : onLongPressCancel // ignore: cast_nullable_to_non_nullable + as Map?, + onLongPress: freezed == onLongPress + ? _self.onLongPress + : onLongPress // ignore: cast_nullable_to_non_nullable + as Map?, + onLongPressStart: freezed == onLongPressStart + ? _self.onLongPressStart + : onLongPressStart // ignore: cast_nullable_to_non_nullable + as Map?, + onLongPressMoveUpdate: freezed == onLongPressMoveUpdate + ? _self.onLongPressMoveUpdate + : onLongPressMoveUpdate // ignore: cast_nullable_to_non_nullable + as Map?, + onLongPressUp: freezed == onLongPressUp + ? _self.onLongPressUp + : onLongPressUp // ignore: cast_nullable_to_non_nullable + as Map?, + onLongPressEnd: freezed == onLongPressEnd + ? _self.onLongPressEnd + : onLongPressEnd // ignore: cast_nullable_to_non_nullable + as Map?, + onSecondaryLongPressDown: freezed == onSecondaryLongPressDown + ? _self.onSecondaryLongPressDown + : onSecondaryLongPressDown // ignore: cast_nullable_to_non_nullable + as Map?, + onSecondaryLongPressCancel: freezed == onSecondaryLongPressCancel + ? _self.onSecondaryLongPressCancel + : onSecondaryLongPressCancel // ignore: cast_nullable_to_non_nullable + as Map?, + onSecondaryLongPress: freezed == onSecondaryLongPress + ? _self.onSecondaryLongPress + : onSecondaryLongPress // ignore: cast_nullable_to_non_nullable + as Map?, + onSecondaryLongPressStart: freezed == onSecondaryLongPressStart + ? _self.onSecondaryLongPressStart + : onSecondaryLongPressStart // ignore: cast_nullable_to_non_nullable + as Map?, + onSecondaryLongPressMoveUpdate: freezed == onSecondaryLongPressMoveUpdate + ? _self.onSecondaryLongPressMoveUpdate + : onSecondaryLongPressMoveUpdate // ignore: cast_nullable_to_non_nullable + as Map?, + onSecondaryLongPressUp: freezed == onSecondaryLongPressUp + ? _self.onSecondaryLongPressUp + : onSecondaryLongPressUp // ignore: cast_nullable_to_non_nullable + as Map?, + onSecondaryLongPressEnd: freezed == onSecondaryLongPressEnd + ? _self.onSecondaryLongPressEnd + : onSecondaryLongPressEnd // ignore: cast_nullable_to_non_nullable + as Map?, + onTertiaryLongPressDown: freezed == onTertiaryLongPressDown + ? _self.onTertiaryLongPressDown + : onTertiaryLongPressDown // ignore: cast_nullable_to_non_nullable + as Map?, + onTertiaryLongPressCancel: freezed == onTertiaryLongPressCancel + ? _self.onTertiaryLongPressCancel + : onTertiaryLongPressCancel // ignore: cast_nullable_to_non_nullable + as Map?, + onTertiaryLongPress: freezed == onTertiaryLongPress + ? _self.onTertiaryLongPress + : onTertiaryLongPress // ignore: cast_nullable_to_non_nullable + as Map?, + onTertiaryLongPressStart: freezed == onTertiaryLongPressStart + ? _self.onTertiaryLongPressStart + : onTertiaryLongPressStart // ignore: cast_nullable_to_non_nullable + as Map?, + onTertiaryLongPressMoveUpdate: freezed == onTertiaryLongPressMoveUpdate + ? _self.onTertiaryLongPressMoveUpdate + : onTertiaryLongPressMoveUpdate // ignore: cast_nullable_to_non_nullable + as Map?, + onTertiaryLongPressUp: freezed == onTertiaryLongPressUp + ? _self.onTertiaryLongPressUp + : onTertiaryLongPressUp // ignore: cast_nullable_to_non_nullable + as Map?, + onTertiaryLongPressEnd: freezed == onTertiaryLongPressEnd + ? _self.onTertiaryLongPressEnd + : onTertiaryLongPressEnd // ignore: cast_nullable_to_non_nullable + as Map?, + onVerticalDragDown: freezed == onVerticalDragDown + ? _self.onVerticalDragDown + : onVerticalDragDown // ignore: cast_nullable_to_non_nullable + as Map?, + onVerticalDragStart: freezed == onVerticalDragStart + ? _self.onVerticalDragStart + : onVerticalDragStart // ignore: cast_nullable_to_non_nullable + as Map?, + onVerticalDragUpdate: freezed == onVerticalDragUpdate + ? _self.onVerticalDragUpdate + : onVerticalDragUpdate // ignore: cast_nullable_to_non_nullable + as Map?, + onVerticalDragEnd: freezed == onVerticalDragEnd + ? _self.onVerticalDragEnd + : onVerticalDragEnd // ignore: cast_nullable_to_non_nullable + as Map?, + onVerticalDragCancel: freezed == onVerticalDragCancel + ? _self.onVerticalDragCancel + : onVerticalDragCancel // ignore: cast_nullable_to_non_nullable + as Map?, + onHorizontalDragDown: freezed == onHorizontalDragDown + ? _self.onHorizontalDragDown + : onHorizontalDragDown // ignore: cast_nullable_to_non_nullable + as Map?, + onHorizontalDragStart: freezed == onHorizontalDragStart + ? _self.onHorizontalDragStart + : onHorizontalDragStart // ignore: cast_nullable_to_non_nullable + as Map?, + onHorizontalDragUpdate: freezed == onHorizontalDragUpdate + ? _self.onHorizontalDragUpdate + : onHorizontalDragUpdate // ignore: cast_nullable_to_non_nullable + as Map?, + onHorizontalDragEnd: freezed == onHorizontalDragEnd + ? _self.onHorizontalDragEnd + : onHorizontalDragEnd // ignore: cast_nullable_to_non_nullable + as Map?, + onHorizontalDragCancel: freezed == onHorizontalDragCancel + ? _self.onHorizontalDragCancel + : onHorizontalDragCancel // ignore: cast_nullable_to_non_nullable + as Map?, + onForcePressStart: freezed == onForcePressStart + ? _self.onForcePressStart + : onForcePressStart // ignore: cast_nullable_to_non_nullable + as Map?, + onForcePressPeak: freezed == onForcePressPeak + ? _self.onForcePressPeak + : onForcePressPeak // ignore: cast_nullable_to_non_nullable + as Map?, + onForcePressUpdate: freezed == onForcePressUpdate + ? _self.onForcePressUpdate + : onForcePressUpdate // ignore: cast_nullable_to_non_nullable + as Map?, + onForcePressEnd: freezed == onForcePressEnd + ? _self.onForcePressEnd + : onForcePressEnd // ignore: cast_nullable_to_non_nullable + as Map?, + excludeFromSemantics: null == excludeFromSemantics + ? _self.excludeFromSemantics + : excludeFromSemantics // ignore: cast_nullable_to_non_nullable + as bool, + dragStartBehavior: null == dragStartBehavior + ? _self.dragStartBehavior + : dragStartBehavior // ignore: cast_nullable_to_non_nullable + as DragStartBehavior, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _StacGestureDetector implements StacGestureDetector { + const _StacGestureDetector( + {final Map? child, + final Map? onTapDown, + final Map? onTapUp, + final Map? onTap, + final Map? onTapCancel, + final Map? onSecondaryTap, + final Map? onSecondaryTapDown, + final Map? onSecondaryTapUp, + final Map? onSecondaryTapCancel, + final Map? onTertiaryTapDown, + final Map? onTertiaryTapUp, + final Map? onTertiaryTapCancel, + final Map? onDoubleTapDown, + final Map? onDoubleTap, + final Map? onDoubleTapCancel, + final Map? onLongPressDown, + final Map? onLongPressCancel, + final Map? onLongPress, + final Map? onLongPressStart, + final Map? onLongPressMoveUpdate, + final Map? onLongPressUp, + final Map? onLongPressEnd, + final Map? onSecondaryLongPressDown, + final Map? onSecondaryLongPressCancel, + final Map? onSecondaryLongPress, + final Map? onSecondaryLongPressStart, + final Map? onSecondaryLongPressMoveUpdate, + final Map? onSecondaryLongPressUp, + final Map? onSecondaryLongPressEnd, + final Map? onTertiaryLongPressDown, + final Map? onTertiaryLongPressCancel, + final Map? onTertiaryLongPress, + final Map? onTertiaryLongPressStart, + final Map? onTertiaryLongPressMoveUpdate, + final Map? onTertiaryLongPressUp, + final Map? onTertiaryLongPressEnd, + final Map? onVerticalDragDown, + final Map? onVerticalDragStart, + final Map? onVerticalDragUpdate, + final Map? onVerticalDragEnd, + final Map? onVerticalDragCancel, + final Map? onHorizontalDragDown, + final Map? onHorizontalDragStart, + final Map? onHorizontalDragUpdate, + final Map? onHorizontalDragEnd, + final Map? onHorizontalDragCancel, + final Map? onForcePressStart, + final Map? onForcePressPeak, + final Map? onForcePressUpdate, + final Map? onForcePressEnd, + this.excludeFromSemantics = false, + this.dragStartBehavior = DragStartBehavior.start}) + : _child = child, + _onTapDown = onTapDown, + _onTapUp = onTapUp, + _onTap = onTap, + _onTapCancel = onTapCancel, + _onSecondaryTap = onSecondaryTap, + _onSecondaryTapDown = onSecondaryTapDown, + _onSecondaryTapUp = onSecondaryTapUp, + _onSecondaryTapCancel = onSecondaryTapCancel, + _onTertiaryTapDown = onTertiaryTapDown, + _onTertiaryTapUp = onTertiaryTapUp, + _onTertiaryTapCancel = onTertiaryTapCancel, + _onDoubleTapDown = onDoubleTapDown, + _onDoubleTap = onDoubleTap, + _onDoubleTapCancel = onDoubleTapCancel, + _onLongPressDown = onLongPressDown, + _onLongPressCancel = onLongPressCancel, + _onLongPress = onLongPress, + _onLongPressStart = onLongPressStart, + _onLongPressMoveUpdate = onLongPressMoveUpdate, + _onLongPressUp = onLongPressUp, + _onLongPressEnd = onLongPressEnd, + _onSecondaryLongPressDown = onSecondaryLongPressDown, + _onSecondaryLongPressCancel = onSecondaryLongPressCancel, + _onSecondaryLongPress = onSecondaryLongPress, + _onSecondaryLongPressStart = onSecondaryLongPressStart, + _onSecondaryLongPressMoveUpdate = onSecondaryLongPressMoveUpdate, + _onSecondaryLongPressUp = onSecondaryLongPressUp, + _onSecondaryLongPressEnd = onSecondaryLongPressEnd, + _onTertiaryLongPressDown = onTertiaryLongPressDown, + _onTertiaryLongPressCancel = onTertiaryLongPressCancel, + _onTertiaryLongPress = onTertiaryLongPress, + _onTertiaryLongPressStart = onTertiaryLongPressStart, + _onTertiaryLongPressMoveUpdate = onTertiaryLongPressMoveUpdate, + _onTertiaryLongPressUp = onTertiaryLongPressUp, + _onTertiaryLongPressEnd = onTertiaryLongPressEnd, + _onVerticalDragDown = onVerticalDragDown, + _onVerticalDragStart = onVerticalDragStart, + _onVerticalDragUpdate = onVerticalDragUpdate, + _onVerticalDragEnd = onVerticalDragEnd, + _onVerticalDragCancel = onVerticalDragCancel, + _onHorizontalDragDown = onHorizontalDragDown, + _onHorizontalDragStart = onHorizontalDragStart, + _onHorizontalDragUpdate = onHorizontalDragUpdate, + _onHorizontalDragEnd = onHorizontalDragEnd, + _onHorizontalDragCancel = onHorizontalDragCancel, + _onForcePressStart = onForcePressStart, + _onForcePressPeak = onForcePressPeak, + _onForcePressUpdate = onForcePressUpdate, + _onForcePressEnd = onForcePressEnd; + factory _StacGestureDetector.fromJson(Map json) => + _$StacGestureDetectorFromJson(json); + + final Map? _child; + @override + Map? get child { + final value = _child; + if (value == null) return null; + if (_child is EqualUnmodifiableMapView) return _child; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onTapDown; + @override + Map? get onTapDown { + final value = _onTapDown; + if (value == null) return null; + if (_onTapDown is EqualUnmodifiableMapView) return _onTapDown; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onTapUp; + @override + Map? get onTapUp { + final value = _onTapUp; + if (value == null) return null; + if (_onTapUp is EqualUnmodifiableMapView) return _onTapUp; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onTap; + @override + Map? get onTap { + final value = _onTap; + if (value == null) return null; + if (_onTap is EqualUnmodifiableMapView) return _onTap; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onTapCancel; + @override + Map? get onTapCancel { + final value = _onTapCancel; + if (value == null) return null; + if (_onTapCancel is EqualUnmodifiableMapView) return _onTapCancel; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onSecondaryTap; + @override + Map? get onSecondaryTap { + final value = _onSecondaryTap; + if (value == null) return null; + if (_onSecondaryTap is EqualUnmodifiableMapView) return _onSecondaryTap; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onSecondaryTapDown; + @override + Map? get onSecondaryTapDown { + final value = _onSecondaryTapDown; + if (value == null) return null; + if (_onSecondaryTapDown is EqualUnmodifiableMapView) + return _onSecondaryTapDown; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onSecondaryTapUp; + @override + Map? get onSecondaryTapUp { + final value = _onSecondaryTapUp; + if (value == null) return null; + if (_onSecondaryTapUp is EqualUnmodifiableMapView) return _onSecondaryTapUp; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onSecondaryTapCancel; + @override + Map? get onSecondaryTapCancel { + final value = _onSecondaryTapCancel; + if (value == null) return null; + if (_onSecondaryTapCancel is EqualUnmodifiableMapView) + return _onSecondaryTapCancel; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onTertiaryTapDown; + @override + Map? get onTertiaryTapDown { + final value = _onTertiaryTapDown; + if (value == null) return null; + if (_onTertiaryTapDown is EqualUnmodifiableMapView) + return _onTertiaryTapDown; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onTertiaryTapUp; + @override + Map? get onTertiaryTapUp { + final value = _onTertiaryTapUp; + if (value == null) return null; + if (_onTertiaryTapUp is EqualUnmodifiableMapView) return _onTertiaryTapUp; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onTertiaryTapCancel; + @override + Map? get onTertiaryTapCancel { + final value = _onTertiaryTapCancel; + if (value == null) return null; + if (_onTertiaryTapCancel is EqualUnmodifiableMapView) + return _onTertiaryTapCancel; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onDoubleTapDown; + @override + Map? get onDoubleTapDown { + final value = _onDoubleTapDown; + if (value == null) return null; + if (_onDoubleTapDown is EqualUnmodifiableMapView) return _onDoubleTapDown; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onDoubleTap; + @override + Map? get onDoubleTap { + final value = _onDoubleTap; + if (value == null) return null; + if (_onDoubleTap is EqualUnmodifiableMapView) return _onDoubleTap; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onDoubleTapCancel; + @override + Map? get onDoubleTapCancel { + final value = _onDoubleTapCancel; + if (value == null) return null; + if (_onDoubleTapCancel is EqualUnmodifiableMapView) + return _onDoubleTapCancel; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onLongPressDown; + @override + Map? get onLongPressDown { + final value = _onLongPressDown; + if (value == null) return null; + if (_onLongPressDown is EqualUnmodifiableMapView) return _onLongPressDown; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onLongPressCancel; + @override + Map? get onLongPressCancel { + final value = _onLongPressCancel; + if (value == null) return null; + if (_onLongPressCancel is EqualUnmodifiableMapView) + return _onLongPressCancel; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onLongPress; + @override + Map? get onLongPress { + final value = _onLongPress; + if (value == null) return null; + if (_onLongPress is EqualUnmodifiableMapView) return _onLongPress; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onLongPressStart; + @override + Map? get onLongPressStart { + final value = _onLongPressStart; + if (value == null) return null; + if (_onLongPressStart is EqualUnmodifiableMapView) return _onLongPressStart; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onLongPressMoveUpdate; + @override + Map? get onLongPressMoveUpdate { + final value = _onLongPressMoveUpdate; + if (value == null) return null; + if (_onLongPressMoveUpdate is EqualUnmodifiableMapView) + return _onLongPressMoveUpdate; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onLongPressUp; + @override + Map? get onLongPressUp { + final value = _onLongPressUp; + if (value == null) return null; + if (_onLongPressUp is EqualUnmodifiableMapView) return _onLongPressUp; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onLongPressEnd; + @override + Map? get onLongPressEnd { + final value = _onLongPressEnd; + if (value == null) return null; + if (_onLongPressEnd is EqualUnmodifiableMapView) return _onLongPressEnd; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onSecondaryLongPressDown; + @override + Map? get onSecondaryLongPressDown { + final value = _onSecondaryLongPressDown; + if (value == null) return null; + if (_onSecondaryLongPressDown is EqualUnmodifiableMapView) + return _onSecondaryLongPressDown; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onSecondaryLongPressCancel; + @override + Map? get onSecondaryLongPressCancel { + final value = _onSecondaryLongPressCancel; + if (value == null) return null; + if (_onSecondaryLongPressCancel is EqualUnmodifiableMapView) + return _onSecondaryLongPressCancel; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onSecondaryLongPress; + @override + Map? get onSecondaryLongPress { + final value = _onSecondaryLongPress; + if (value == null) return null; + if (_onSecondaryLongPress is EqualUnmodifiableMapView) + return _onSecondaryLongPress; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onSecondaryLongPressStart; + @override + Map? get onSecondaryLongPressStart { + final value = _onSecondaryLongPressStart; + if (value == null) return null; + if (_onSecondaryLongPressStart is EqualUnmodifiableMapView) + return _onSecondaryLongPressStart; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onSecondaryLongPressMoveUpdate; + @override + Map? get onSecondaryLongPressMoveUpdate { + final value = _onSecondaryLongPressMoveUpdate; + if (value == null) return null; + if (_onSecondaryLongPressMoveUpdate is EqualUnmodifiableMapView) + return _onSecondaryLongPressMoveUpdate; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onSecondaryLongPressUp; + @override + Map? get onSecondaryLongPressUp { + final value = _onSecondaryLongPressUp; + if (value == null) return null; + if (_onSecondaryLongPressUp is EqualUnmodifiableMapView) + return _onSecondaryLongPressUp; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onSecondaryLongPressEnd; + @override + Map? get onSecondaryLongPressEnd { + final value = _onSecondaryLongPressEnd; + if (value == null) return null; + if (_onSecondaryLongPressEnd is EqualUnmodifiableMapView) + return _onSecondaryLongPressEnd; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onTertiaryLongPressDown; + @override + Map? get onTertiaryLongPressDown { + final value = _onTertiaryLongPressDown; + if (value == null) return null; + if (_onTertiaryLongPressDown is EqualUnmodifiableMapView) + return _onTertiaryLongPressDown; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onTertiaryLongPressCancel; + @override + Map? get onTertiaryLongPressCancel { + final value = _onTertiaryLongPressCancel; + if (value == null) return null; + if (_onTertiaryLongPressCancel is EqualUnmodifiableMapView) + return _onTertiaryLongPressCancel; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onTertiaryLongPress; + @override + Map? get onTertiaryLongPress { + final value = _onTertiaryLongPress; + if (value == null) return null; + if (_onTertiaryLongPress is EqualUnmodifiableMapView) + return _onTertiaryLongPress; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onTertiaryLongPressStart; + @override + Map? get onTertiaryLongPressStart { + final value = _onTertiaryLongPressStart; + if (value == null) return null; + if (_onTertiaryLongPressStart is EqualUnmodifiableMapView) + return _onTertiaryLongPressStart; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onTertiaryLongPressMoveUpdate; + @override + Map? get onTertiaryLongPressMoveUpdate { + final value = _onTertiaryLongPressMoveUpdate; + if (value == null) return null; + if (_onTertiaryLongPressMoveUpdate is EqualUnmodifiableMapView) + return _onTertiaryLongPressMoveUpdate; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onTertiaryLongPressUp; + @override + Map? get onTertiaryLongPressUp { + final value = _onTertiaryLongPressUp; + if (value == null) return null; + if (_onTertiaryLongPressUp is EqualUnmodifiableMapView) + return _onTertiaryLongPressUp; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onTertiaryLongPressEnd; + @override + Map? get onTertiaryLongPressEnd { + final value = _onTertiaryLongPressEnd; + if (value == null) return null; + if (_onTertiaryLongPressEnd is EqualUnmodifiableMapView) + return _onTertiaryLongPressEnd; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onVerticalDragDown; + @override + Map? get onVerticalDragDown { + final value = _onVerticalDragDown; + if (value == null) return null; + if (_onVerticalDragDown is EqualUnmodifiableMapView) + return _onVerticalDragDown; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onVerticalDragStart; + @override + Map? get onVerticalDragStart { + final value = _onVerticalDragStart; + if (value == null) return null; + if (_onVerticalDragStart is EqualUnmodifiableMapView) + return _onVerticalDragStart; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onVerticalDragUpdate; + @override + Map? get onVerticalDragUpdate { + final value = _onVerticalDragUpdate; + if (value == null) return null; + if (_onVerticalDragUpdate is EqualUnmodifiableMapView) + return _onVerticalDragUpdate; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onVerticalDragEnd; + @override + Map? get onVerticalDragEnd { + final value = _onVerticalDragEnd; + if (value == null) return null; + if (_onVerticalDragEnd is EqualUnmodifiableMapView) + return _onVerticalDragEnd; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onVerticalDragCancel; + @override + Map? get onVerticalDragCancel { + final value = _onVerticalDragCancel; + if (value == null) return null; + if (_onVerticalDragCancel is EqualUnmodifiableMapView) + return _onVerticalDragCancel; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onHorizontalDragDown; + @override + Map? get onHorizontalDragDown { + final value = _onHorizontalDragDown; + if (value == null) return null; + if (_onHorizontalDragDown is EqualUnmodifiableMapView) + return _onHorizontalDragDown; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onHorizontalDragStart; + @override + Map? get onHorizontalDragStart { + final value = _onHorizontalDragStart; + if (value == null) return null; + if (_onHorizontalDragStart is EqualUnmodifiableMapView) + return _onHorizontalDragStart; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onHorizontalDragUpdate; + @override + Map? get onHorizontalDragUpdate { + final value = _onHorizontalDragUpdate; + if (value == null) return null; + if (_onHorizontalDragUpdate is EqualUnmodifiableMapView) + return _onHorizontalDragUpdate; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onHorizontalDragEnd; + @override + Map? get onHorizontalDragEnd { + final value = _onHorizontalDragEnd; + if (value == null) return null; + if (_onHorizontalDragEnd is EqualUnmodifiableMapView) + return _onHorizontalDragEnd; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onHorizontalDragCancel; + @override + Map? get onHorizontalDragCancel { + final value = _onHorizontalDragCancel; + if (value == null) return null; + if (_onHorizontalDragCancel is EqualUnmodifiableMapView) + return _onHorizontalDragCancel; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onForcePressStart; + @override + Map? get onForcePressStart { + final value = _onForcePressStart; + if (value == null) return null; + if (_onForcePressStart is EqualUnmodifiableMapView) + return _onForcePressStart; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onForcePressPeak; + @override + Map? get onForcePressPeak { + final value = _onForcePressPeak; + if (value == null) return null; + if (_onForcePressPeak is EqualUnmodifiableMapView) return _onForcePressPeak; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onForcePressUpdate; + @override + Map? get onForcePressUpdate { + final value = _onForcePressUpdate; + if (value == null) return null; + if (_onForcePressUpdate is EqualUnmodifiableMapView) + return _onForcePressUpdate; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onForcePressEnd; + @override + Map? get onForcePressEnd { + final value = _onForcePressEnd; + if (value == null) return null; + if (_onForcePressEnd is EqualUnmodifiableMapView) return _onForcePressEnd; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + @override + @JsonKey() + final bool excludeFromSemantics; + @override + @JsonKey() + final DragStartBehavior dragStartBehavior; + + /// Create a copy of StacGestureDetector + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacGestureDetectorCopyWith<_StacGestureDetector> get copyWith => + __$StacGestureDetectorCopyWithImpl<_StacGestureDetector>( + this, _$identity); + + @override + Map toJson() { + return _$StacGestureDetectorToJson( + this, + ); + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _StacGestureDetector && + const DeepCollectionEquality().equals(other._child, _child) && + const DeepCollectionEquality() + .equals(other._onTapDown, _onTapDown) && + const DeepCollectionEquality().equals(other._onTapUp, _onTapUp) && + const DeepCollectionEquality().equals(other._onTap, _onTap) && + const DeepCollectionEquality() + .equals(other._onTapCancel, _onTapCancel) && + const DeepCollectionEquality() + .equals(other._onSecondaryTap, _onSecondaryTap) && + const DeepCollectionEquality() + .equals(other._onSecondaryTapDown, _onSecondaryTapDown) && + const DeepCollectionEquality() + .equals(other._onSecondaryTapUp, _onSecondaryTapUp) && + const DeepCollectionEquality() + .equals(other._onSecondaryTapCancel, _onSecondaryTapCancel) && + const DeepCollectionEquality() + .equals(other._onTertiaryTapDown, _onTertiaryTapDown) && + const DeepCollectionEquality() + .equals(other._onTertiaryTapUp, _onTertiaryTapUp) && + const DeepCollectionEquality() + .equals(other._onTertiaryTapCancel, _onTertiaryTapCancel) && + const DeepCollectionEquality() + .equals(other._onDoubleTapDown, _onDoubleTapDown) && + const DeepCollectionEquality() + .equals(other._onDoubleTap, _onDoubleTap) && + const DeepCollectionEquality() + .equals(other._onDoubleTapCancel, _onDoubleTapCancel) && + const DeepCollectionEquality() + .equals(other._onLongPressDown, _onLongPressDown) && + const DeepCollectionEquality() + .equals(other._onLongPressCancel, _onLongPressCancel) && + const DeepCollectionEquality() + .equals(other._onLongPress, _onLongPress) && + const DeepCollectionEquality() + .equals(other._onLongPressStart, _onLongPressStart) && + const DeepCollectionEquality() + .equals(other._onLongPressMoveUpdate, _onLongPressMoveUpdate) && + const DeepCollectionEquality() + .equals(other._onLongPressUp, _onLongPressUp) && + const DeepCollectionEquality() + .equals(other._onLongPressEnd, _onLongPressEnd) && + const DeepCollectionEquality().equals( + other._onSecondaryLongPressDown, _onSecondaryLongPressDown) && + const DeepCollectionEquality().equals( + other._onSecondaryLongPressCancel, + _onSecondaryLongPressCancel) && + const DeepCollectionEquality() + .equals(other._onSecondaryLongPress, _onSecondaryLongPress) && + const DeepCollectionEquality().equals( + other._onSecondaryLongPressStart, _onSecondaryLongPressStart) && + const DeepCollectionEquality().equals( + other._onSecondaryLongPressMoveUpdate, + _onSecondaryLongPressMoveUpdate) && + const DeepCollectionEquality().equals( + other._onSecondaryLongPressUp, _onSecondaryLongPressUp) && + const DeepCollectionEquality().equals( + other._onSecondaryLongPressEnd, _onSecondaryLongPressEnd) && + const DeepCollectionEquality().equals( + other._onTertiaryLongPressDown, _onTertiaryLongPressDown) && + const DeepCollectionEquality().equals( + other._onTertiaryLongPressCancel, _onTertiaryLongPressCancel) && + const DeepCollectionEquality() + .equals(other._onTertiaryLongPress, _onTertiaryLongPress) && + const DeepCollectionEquality().equals( + other._onTertiaryLongPressStart, _onTertiaryLongPressStart) && + const DeepCollectionEquality().equals( + other._onTertiaryLongPressMoveUpdate, + _onTertiaryLongPressMoveUpdate) && + const DeepCollectionEquality() + .equals(other._onTertiaryLongPressUp, _onTertiaryLongPressUp) && + const DeepCollectionEquality().equals( + other._onTertiaryLongPressEnd, _onTertiaryLongPressEnd) && + const DeepCollectionEquality() + .equals(other._onVerticalDragDown, _onVerticalDragDown) && + const DeepCollectionEquality() + .equals(other._onVerticalDragStart, _onVerticalDragStart) && + const DeepCollectionEquality() + .equals(other._onVerticalDragUpdate, _onVerticalDragUpdate) && + const DeepCollectionEquality() + .equals(other._onVerticalDragEnd, _onVerticalDragEnd) && + const DeepCollectionEquality() + .equals(other._onVerticalDragCancel, _onVerticalDragCancel) && + const DeepCollectionEquality().equals(other._onHorizontalDragDown, _onHorizontalDragDown) && + const DeepCollectionEquality().equals(other._onHorizontalDragStart, _onHorizontalDragStart) && + const DeepCollectionEquality().equals(other._onHorizontalDragUpdate, _onHorizontalDragUpdate) && + const DeepCollectionEquality().equals(other._onHorizontalDragEnd, _onHorizontalDragEnd) && + const DeepCollectionEquality().equals(other._onHorizontalDragCancel, _onHorizontalDragCancel) && + const DeepCollectionEquality().equals(other._onForcePressStart, _onForcePressStart) && + const DeepCollectionEquality().equals(other._onForcePressPeak, _onForcePressPeak) && + const DeepCollectionEquality().equals(other._onForcePressUpdate, _onForcePressUpdate) && + const DeepCollectionEquality().equals(other._onForcePressEnd, _onForcePressEnd) && + (identical(other.excludeFromSemantics, excludeFromSemantics) || other.excludeFromSemantics == excludeFromSemantics) && + (identical(other.dragStartBehavior, dragStartBehavior) || other.dragStartBehavior == dragStartBehavior)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hashAll([ + runtimeType, + const DeepCollectionEquality().hash(_child), + const DeepCollectionEquality().hash(_onTapDown), + const DeepCollectionEquality().hash(_onTapUp), + const DeepCollectionEquality().hash(_onTap), + const DeepCollectionEquality().hash(_onTapCancel), + const DeepCollectionEquality().hash(_onSecondaryTap), + const DeepCollectionEquality().hash(_onSecondaryTapDown), + const DeepCollectionEquality().hash(_onSecondaryTapUp), + const DeepCollectionEquality().hash(_onSecondaryTapCancel), + const DeepCollectionEquality().hash(_onTertiaryTapDown), + const DeepCollectionEquality().hash(_onTertiaryTapUp), + const DeepCollectionEquality().hash(_onTertiaryTapCancel), + const DeepCollectionEquality().hash(_onDoubleTapDown), + const DeepCollectionEquality().hash(_onDoubleTap), + const DeepCollectionEquality().hash(_onDoubleTapCancel), + const DeepCollectionEquality().hash(_onLongPressDown), + const DeepCollectionEquality().hash(_onLongPressCancel), + const DeepCollectionEquality().hash(_onLongPress), + const DeepCollectionEquality().hash(_onLongPressStart), + const DeepCollectionEquality().hash(_onLongPressMoveUpdate), + const DeepCollectionEquality().hash(_onLongPressUp), + const DeepCollectionEquality().hash(_onLongPressEnd), + const DeepCollectionEquality().hash(_onSecondaryLongPressDown), + const DeepCollectionEquality().hash(_onSecondaryLongPressCancel), + const DeepCollectionEquality().hash(_onSecondaryLongPress), + const DeepCollectionEquality().hash(_onSecondaryLongPressStart), + const DeepCollectionEquality().hash(_onSecondaryLongPressMoveUpdate), + const DeepCollectionEquality().hash(_onSecondaryLongPressUp), + const DeepCollectionEquality().hash(_onSecondaryLongPressEnd), + const DeepCollectionEquality().hash(_onTertiaryLongPressDown), + const DeepCollectionEquality().hash(_onTertiaryLongPressCancel), + const DeepCollectionEquality().hash(_onTertiaryLongPress), + const DeepCollectionEquality().hash(_onTertiaryLongPressStart), + const DeepCollectionEquality().hash(_onTertiaryLongPressMoveUpdate), + const DeepCollectionEquality().hash(_onTertiaryLongPressUp), + const DeepCollectionEquality().hash(_onTertiaryLongPressEnd), + const DeepCollectionEquality().hash(_onVerticalDragDown), + const DeepCollectionEquality().hash(_onVerticalDragStart), + const DeepCollectionEquality().hash(_onVerticalDragUpdate), + const DeepCollectionEquality().hash(_onVerticalDragEnd), + const DeepCollectionEquality().hash(_onVerticalDragCancel), + const DeepCollectionEquality().hash(_onHorizontalDragDown), + const DeepCollectionEquality().hash(_onHorizontalDragStart), + const DeepCollectionEquality().hash(_onHorizontalDragUpdate), + const DeepCollectionEquality().hash(_onHorizontalDragEnd), + const DeepCollectionEquality().hash(_onHorizontalDragCancel), + const DeepCollectionEquality().hash(_onForcePressStart), + const DeepCollectionEquality().hash(_onForcePressPeak), + const DeepCollectionEquality().hash(_onForcePressUpdate), + const DeepCollectionEquality().hash(_onForcePressEnd), + excludeFromSemantics, + dragStartBehavior + ]); + + @override + String toString() { + return 'StacGestureDetector(child: $child, onTapDown: $onTapDown, onTapUp: $onTapUp, onTap: $onTap, onTapCancel: $onTapCancel, onSecondaryTap: $onSecondaryTap, onSecondaryTapDown: $onSecondaryTapDown, onSecondaryTapUp: $onSecondaryTapUp, onSecondaryTapCancel: $onSecondaryTapCancel, onTertiaryTapDown: $onTertiaryTapDown, onTertiaryTapUp: $onTertiaryTapUp, onTertiaryTapCancel: $onTertiaryTapCancel, onDoubleTapDown: $onDoubleTapDown, onDoubleTap: $onDoubleTap, onDoubleTapCancel: $onDoubleTapCancel, onLongPressDown: $onLongPressDown, onLongPressCancel: $onLongPressCancel, onLongPress: $onLongPress, onLongPressStart: $onLongPressStart, onLongPressMoveUpdate: $onLongPressMoveUpdate, onLongPressUp: $onLongPressUp, onLongPressEnd: $onLongPressEnd, onSecondaryLongPressDown: $onSecondaryLongPressDown, onSecondaryLongPressCancel: $onSecondaryLongPressCancel, onSecondaryLongPress: $onSecondaryLongPress, onSecondaryLongPressStart: $onSecondaryLongPressStart, onSecondaryLongPressMoveUpdate: $onSecondaryLongPressMoveUpdate, onSecondaryLongPressUp: $onSecondaryLongPressUp, onSecondaryLongPressEnd: $onSecondaryLongPressEnd, onTertiaryLongPressDown: $onTertiaryLongPressDown, onTertiaryLongPressCancel: $onTertiaryLongPressCancel, onTertiaryLongPress: $onTertiaryLongPress, onTertiaryLongPressStart: $onTertiaryLongPressStart, onTertiaryLongPressMoveUpdate: $onTertiaryLongPressMoveUpdate, onTertiaryLongPressUp: $onTertiaryLongPressUp, onTertiaryLongPressEnd: $onTertiaryLongPressEnd, onVerticalDragDown: $onVerticalDragDown, onVerticalDragStart: $onVerticalDragStart, onVerticalDragUpdate: $onVerticalDragUpdate, onVerticalDragEnd: $onVerticalDragEnd, onVerticalDragCancel: $onVerticalDragCancel, onHorizontalDragDown: $onHorizontalDragDown, onHorizontalDragStart: $onHorizontalDragStart, onHorizontalDragUpdate: $onHorizontalDragUpdate, onHorizontalDragEnd: $onHorizontalDragEnd, onHorizontalDragCancel: $onHorizontalDragCancel, onForcePressStart: $onForcePressStart, onForcePressPeak: $onForcePressPeak, onForcePressUpdate: $onForcePressUpdate, onForcePressEnd: $onForcePressEnd, excludeFromSemantics: $excludeFromSemantics, dragStartBehavior: $dragStartBehavior)'; + } +} + +/// @nodoc +abstract mixin class _$StacGestureDetectorCopyWith<$Res> + implements $StacGestureDetectorCopyWith<$Res> { + factory _$StacGestureDetectorCopyWith(_StacGestureDetector value, + $Res Function(_StacGestureDetector) _then) = + __$StacGestureDetectorCopyWithImpl; + @override + @useResult + $Res call( + {Map? child, + Map? onTapDown, + Map? onTapUp, + Map? onTap, + Map? onTapCancel, + Map? onSecondaryTap, + Map? onSecondaryTapDown, + Map? onSecondaryTapUp, + Map? onSecondaryTapCancel, + Map? onTertiaryTapDown, + Map? onTertiaryTapUp, + Map? onTertiaryTapCancel, + Map? onDoubleTapDown, + Map? onDoubleTap, + Map? onDoubleTapCancel, + Map? onLongPressDown, + Map? onLongPressCancel, + Map? onLongPress, + Map? onLongPressStart, + Map? onLongPressMoveUpdate, + Map? onLongPressUp, + Map? onLongPressEnd, + Map? onSecondaryLongPressDown, + Map? onSecondaryLongPressCancel, + Map? onSecondaryLongPress, + Map? onSecondaryLongPressStart, + Map? onSecondaryLongPressMoveUpdate, + Map? onSecondaryLongPressUp, + Map? onSecondaryLongPressEnd, + Map? onTertiaryLongPressDown, + Map? onTertiaryLongPressCancel, + Map? onTertiaryLongPress, + Map? onTertiaryLongPressStart, + Map? onTertiaryLongPressMoveUpdate, + Map? onTertiaryLongPressUp, + Map? onTertiaryLongPressEnd, + Map? onVerticalDragDown, + Map? onVerticalDragStart, + Map? onVerticalDragUpdate, + Map? onVerticalDragEnd, + Map? onVerticalDragCancel, + Map? onHorizontalDragDown, + Map? onHorizontalDragStart, + Map? onHorizontalDragUpdate, + Map? onHorizontalDragEnd, + Map? onHorizontalDragCancel, + Map? onForcePressStart, + Map? onForcePressPeak, + Map? onForcePressUpdate, + Map? onForcePressEnd, + bool excludeFromSemantics, + DragStartBehavior dragStartBehavior}); +} + +/// @nodoc +class __$StacGestureDetectorCopyWithImpl<$Res> + implements _$StacGestureDetectorCopyWith<$Res> { + __$StacGestureDetectorCopyWithImpl(this._self, this._then); + + final _StacGestureDetector _self; + final $Res Function(_StacGestureDetector) _then; + + /// Create a copy of StacGestureDetector + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $Res call({ + Object? child = freezed, + Object? onTapDown = freezed, + Object? onTapUp = freezed, + Object? onTap = freezed, + Object? onTapCancel = freezed, + Object? onSecondaryTap = freezed, + Object? onSecondaryTapDown = freezed, + Object? onSecondaryTapUp = freezed, + Object? onSecondaryTapCancel = freezed, + Object? onTertiaryTapDown = freezed, + Object? onTertiaryTapUp = freezed, + Object? onTertiaryTapCancel = freezed, + Object? onDoubleTapDown = freezed, + Object? onDoubleTap = freezed, + Object? onDoubleTapCancel = freezed, + Object? onLongPressDown = freezed, + Object? onLongPressCancel = freezed, + Object? onLongPress = freezed, + Object? onLongPressStart = freezed, + Object? onLongPressMoveUpdate = freezed, + Object? onLongPressUp = freezed, + Object? onLongPressEnd = freezed, + Object? onSecondaryLongPressDown = freezed, + Object? onSecondaryLongPressCancel = freezed, + Object? onSecondaryLongPress = freezed, + Object? onSecondaryLongPressStart = freezed, + Object? onSecondaryLongPressMoveUpdate = freezed, + Object? onSecondaryLongPressUp = freezed, + Object? onSecondaryLongPressEnd = freezed, + Object? onTertiaryLongPressDown = freezed, + Object? onTertiaryLongPressCancel = freezed, + Object? onTertiaryLongPress = freezed, + Object? onTertiaryLongPressStart = freezed, + Object? onTertiaryLongPressMoveUpdate = freezed, + Object? onTertiaryLongPressUp = freezed, + Object? onTertiaryLongPressEnd = freezed, + Object? onVerticalDragDown = freezed, + Object? onVerticalDragStart = freezed, + Object? onVerticalDragUpdate = freezed, + Object? onVerticalDragEnd = freezed, + Object? onVerticalDragCancel = freezed, + Object? onHorizontalDragDown = freezed, + Object? onHorizontalDragStart = freezed, + Object? onHorizontalDragUpdate = freezed, + Object? onHorizontalDragEnd = freezed, + Object? onHorizontalDragCancel = freezed, + Object? onForcePressStart = freezed, + Object? onForcePressPeak = freezed, + Object? onForcePressUpdate = freezed, + Object? onForcePressEnd = freezed, + Object? excludeFromSemantics = null, + Object? dragStartBehavior = null, + }) { + return _then(_StacGestureDetector( + child: freezed == child + ? _self._child + : child // ignore: cast_nullable_to_non_nullable + as Map?, + onTapDown: freezed == onTapDown + ? _self._onTapDown + : onTapDown // ignore: cast_nullable_to_non_nullable + as Map?, + onTapUp: freezed == onTapUp + ? _self._onTapUp + : onTapUp // ignore: cast_nullable_to_non_nullable + as Map?, + onTap: freezed == onTap + ? _self._onTap + : onTap // ignore: cast_nullable_to_non_nullable + as Map?, + onTapCancel: freezed == onTapCancel + ? _self._onTapCancel + : onTapCancel // ignore: cast_nullable_to_non_nullable + as Map?, + onSecondaryTap: freezed == onSecondaryTap + ? _self._onSecondaryTap + : onSecondaryTap // ignore: cast_nullable_to_non_nullable + as Map?, + onSecondaryTapDown: freezed == onSecondaryTapDown + ? _self._onSecondaryTapDown + : onSecondaryTapDown // ignore: cast_nullable_to_non_nullable + as Map?, + onSecondaryTapUp: freezed == onSecondaryTapUp + ? _self._onSecondaryTapUp + : onSecondaryTapUp // ignore: cast_nullable_to_non_nullable + as Map?, + onSecondaryTapCancel: freezed == onSecondaryTapCancel + ? _self._onSecondaryTapCancel + : onSecondaryTapCancel // ignore: cast_nullable_to_non_nullable + as Map?, + onTertiaryTapDown: freezed == onTertiaryTapDown + ? _self._onTertiaryTapDown + : onTertiaryTapDown // ignore: cast_nullable_to_non_nullable + as Map?, + onTertiaryTapUp: freezed == onTertiaryTapUp + ? _self._onTertiaryTapUp + : onTertiaryTapUp // ignore: cast_nullable_to_non_nullable + as Map?, + onTertiaryTapCancel: freezed == onTertiaryTapCancel + ? _self._onTertiaryTapCancel + : onTertiaryTapCancel // ignore: cast_nullable_to_non_nullable + as Map?, + onDoubleTapDown: freezed == onDoubleTapDown + ? _self._onDoubleTapDown + : onDoubleTapDown // ignore: cast_nullable_to_non_nullable + as Map?, + onDoubleTap: freezed == onDoubleTap + ? _self._onDoubleTap + : onDoubleTap // ignore: cast_nullable_to_non_nullable + as Map?, + onDoubleTapCancel: freezed == onDoubleTapCancel + ? _self._onDoubleTapCancel + : onDoubleTapCancel // ignore: cast_nullable_to_non_nullable + as Map?, + onLongPressDown: freezed == onLongPressDown + ? _self._onLongPressDown + : onLongPressDown // ignore: cast_nullable_to_non_nullable + as Map?, + onLongPressCancel: freezed == onLongPressCancel + ? _self._onLongPressCancel + : onLongPressCancel // ignore: cast_nullable_to_non_nullable + as Map?, + onLongPress: freezed == onLongPress + ? _self._onLongPress + : onLongPress // ignore: cast_nullable_to_non_nullable + as Map?, + onLongPressStart: freezed == onLongPressStart + ? _self._onLongPressStart + : onLongPressStart // ignore: cast_nullable_to_non_nullable + as Map?, + onLongPressMoveUpdate: freezed == onLongPressMoveUpdate + ? _self._onLongPressMoveUpdate + : onLongPressMoveUpdate // ignore: cast_nullable_to_non_nullable + as Map?, + onLongPressUp: freezed == onLongPressUp + ? _self._onLongPressUp + : onLongPressUp // ignore: cast_nullable_to_non_nullable + as Map?, + onLongPressEnd: freezed == onLongPressEnd + ? _self._onLongPressEnd + : onLongPressEnd // ignore: cast_nullable_to_non_nullable + as Map?, + onSecondaryLongPressDown: freezed == onSecondaryLongPressDown + ? _self._onSecondaryLongPressDown + : onSecondaryLongPressDown // ignore: cast_nullable_to_non_nullable + as Map?, + onSecondaryLongPressCancel: freezed == onSecondaryLongPressCancel + ? _self._onSecondaryLongPressCancel + : onSecondaryLongPressCancel // ignore: cast_nullable_to_non_nullable + as Map?, + onSecondaryLongPress: freezed == onSecondaryLongPress + ? _self._onSecondaryLongPress + : onSecondaryLongPress // ignore: cast_nullable_to_non_nullable + as Map?, + onSecondaryLongPressStart: freezed == onSecondaryLongPressStart + ? _self._onSecondaryLongPressStart + : onSecondaryLongPressStart // ignore: cast_nullable_to_non_nullable + as Map?, + onSecondaryLongPressMoveUpdate: freezed == onSecondaryLongPressMoveUpdate + ? _self._onSecondaryLongPressMoveUpdate + : onSecondaryLongPressMoveUpdate // ignore: cast_nullable_to_non_nullable + as Map?, + onSecondaryLongPressUp: freezed == onSecondaryLongPressUp + ? _self._onSecondaryLongPressUp + : onSecondaryLongPressUp // ignore: cast_nullable_to_non_nullable + as Map?, + onSecondaryLongPressEnd: freezed == onSecondaryLongPressEnd + ? _self._onSecondaryLongPressEnd + : onSecondaryLongPressEnd // ignore: cast_nullable_to_non_nullable + as Map?, + onTertiaryLongPressDown: freezed == onTertiaryLongPressDown + ? _self._onTertiaryLongPressDown + : onTertiaryLongPressDown // ignore: cast_nullable_to_non_nullable + as Map?, + onTertiaryLongPressCancel: freezed == onTertiaryLongPressCancel + ? _self._onTertiaryLongPressCancel + : onTertiaryLongPressCancel // ignore: cast_nullable_to_non_nullable + as Map?, + onTertiaryLongPress: freezed == onTertiaryLongPress + ? _self._onTertiaryLongPress + : onTertiaryLongPress // ignore: cast_nullable_to_non_nullable + as Map?, + onTertiaryLongPressStart: freezed == onTertiaryLongPressStart + ? _self._onTertiaryLongPressStart + : onTertiaryLongPressStart // ignore: cast_nullable_to_non_nullable + as Map?, + onTertiaryLongPressMoveUpdate: freezed == onTertiaryLongPressMoveUpdate + ? _self._onTertiaryLongPressMoveUpdate + : onTertiaryLongPressMoveUpdate // ignore: cast_nullable_to_non_nullable + as Map?, + onTertiaryLongPressUp: freezed == onTertiaryLongPressUp + ? _self._onTertiaryLongPressUp + : onTertiaryLongPressUp // ignore: cast_nullable_to_non_nullable + as Map?, + onTertiaryLongPressEnd: freezed == onTertiaryLongPressEnd + ? _self._onTertiaryLongPressEnd + : onTertiaryLongPressEnd // ignore: cast_nullable_to_non_nullable + as Map?, + onVerticalDragDown: freezed == onVerticalDragDown + ? _self._onVerticalDragDown + : onVerticalDragDown // ignore: cast_nullable_to_non_nullable + as Map?, + onVerticalDragStart: freezed == onVerticalDragStart + ? _self._onVerticalDragStart + : onVerticalDragStart // ignore: cast_nullable_to_non_nullable + as Map?, + onVerticalDragUpdate: freezed == onVerticalDragUpdate + ? _self._onVerticalDragUpdate + : onVerticalDragUpdate // ignore: cast_nullable_to_non_nullable + as Map?, + onVerticalDragEnd: freezed == onVerticalDragEnd + ? _self._onVerticalDragEnd + : onVerticalDragEnd // ignore: cast_nullable_to_non_nullable + as Map?, + onVerticalDragCancel: freezed == onVerticalDragCancel + ? _self._onVerticalDragCancel + : onVerticalDragCancel // ignore: cast_nullable_to_non_nullable + as Map?, + onHorizontalDragDown: freezed == onHorizontalDragDown + ? _self._onHorizontalDragDown + : onHorizontalDragDown // ignore: cast_nullable_to_non_nullable + as Map?, + onHorizontalDragStart: freezed == onHorizontalDragStart + ? _self._onHorizontalDragStart + : onHorizontalDragStart // ignore: cast_nullable_to_non_nullable + as Map?, + onHorizontalDragUpdate: freezed == onHorizontalDragUpdate + ? _self._onHorizontalDragUpdate + : onHorizontalDragUpdate // ignore: cast_nullable_to_non_nullable + as Map?, + onHorizontalDragEnd: freezed == onHorizontalDragEnd + ? _self._onHorizontalDragEnd + : onHorizontalDragEnd // ignore: cast_nullable_to_non_nullable + as Map?, + onHorizontalDragCancel: freezed == onHorizontalDragCancel + ? _self._onHorizontalDragCancel + : onHorizontalDragCancel // ignore: cast_nullable_to_non_nullable + as Map?, + onForcePressStart: freezed == onForcePressStart + ? _self._onForcePressStart + : onForcePressStart // ignore: cast_nullable_to_non_nullable + as Map?, + onForcePressPeak: freezed == onForcePressPeak + ? _self._onForcePressPeak + : onForcePressPeak // ignore: cast_nullable_to_non_nullable + as Map?, + onForcePressUpdate: freezed == onForcePressUpdate + ? _self._onForcePressUpdate + : onForcePressUpdate // ignore: cast_nullable_to_non_nullable + as Map?, + onForcePressEnd: freezed == onForcePressEnd + ? _self._onForcePressEnd + : onForcePressEnd // ignore: cast_nullable_to_non_nullable + as Map?, + excludeFromSemantics: null == excludeFromSemantics + ? _self.excludeFromSemantics + : excludeFromSemantics // ignore: cast_nullable_to_non_nullable + as bool, + dragStartBehavior: null == dragStartBehavior + ? _self.dragStartBehavior + : dragStartBehavior // ignore: cast_nullable_to_non_nullable + as DragStartBehavior, + )); + } +} + +// dart format on diff --git a/packages/stac/lib/src/parsers/widgets/stac_gesture_detector/stac_gesture_detector.g.dart b/packages/stac/lib/src/parsers/widgets/stac_gesture_detector/stac_gesture_detector.g.dart new file mode 100644 index 00000000..09897635 --- /dev/null +++ b/packages/stac/lib/src/parsers/widgets/stac_gesture_detector/stac_gesture_detector.g.dart @@ -0,0 +1,149 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'stac_gesture_detector.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +_StacGestureDetector _$StacGestureDetectorFromJson(Map json) => + _StacGestureDetector( + child: json['child'] as Map?, + onTapDown: json['onTapDown'] as Map?, + onTapUp: json['onTapUp'] as Map?, + onTap: json['onTap'] as Map?, + onTapCancel: json['onTapCancel'] as Map?, + onSecondaryTap: json['onSecondaryTap'] as Map?, + onSecondaryTapDown: json['onSecondaryTapDown'] as Map?, + onSecondaryTapUp: json['onSecondaryTapUp'] as Map?, + onSecondaryTapCancel: + json['onSecondaryTapCancel'] as Map?, + onTertiaryTapDown: json['onTertiaryTapDown'] as Map?, + onTertiaryTapUp: json['onTertiaryTapUp'] as Map?, + onTertiaryTapCancel: json['onTertiaryTapCancel'] as Map?, + onDoubleTapDown: json['onDoubleTapDown'] as Map?, + onDoubleTap: json['onDoubleTap'] as Map?, + onDoubleTapCancel: json['onDoubleTapCancel'] as Map?, + onLongPressDown: json['onLongPressDown'] as Map?, + onLongPressCancel: json['onLongPressCancel'] as Map?, + onLongPress: json['onLongPress'] as Map?, + onLongPressStart: json['onLongPressStart'] as Map?, + onLongPressMoveUpdate: + json['onLongPressMoveUpdate'] as Map?, + onLongPressUp: json['onLongPressUp'] as Map?, + onLongPressEnd: json['onLongPressEnd'] as Map?, + onSecondaryLongPressDown: + json['onSecondaryLongPressDown'] as Map?, + onSecondaryLongPressCancel: + json['onSecondaryLongPressCancel'] as Map?, + onSecondaryLongPress: + json['onSecondaryLongPress'] as Map?, + onSecondaryLongPressStart: + json['onSecondaryLongPressStart'] as Map?, + onSecondaryLongPressMoveUpdate: + json['onSecondaryLongPressMoveUpdate'] as Map?, + onSecondaryLongPressUp: + json['onSecondaryLongPressUp'] as Map?, + onSecondaryLongPressEnd: + json['onSecondaryLongPressEnd'] as Map?, + onTertiaryLongPressDown: + json['onTertiaryLongPressDown'] as Map?, + onTertiaryLongPressCancel: + json['onTertiaryLongPressCancel'] as Map?, + onTertiaryLongPress: json['onTertiaryLongPress'] as Map?, + onTertiaryLongPressStart: + json['onTertiaryLongPressStart'] as Map?, + onTertiaryLongPressMoveUpdate: + json['onTertiaryLongPressMoveUpdate'] as Map?, + onTertiaryLongPressUp: + json['onTertiaryLongPressUp'] as Map?, + onTertiaryLongPressEnd: + json['onTertiaryLongPressEnd'] as Map?, + onVerticalDragDown: json['onVerticalDragDown'] as Map?, + onVerticalDragStart: json['onVerticalDragStart'] as Map?, + onVerticalDragUpdate: + json['onVerticalDragUpdate'] as Map?, + onVerticalDragEnd: json['onVerticalDragEnd'] as Map?, + onVerticalDragCancel: + json['onVerticalDragCancel'] as Map?, + onHorizontalDragDown: + json['onHorizontalDragDown'] as Map?, + onHorizontalDragStart: + json['onHorizontalDragStart'] as Map?, + onHorizontalDragUpdate: + json['onHorizontalDragUpdate'] as Map?, + onHorizontalDragEnd: json['onHorizontalDragEnd'] as Map?, + onHorizontalDragCancel: + json['onHorizontalDragCancel'] as Map?, + onForcePressStart: json['onForcePressStart'] as Map?, + onForcePressPeak: json['onForcePressPeak'] as Map?, + onForcePressUpdate: json['onForcePressUpdate'] as Map?, + onForcePressEnd: json['onForcePressEnd'] as Map?, + excludeFromSemantics: json['excludeFromSemantics'] as bool? ?? false, + dragStartBehavior: $enumDecodeNullable( + _$DragStartBehaviorEnumMap, json['dragStartBehavior']) ?? + DragStartBehavior.start, + ); + +Map _$StacGestureDetectorToJson( + _StacGestureDetector instance) => + { + 'child': instance.child, + 'onTapDown': instance.onTapDown, + 'onTapUp': instance.onTapUp, + 'onTap': instance.onTap, + 'onTapCancel': instance.onTapCancel, + 'onSecondaryTap': instance.onSecondaryTap, + 'onSecondaryTapDown': instance.onSecondaryTapDown, + 'onSecondaryTapUp': instance.onSecondaryTapUp, + 'onSecondaryTapCancel': instance.onSecondaryTapCancel, + 'onTertiaryTapDown': instance.onTertiaryTapDown, + 'onTertiaryTapUp': instance.onTertiaryTapUp, + 'onTertiaryTapCancel': instance.onTertiaryTapCancel, + 'onDoubleTapDown': instance.onDoubleTapDown, + 'onDoubleTap': instance.onDoubleTap, + 'onDoubleTapCancel': instance.onDoubleTapCancel, + 'onLongPressDown': instance.onLongPressDown, + 'onLongPressCancel': instance.onLongPressCancel, + 'onLongPress': instance.onLongPress, + 'onLongPressStart': instance.onLongPressStart, + 'onLongPressMoveUpdate': instance.onLongPressMoveUpdate, + 'onLongPressUp': instance.onLongPressUp, + 'onLongPressEnd': instance.onLongPressEnd, + 'onSecondaryLongPressDown': instance.onSecondaryLongPressDown, + 'onSecondaryLongPressCancel': instance.onSecondaryLongPressCancel, + 'onSecondaryLongPress': instance.onSecondaryLongPress, + 'onSecondaryLongPressStart': instance.onSecondaryLongPressStart, + 'onSecondaryLongPressMoveUpdate': instance.onSecondaryLongPressMoveUpdate, + 'onSecondaryLongPressUp': instance.onSecondaryLongPressUp, + 'onSecondaryLongPressEnd': instance.onSecondaryLongPressEnd, + 'onTertiaryLongPressDown': instance.onTertiaryLongPressDown, + 'onTertiaryLongPressCancel': instance.onTertiaryLongPressCancel, + 'onTertiaryLongPress': instance.onTertiaryLongPress, + 'onTertiaryLongPressStart': instance.onTertiaryLongPressStart, + 'onTertiaryLongPressMoveUpdate': instance.onTertiaryLongPressMoveUpdate, + 'onTertiaryLongPressUp': instance.onTertiaryLongPressUp, + 'onTertiaryLongPressEnd': instance.onTertiaryLongPressEnd, + 'onVerticalDragDown': instance.onVerticalDragDown, + 'onVerticalDragStart': instance.onVerticalDragStart, + 'onVerticalDragUpdate': instance.onVerticalDragUpdate, + 'onVerticalDragEnd': instance.onVerticalDragEnd, + 'onVerticalDragCancel': instance.onVerticalDragCancel, + 'onHorizontalDragDown': instance.onHorizontalDragDown, + 'onHorizontalDragStart': instance.onHorizontalDragStart, + 'onHorizontalDragUpdate': instance.onHorizontalDragUpdate, + 'onHorizontalDragEnd': instance.onHorizontalDragEnd, + 'onHorizontalDragCancel': instance.onHorizontalDragCancel, + 'onForcePressStart': instance.onForcePressStart, + 'onForcePressPeak': instance.onForcePressPeak, + 'onForcePressUpdate': instance.onForcePressUpdate, + 'onForcePressEnd': instance.onForcePressEnd, + 'excludeFromSemantics': instance.excludeFromSemantics, + 'dragStartBehavior': + _$DragStartBehaviorEnumMap[instance.dragStartBehavior]!, + }; + +const _$DragStartBehaviorEnumMap = { + DragStartBehavior.down: 'down', + DragStartBehavior.start: 'start', +}; diff --git a/packages/stac/lib/src/parsers/widgets/stac_gesture_detector/stac_gesture_detector_parser.dart b/packages/stac/lib/src/parsers/widgets/stac_gesture_detector/stac_gesture_detector_parser.dart new file mode 100644 index 00000000..cec107b6 --- /dev/null +++ b/packages/stac/lib/src/parsers/widgets/stac_gesture_detector/stac_gesture_detector_parser.dart @@ -0,0 +1,114 @@ +import 'package:flutter/material.dart'; +import 'package:stac/src/framework/framework.dart'; +import 'package:stac/src/parsers/widgets/stac_gesture_detector/stac_gesture_detector.dart'; +import 'package:stac/src/utils/widget_type.dart'; +import 'package:stac_framework/stac_framework.dart'; + +class StacGestureDetectorParser extends StacParser { + const StacGestureDetectorParser(); + + @override + String get type => WidgetType.gestureDetector.name; + + @override + StacGestureDetector getModel(Map json) => + StacGestureDetector.fromJson(json); + + @override + Widget parse(BuildContext context, StacGestureDetector model) { + return GestureDetector( + onTapDown: (_) => Stac.onCallFromJson(model.onTapDown, context), + onTapUp: (_) => Stac.onCallFromJson(model.onTapUp, context), + onTap: () => Stac.onCallFromJson(model.onTap, context), + onTapCancel: () => Stac.onCallFromJson(model.onTapCancel, context), + onSecondaryTap: () => Stac.onCallFromJson(model.onSecondaryTap, context), + onSecondaryTapDown: (_) => + Stac.onCallFromJson(model.onSecondaryTapDown, context), + onSecondaryTapUp: (_) => + Stac.onCallFromJson(model.onSecondaryTapUp, context), + onSecondaryTapCancel: () => + Stac.onCallFromJson(model.onSecondaryTapCancel, context), + onTertiaryTapDown: (_) => + Stac.onCallFromJson(model.onTertiaryTapDown, context), + onTertiaryTapUp: (_) => + Stac.onCallFromJson(model.onTertiaryTapUp, context), + onTertiaryTapCancel: () => + Stac.onCallFromJson(model.onTertiaryTapCancel, context), + onDoubleTapDown: (_) => + Stac.onCallFromJson(model.onDoubleTapDown, context), + onDoubleTap: () => Stac.onCallFromJson(model.onDoubleTap, context), + onDoubleTapCancel: () => + Stac.onCallFromJson(model.onDoubleTapCancel, context), + onLongPressDown: (_) => + Stac.onCallFromJson(model.onLongPressDown, context), + onLongPressCancel: () => + Stac.onCallFromJson(model.onLongPressCancel, context), + onLongPress: () => Stac.onCallFromJson(model.onLongPress, context), + onLongPressStart: (_) => + Stac.onCallFromJson(model.onLongPressStart, context), + onLongPressMoveUpdate: (_) => + Stac.onCallFromJson(model.onLongPressMoveUpdate, context), + onLongPressUp: () => Stac.onCallFromJson(model.onLongPressUp, context), + onLongPressEnd: (_) => Stac.onCallFromJson(model.onLongPressEnd, context), + onSecondaryLongPressDown: (_) => + Stac.onCallFromJson(model.onSecondaryLongPressDown, context), + onSecondaryLongPressCancel: () => + Stac.onCallFromJson(model.onSecondaryLongPressCancel, context), + onSecondaryLongPress: () => + Stac.onCallFromJson(model.onSecondaryLongPress, context), + onSecondaryLongPressStart: (_) => + Stac.onCallFromJson(model.onSecondaryLongPressStart, context), + onSecondaryLongPressMoveUpdate: (_) => + Stac.onCallFromJson(model.onSecondaryLongPressMoveUpdate, context), + onSecondaryLongPressUp: () => + Stac.onCallFromJson(model.onSecondaryLongPressUp, context), + onSecondaryLongPressEnd: (_) => + Stac.onCallFromJson(model.onSecondaryLongPressEnd, context), + onTertiaryLongPressDown: (_) => + Stac.onCallFromJson(model.onTertiaryLongPressDown, context), + onTertiaryLongPressCancel: () => + Stac.onCallFromJson(model.onTertiaryLongPressCancel, context), + onTertiaryLongPress: () => + Stac.onCallFromJson(model.onTertiaryLongPress, context), + onTertiaryLongPressStart: (_) => + Stac.onCallFromJson(model.onTertiaryLongPressStart, context), + onTertiaryLongPressMoveUpdate: (_) => + Stac.onCallFromJson(model.onTertiaryLongPressMoveUpdate, context), + onTertiaryLongPressUp: () => + Stac.onCallFromJson(model.onTertiaryLongPressUp, context), + onTertiaryLongPressEnd: (_) => + Stac.onCallFromJson(model.onTertiaryLongPressEnd, context), + onVerticalDragDown: (_) => + Stac.onCallFromJson(model.onVerticalDragDown, context), + onVerticalDragStart: (_) => + Stac.onCallFromJson(model.onVerticalDragStart, context), + onVerticalDragUpdate: (_) => + Stac.onCallFromJson(model.onVerticalDragUpdate, context), + onVerticalDragEnd: (_) => + Stac.onCallFromJson(model.onVerticalDragEnd, context), + onVerticalDragCancel: () => + Stac.onCallFromJson(model.onVerticalDragCancel, context), + onHorizontalDragDown: (_) => + Stac.onCallFromJson(model.onHorizontalDragDown, context), + onHorizontalDragStart: (_) => + Stac.onCallFromJson(model.onHorizontalDragStart, context), + onHorizontalDragUpdate: (_) => + Stac.onCallFromJson(model.onHorizontalDragUpdate, context), + onHorizontalDragEnd: (_) => + Stac.onCallFromJson(model.onHorizontalDragEnd, context), + onHorizontalDragCancel: () => + Stac.onCallFromJson(model.onHorizontalDragCancel, context), + onForcePressStart: (_) => + Stac.onCallFromJson(model.onForcePressStart, context), + onForcePressPeak: (_) => + Stac.onCallFromJson(model.onForcePressPeak, context), + onForcePressUpdate: (_) => + Stac.onCallFromJson(model.onForcePressUpdate, context), + onForcePressEnd: (_) => + Stac.onCallFromJson(model.onForcePressEnd, context), + excludeFromSemantics: model.excludeFromSemantics, + dragStartBehavior: model.dragStartBehavior, + child: Stac.fromJson(model.child, context), + ); + } +} diff --git a/packages/stac/lib/src/parsers/widgets/widgets.dart b/packages/stac/lib/src/parsers/widgets/widgets.dart index f7b50a5d..8e65be4e 100644 --- a/packages/stac/lib/src/parsers/widgets/widgets.dart +++ b/packages/stac/lib/src/parsers/widgets/widgets.dart @@ -48,6 +48,7 @@ export 'package:stac/src/parsers/widgets/stac_form/stac_form.dart'; export 'package:stac/src/parsers/widgets/stac_form/stac_form_scope.dart'; export 'package:stac/src/parsers/widgets/stac_form_field_validator/stac_form_validator.dart'; export 'package:stac/src/parsers/widgets/stac_fractionally_sized_box/stac_fractionally_sized_box.dart'; +export 'package:stac/src/parsers/widgets/stac_gesture_detector/stac_gesture_detector.dart'; export 'package:stac/src/parsers/widgets/stac_gradient/stac_gradient.dart'; export 'package:stac/src/parsers/widgets/stac_grid_view/stac_grid_view.dart'; export 'package:stac/src/parsers/widgets/stac_hero/stac_hero.dart'; diff --git a/packages/stac/lib/src/utils/widget_type.dart b/packages/stac/lib/src/utils/widget_type.dart index 47205fc3..c84fb6d5 100644 --- a/packages/stac/lib/src/utils/widget_type.dart +++ b/packages/stac/lib/src/utils/widget_type.dart @@ -32,6 +32,7 @@ enum WidgetType { form, formField, fractionallySizedBox, + gestureDetector, gridView, hero, icon, diff --git a/website/docs/widgets/gesture_detector.md b/website/docs/widgets/gesture_detector.md new file mode 100644 index 00000000..9322c1e6 --- /dev/null +++ b/website/docs/widgets/gesture_detector.md @@ -0,0 +1,208 @@ +# GestureDetector + +The `GestureDetector` widget in Stac allows you to detect various gestures and user interactions within your application. It wraps Flutter's native GestureDetector widget, providing a JSON-based interface to handle touch events, taps, drags, and more. + +## Usage + +To use a GestureDetector in your Stac JSON, specify the widget type as "gestureDetector" and provide a child widget along with any gesture callbacks you want to handle. + +```json +{ + "type": "gestureDetector", + "child": { + "type": "container", + "color": "#2196F3", + "width": 200, + "height": 200, + "alignment": "center", + "child": { + "type": "text", + "data": "Tap me!", + "style": { + "color": "#FFFFFF", + "fontSize": 20 + } + } + }, + "onTap": { + "actionType": "showSnackBar", + "content": { + "type": "text", + "data": "This is a Snackbar" + } + } +} +``` + +## Properties + +### Child Widget + +| Property | Type | Description | +|----------|------|-------------| +| `child` | Widget | The widget that will respond to gestures | + +### Tap Gestures + +| Property | Type | Description | +|----------|------|-------------| +| `onTapDown` | Action | Called when a pointer contacts the screen | +| `onTapUp` | Action | Called when a pointer stops contacting the screen | +| `onTap` | Action | Called when a tap occurs | +| `onTapCancel` | Action | Called when the tap is canceled | +| `onDoubleTapDown` | Action | Called when a pointer contacts the screen in a potential double tap | +| `onDoubleTap` | Action | Called when a double tap occurs | +| `onDoubleTapCancel` | Action | Called when the double tap is canceled | + +### Secondary and Tertiary Tap Gestures + +| Property | Type | Description | +|----------|------|-------------| +| `onSecondaryTap` | Action | Called when a secondary tap occurs (e.g., right-click) | +| `onSecondaryTapDown` | Action | Called when a secondary pointer contacts the screen | +| `onSecondaryTapUp` | Action | Called when a secondary pointer stops contacting the screen | +| `onSecondaryTapCancel` | Action | Called when the secondary tap is canceled | +| `onTertiaryTapDown` | Action | Called when a tertiary pointer contacts the screen | +| `onTertiaryTapUp` | Action | Called when a tertiary pointer stops contacting the screen | +| `onTertiaryTapCancel` | Action | Called when the tertiary tap is canceled | + +### Long Press Gestures + +| Property | Type | Description | +|----------|------|-------------| +| `onLongPressDown` | Action | Called when a pointer contacts the screen in a potential long press | +| `onLongPressCancel` | Action | Called when the long press is canceled | +| `onLongPress` | Action | Called when a long press occurs | +| `onLongPressStart` | Action | Called when a long press starts | +| `onLongPressMoveUpdate` | Action | Called when a long press move update occurs | +| `onLongPressUp` | Action | Called when a long press up occurs | +| `onLongPressEnd` | Action | Called when a long press ends | + +### Secondary and Tertiary Long Press Gestures + +| Property | Type | Description | +|----------|------|-------------| +| `onSecondaryLongPressDown` | Action | Called when a secondary pointer contacts the screen in a potential long press | +| `onSecondaryLongPressCancel` | Action | Called when the secondary long press is canceled | +| `onSecondaryLongPress` | Action | Called when a secondary long press occurs | +| `onSecondaryLongPressStart` | Action | Called when a secondary long press starts | +| `onSecondaryLongPressMoveUpdate` | Action | Called when a secondary long press move update occurs | +| `onSecondaryLongPressUp` | Action | Called when a secondary long press up occurs | +| `onSecondaryLongPressEnd` | Action | Called when a secondary long press ends | +| `onTertiaryLongPressDown` | Action | Called when a tertiary pointer contacts the screen in a potential long press | +| `onTertiaryLongPressCancel` | Action | Called when the tertiary long press is canceled | +| `onTertiaryLongPress` | Action | Called when a tertiary long press occurs | +| `onTertiaryLongPressStart` | Action | Called when a tertiary long press starts | +| `onTertiaryLongPressMoveUpdate` | Action | Called when a tertiary long press move update occurs | +| `onTertiaryLongPressUp` | Action | Called when a tertiary long press up occurs | +| `onTertiaryLongPressEnd` | Action | Called when a tertiary long press ends | + +### Drag Gestures + +| Property | Type | Description | +|----------|------|-------------| +| `onVerticalDragDown` | Action | Called when a pointer contacts the screen and might begin a vertical drag | +| `onVerticalDragStart` | Action | Called when a pointer starts a vertical drag | +| `onVerticalDragUpdate` | Action | Called when a pointer updates a vertical drag | +| `onVerticalDragEnd` | Action | Called when a pointer ends a vertical drag | +| `onVerticalDragCancel` | Action | Called when the vertical drag is canceled | +| `onHorizontalDragDown` | Action | Called when a pointer contacts the screen and might begin a horizontal drag | +| `onHorizontalDragStart` | Action | Called when a pointer starts a horizontal drag | +| `onHorizontalDragUpdate` | Action | Called when a pointer updates a horizontal drag | +| `onHorizontalDragEnd` | Action | Called when a pointer ends a horizontal drag | +| `onHorizontalDragCancel` | Action | Called when the horizontal drag is canceled | + +### Force Press Gestures + +| Property | Type | Description | +|----------|------|-------------| +| `onForcePressStart` | Action | Called when a force press starts | +| `onForcePressPeak` | Action | Called when a force press reaches its peak force | +| `onForcePressUpdate` | Action | Called when a force press updates | +| `onForcePressEnd` | Action | Called when a force press ends | + +### Other Properties + +| Property | Type | Default | Description | +|----------|------|---------|-------------| +| `excludeFromSemantics` | boolean | false | Whether to exclude the gestures from the semantics tree | +| `dragStartBehavior` | string | "start" | Determines when a drag formally starts ("start" or "down") | + +## Examples + +### Simple Tap Example + +```json +{ + "type": "gestureDetector", + "onTap": { + "actionType": "navigate", + "routeName": "/details" + }, + "child": { + "type": "container", + "padding": 16, + "color": "#E0E0E0", + "child": { + "type": "text", + "data": "Navigate to Details" + } + } +} +``` + +### Drag Example + +```json +{ + "type": "gestureDetector", + "onHorizontalDragEnd": { + "actionType": "handleSwipe" + }, + "child": { + "type": "container", + "width": 200, + "height": 200, + "color": "#F5F5F5", + "alignment": "center", + "child": { + "type": "text", + "data": "Swipe horizontally" + } + } +} +``` + +### Long Press Example + +```json +{ + "type": "gestureDetector", + "onLongPress": { + "actionType": "showDialog", + "title": "Long Press Detected", + "content": "You performed a long press on the widget." + }, + "child": { + "type": "container", + "padding": 16, + "decoration": { + "color": "#4CAF50", + "borderRadius": 8 + }, + "child": { + "type": "text", + "data": "Long press me", + "style": { + "color": "#FFFFFF" + } + } + } +} +``` + +## Action Handling + +Each gesture callback in Stac GestureDetector accepts an action object that defines what should happen when the gesture is detected. This can be a navigation action, showing a dialog, executing a custom function, or any other action supported by your Stac application. + +For more information on actions, see the [Actions documentation](../actions/overview.md).