@@ -8,6 +8,7 @@ import 'about_zulip.dart';
8
8
import 'action_sheet.dart' ;
9
9
import 'app.dart' ;
10
10
import 'app_bar.dart' ;
11
+ import 'button.dart' ;
11
12
import 'color.dart' ;
12
13
import 'content.dart' ;
13
14
import 'icons.dart' ;
@@ -601,49 +602,3 @@ class _AboutZulipButton extends _MenuButton {
601
602
Navigator .of (context).push (AboutZulipPage .buildRoute (context));
602
603
}
603
604
}
604
-
605
- /// Apply [Transform.scale] to the child widget when tapped, and reset its scale
606
- /// when released, while animating the transitions.
607
- class AnimatedScaleOnTap extends StatefulWidget {
608
- const AnimatedScaleOnTap ({
609
- super .key,
610
- required this .scaleEnd,
611
- required this .duration,
612
- required this .child,
613
- });
614
-
615
- /// The terminal scale to animate to.
616
- final double scaleEnd;
617
-
618
- /// The duration over which to animate the scale change.
619
- final Duration duration;
620
-
621
- final Widget child;
622
-
623
- @override
624
- State <AnimatedScaleOnTap > createState () => _AnimatedScaleOnTapState ();
625
- }
626
-
627
- class _AnimatedScaleOnTapState extends State <AnimatedScaleOnTap > {
628
- double _scale = 1 ;
629
-
630
- void _changeScale (double scale) {
631
- setState (() {
632
- _scale = scale;
633
- });
634
- }
635
-
636
- @override
637
- Widget build (BuildContext context) {
638
- return GestureDetector (
639
- behavior: HitTestBehavior .translucent,
640
- onTapDown: (_) => _changeScale (widget.scaleEnd),
641
- onTapUp: (_) => _changeScale (1 ),
642
- onTapCancel: () => _changeScale (1 ),
643
- child: AnimatedScale (
644
- scale: _scale,
645
- duration: widget.duration,
646
- curve: Curves .easeOut,
647
- child: widget.child));
648
- }
649
- }
0 commit comments