Skip to content

Commit 47d82b9

Browse files
nate-thegrateandroidseb
authored andcommitted
[two_dimensional_scrollables] prepare for const AnimationStyle (flutter#8397)
unblocks flutter/flutter#160564 Will go back through and implement `const` constructors in these spots once the framework PR lands.
1 parent 535d6da commit 47d82b9

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

packages/two_dimensional_scrollables/lib/src/tree_view/tree.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,7 @@ class TreeView<T> extends StatefulWidget {
496496

497497
/// The default [AnimationStyle] used for node expand and collapse animations,
498498
/// when one has not been provided in [toggleAnimationStyle].
499+
// ignore: prefer_const_constructors
499500
static AnimationStyle defaultToggleAnimationStyle = AnimationStyle(
500501
curve: defaultAnimationCurve,
501502
duration: defaultAnimationDuration,

packages/two_dimensional_scrollables/test/tree_view/render_tree_test.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,7 @@ void main() {
505505
// Customize the animation
506506
treeView = TreeView<String>(
507507
tree: treeNodes,
508+
// ignore: prefer_const_constructors
508509
toggleAnimationStyle: AnimationStyle(
509510
duration: const Duration(milliseconds: 500),
510511
curve: Curves.bounceIn,

packages/two_dimensional_scrollables/test/tree_view/tree_test.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,7 @@ void main() {
546546
// Default
547547
expect(
548548
style,
549+
// ignore: prefer_const_constructors
549550
AnimationStyle(
550551
duration: TreeView.defaultAnimationDuration,
551552
curve: TreeView.defaultAnimationCurve,
@@ -574,6 +575,7 @@ void main() {
574575
await tester.pumpWidget(MaterialApp(
575576
home: TreeView<String>(
576577
tree: simpleNodeSet,
578+
// ignore: prefer_const_constructors
577579
toggleAnimationStyle: AnimationStyle(
578580
curve: Curves.easeIn,
579581
duration: const Duration(milliseconds: 200),
@@ -757,6 +759,7 @@ void main() {
757759
home: TreeView<String>(
758760
tree: tree,
759761
controller: controller,
762+
// ignore: prefer_const_constructors
760763
toggleAnimationStyle: AnimationStyle(
761764
curve: Curves.easeInOut,
762765
duration: Duration.zero,
@@ -843,6 +846,7 @@ void main() {
843846
home: TreeView<String>(
844847
tree: tree,
845848
controller: controller,
849+
// ignore: prefer_const_constructors
846850
toggleAnimationStyle: AnimationStyle(
847851
curve: Curves.easeInOut,
848852
duration: const Duration(milliseconds: 200),

0 commit comments

Comments
 (0)