Skip to content

Upgrading flutter_slidable 4 to 5

Breaking4.0.3 → 5.1.0Breaking1Platform1New1Fixed5

BreakingUpgrade verdict

1 breaking change and a platform requirement change.

  • The package now gets its theming from a separate `material_ui` package instead of Flutter's built-in Material library. Your app needs to move to `material_ui` as well.
  • You need a newer Flutter and Dart to use this version: Flutter 3.47.0 or later and Dart 3.13.0 or later.
2 items need code or config changes

flutter_slidable publishes an official migration guide for version 5. It covers more than the release notes do.

Migration guide ↗

Dart SDK requirement changed in 5.0.0: >=3.6.0 <4.0.0 → ^3.13.0.

Flutter requirement changed in 5.0.0: >=3.27.0 → >=3.47.0.

Breaking1
Migrates to the decoupled material_ui package, so built-in actions read their theme from material_ui and apps must migrate too.
material_ui
Platform1
Raises the minimum Flutter version to 3.47.0 and the minimum Dart version to 3.13.0.

Generated by DepDelta from published Dart source. Not mixed with prose notes.

  • changed: ctor SlidableAction({ super.key, this.flex = …, this.backgroundColor = …, this.foregroundColor, this.autoClose = …, required this.onPressed, this.icon, this.spacing = …, this.label, this.borderRadius = …, this.padding, this.alignment, }) → ctor SlidableAction({ super.key, this.flex = …, this.backgroundColor = …, this.foregroundColor, this.autoClose = …, required this.onPressed, this.icon, this.spacing = …, this.iconSize, this.label, this.labelStyle, this.borderRadius = …, this.padding, this.alignment, })
  • added: field SlidableAction.iconSize: final double?
  • added: field SlidableAction.labelStyle: final TextStyle?