const AnimationStyle (#160564)
[**AnimationStyle**](https://main-api.flutter.dev/flutter/animation/AnimationStyle-class.html) is an [`@immutable`](https://main-api.flutter.dev/flutter/meta/immutable-constant.html) class with all `final` fields. This pull request gives it a `const` constructor. <br> related: #160563
This commit is contained in:
@@ -43,9 +43,9 @@ class _ChipAnimationStyleExampleState extends State<ChipAnimationStyleExample> {
|
||||
children: <Widget>[
|
||||
FilterChip.elevated(
|
||||
chipAnimationStyle: ChipAnimationStyle(
|
||||
enableAnimation: AnimationStyle(
|
||||
duration: const Duration(seconds: 3),
|
||||
reverseDuration: const Duration(seconds: 1),
|
||||
enableAnimation: const AnimationStyle(
|
||||
duration: Duration(seconds: 3),
|
||||
reverseDuration: Duration(seconds: 1),
|
||||
),
|
||||
),
|
||||
onSelected: !enabled ? null : (bool value) {},
|
||||
@@ -69,9 +69,9 @@ class _ChipAnimationStyleExampleState extends State<ChipAnimationStyleExample> {
|
||||
children: <Widget>[
|
||||
FilterChip.elevated(
|
||||
chipAnimationStyle: ChipAnimationStyle(
|
||||
selectAnimation: AnimationStyle(
|
||||
duration: const Duration(seconds: 3),
|
||||
reverseDuration: const Duration(seconds: 1),
|
||||
selectAnimation: const AnimationStyle(
|
||||
duration: Duration(seconds: 3),
|
||||
reverseDuration: Duration(seconds: 1),
|
||||
),
|
||||
),
|
||||
backgroundColor: Colors.amber,
|
||||
@@ -102,9 +102,9 @@ class _ChipAnimationStyleExampleState extends State<ChipAnimationStyleExample> {
|
||||
children: <Widget>[
|
||||
FilterChip.elevated(
|
||||
chipAnimationStyle: ChipAnimationStyle(
|
||||
avatarDrawerAnimation: AnimationStyle(
|
||||
duration: const Duration(seconds: 2),
|
||||
reverseDuration: const Duration(seconds: 1),
|
||||
avatarDrawerAnimation: const AnimationStyle(
|
||||
duration: Duration(seconds: 2),
|
||||
reverseDuration: Duration(seconds: 1),
|
||||
),
|
||||
),
|
||||
selected: showCheckmark,
|
||||
@@ -127,9 +127,9 @@ class _ChipAnimationStyleExampleState extends State<ChipAnimationStyleExample> {
|
||||
children: <Widget>[
|
||||
FilterChip.elevated(
|
||||
chipAnimationStyle: ChipAnimationStyle(
|
||||
deleteDrawerAnimation: AnimationStyle(
|
||||
duration: const Duration(seconds: 2),
|
||||
reverseDuration: const Duration(seconds: 1),
|
||||
deleteDrawerAnimation: const AnimationStyle(
|
||||
duration: Duration(seconds: 2),
|
||||
reverseDuration: Duration(seconds: 1),
|
||||
),
|
||||
),
|
||||
onDeleted: showDeleteIcon ? () {} : null,
|
||||
|
||||
Reference in New Issue
Block a user