Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@ class TreeView<T> extends StatefulWidget {

/// The default [AnimationStyle] used for node expand and collapse animations,
/// when one has not been provided in [toggleAnimationStyle].
// ignore: prefer_const_constructors
static AnimationStyle defaultToggleAnimationStyle = AnimationStyle(
curve: defaultAnimationCurve,
duration: defaultAnimationDuration,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,7 @@ void main() {
// Customize the animation
treeView = TreeView<String>(
tree: treeNodes,
// ignore: prefer_const_constructors
toggleAnimationStyle: AnimationStyle(
duration: const Duration(milliseconds: 500),
curve: Curves.bounceIn,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,7 @@ void main() {
// Default
expect(
style,
// ignore: prefer_const_constructors
AnimationStyle(
duration: TreeView.defaultAnimationDuration,
curve: TreeView.defaultAnimationCurve,
Expand Down Expand Up @@ -574,6 +575,7 @@ void main() {
await tester.pumpWidget(MaterialApp(
home: TreeView<String>(
tree: simpleNodeSet,
// ignore: prefer_const_constructors
toggleAnimationStyle: AnimationStyle(
curve: Curves.easeIn,
duration: const Duration(milliseconds: 200),
Expand Down Expand Up @@ -757,6 +759,7 @@ void main() {
home: TreeView<String>(
tree: tree,
controller: controller,
// ignore: prefer_const_constructors
toggleAnimationStyle: AnimationStyle(
curve: Curves.easeInOut,
duration: Duration.zero,
Expand Down Expand Up @@ -843,6 +846,7 @@ void main() {
home: TreeView<String>(
tree: tree,
controller: controller,
// ignore: prefer_const_constructors
toggleAnimationStyle: AnimationStyle(
curve: Curves.easeInOut,
duration: const Duration(milliseconds: 200),
Expand Down
Loading