Dave Lister
Dave Lister

Reputation: 451

How to upgrade Flutter without breaking my app

I have a fairly complex app written in Flutter, that has the requirement to save data, photos and video whilst offline, and can sync when there is an internet connection.

Now I haven't updated this working app for 6 months, is it safe to upgrade to latest version of Flutter along with all of the plugins I am using ?

Running on a iMac with iPhone X connected for debug ( Android emulators struggle - I need a proper device for testing before publishing app )

Flutter 1.2.1-pre.101

pubspec.yaml

  intl: ^0.15.7
  sqflite: ^0.12.2+1
  image_picker: ^0.4.5
  path_provider: ^0.5.0
  image: ^2.0.6
  date_format: ^1.0.6
  http: ^0.12.0+1
  map_view:
    git:
      url: git://github.com/Eimji/flutter_google_map_view.git
  location: ^2.3.2
  xml: ^3.3.1
  camera: ^0.5.4+2
  video_player: ^0.10.0
  firebase_storage: ^2.1.0+1

Should I create a new isolated install of Flutter and upgrade the plugins ?

Upvotes: 0

Views: 759

Answers (2)

Ropali Munshi
Ropali Munshi

Reputation: 3026

Probably only the plugins which are developed by Flutter Team will break because they have added the latest AndroidX support. You can migrate your project to support the AndroidX but it may or may not be the smooth transition for you. They recommend some of the last versions of their plugins which you can safely use if you don't want to go for the latest AndroidX. I have faced the issue with the map_view plugin while upgrading Flutter So I would suggest you to first do it on an isolated environment to see if this works or not. To know more about the AndroidX, refer this link, https://flutter.dev/docs/development/packages-and-plugins/androidx-compatibility

For migration refre this, https://medium.com/@swhussain110/how-to-migrate-your-flutter-app-to-androidx-9a78eaaa924b

Upvotes: 1

Hardik Kumbhani
Hardik Kumbhani

Reputation: 2021

You can just upgrade your flutter by

flutter upgrade

And after if you found any issue then you can slove like

flutter packages get

and all your dependency churn is gone away.

Upvotes: 0

Related Questions