I'm using Provider log time, but recently due to reason not important here I tried to upgrade to latest version of Provider (from 3.1.0+1 to 4.3.2), but I couldn't do it because of error:
error: The name 'BuildContext' is defined in the libraries 'package:flutter/src/widgets/framework.dart (via package:flutter/widgets.dart)' and 'package:provider/src/provider.dart (via package:provider/provider.dart)'. (ambiguous_import at [XXXX] lib\X\X\X.dart:74)
Is that expected?
Should I use prefix for Provider?
I have 191 errors like that.
There is nothing named "BuildContext" exported by provider
Maybe try a flutter clean and flutter pub get
You are correct, cleaning, pub get, and restart Android Studio fixed the issue.
Thank you.
Most helpful comment
You are correct, cleaning, pub get, and restart Android Studio fixed the issue.
Thank you.