Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The named parameter 'swapAnimationDuration' isn't defined. (has been renamed to duration) #1542

Open
florianneukirchen opened this issue Jan 3, 2024 · 1 comment

Comments

@florianneukirchen
Copy link

With recent flutter versions, passing the parameter swapAnimationDuration as explained in the documentation and in issues #684 and #109 results in an Error: The named parameter 'swapAnimationDuration' isn't defined. ) .

It turns out the named parameter in ImplicitlyAnimatedWidget is (or has been renamed to?) duration.

The following code works:

LineChart(
  duration: Duration.zero,
  LineChartData(
    // Your chart data here
  ),
)

Instead of:

LineChart(
  swapAnimationDuration: Duration.zero,
  LineChartData(
    // Your chart data here
  ),
)

I am not sure whether this should be fixed in the documentation or in the code of fl_chart.

Versions
Flutter 3.16.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision db7ef5bf9f (vor 7 Wochen) • 2023-11-15 11:25:44 -0800
Engine • revision 74d16627b9
Tools • Dart 3.2.0 • DevTools 2.28.2

fl_chart 0.66.0

@NotTsunami
Copy link

There is a PR already to address this that has not been merged yet: #1496

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants