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

Migration to flutter 2.0 required #12

Open
tech4lifeapps opened this issue Apr 8, 2021 · 1 comment
Open

Migration to flutter 2.0 required #12

tech4lifeapps opened this issue Apr 8, 2021 · 1 comment

Comments

@tech4lifeapps
Copy link

The code does not run on Flutter 2.0

@tech4lifeapps tech4lifeapps changed the title Migrate to flutter 2.0 Migration to flutter 2.0 required Apr 8, 2021
@legolegoles
Copy link

  1. You need to upgrade to "provider: ^5.0.0" in pubspec. yaml.
  2. Add "listen: false" parameter when you call Provider.of(context) in line 49 of add_task_screen.dart
    so it looks like this: Provider.of(context, listen: false)
  3. Change the 'builder' paramater of ChangeNotifierProvider to 'create' in line 12 of main.dart
    so it looks like this: create: (context) => TaskData()
  4. So far it works for me on MacOS Big Sur 11.2.2 M1, flutter 2.2, Xcode 12.5. Any other errors you may encounter, try to search from Google, StackOverflow, Github, etc. Thanks!

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