refactor: Remove animation dependency
This commit is contained in:
parent
38cda39672
commit
a8aadc834f
3 changed files with 5 additions and 31 deletions
|
|
@ -1,6 +1,5 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'package:animations/animations.dart';
|
|
||||||
import 'package:emoji_picker_flutter/locales/default_emoji_set_locale.dart';
|
import 'package:emoji_picker_flutter/locales/default_emoji_set_locale.dart';
|
||||||
import 'package:matrix/matrix.dart';
|
import 'package:matrix/matrix.dart';
|
||||||
|
|
||||||
|
|
@ -273,27 +272,11 @@ class ChatInputRow extends StatelessWidget {
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
tooltip: L10n.of(context).emojis,
|
tooltip: L10n.of(context).emojis,
|
||||||
color: theme.colorScheme.onPrimaryContainer,
|
color: theme.colorScheme.onPrimaryContainer,
|
||||||
icon: PageTransitionSwitcher(
|
icon: Icon(
|
||||||
transitionBuilder:
|
controller.showEmojiPicker
|
||||||
(
|
? Icons.keyboard
|
||||||
Widget child,
|
: Icons.add_reaction_outlined,
|
||||||
Animation<double> primaryAnimation,
|
key: ValueKey(controller.showEmojiPicker),
|
||||||
Animation<double> secondaryAnimation,
|
|
||||||
) {
|
|
||||||
return SharedAxisTransition(
|
|
||||||
animation: primaryAnimation,
|
|
||||||
secondaryAnimation: secondaryAnimation,
|
|
||||||
transitionType: SharedAxisTransitionType.scaled,
|
|
||||||
fillColor: Colors.transparent,
|
|
||||||
child: child,
|
|
||||||
);
|
|
||||||
},
|
|
||||||
child: Icon(
|
|
||||||
controller.showEmojiPicker
|
|
||||||
? Icons.keyboard
|
|
||||||
: Icons.add_reaction_outlined,
|
|
||||||
key: ValueKey(controller.showEmojiPicker),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
onPressed: controller.emojiPickerAction,
|
onPressed: controller.emojiPickerAction,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -25,14 +25,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.13.6"
|
version: "0.13.6"
|
||||||
animations:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: animations
|
|
||||||
sha256: "18938cefd7dcc04e1ecac0db78973761a01e4bc2d6bfae0cfa596bfeac9e96ab"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "2.1.1"
|
|
||||||
ansicolor:
|
ansicolor:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ environment:
|
||||||
flutter: 3.41.4
|
flutter: 3.41.4
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
animations: ^2.1.1
|
|
||||||
archive: ^4.0.7
|
archive: ^4.0.7
|
||||||
async: ^2.11.0
|
async: ^2.11.0
|
||||||
badges: ^3.1.2
|
badges: ^3.1.2
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue