Not able to run stripe_sdk example in flutter
181
According to document https://flutter.dev/docs/release/breaking-changes/scaffold-messenger
ScaffoldMessenger
Landed in version: 1.23.0-13.0.pre
In stable
release: not yet
current release version is 1.22.5
, 12/11/2020
You can do
flutter channel master
flutter upgrade
Author by
Admin
Updated on December 27, 2022Comments
-
Admin over 1 year
I am trying to run the
stripe_sdk
dependency with flutter and using firebase. But I am getting build error while running the example of the sdk. Below are the error details. How should I resolve it?../lib/src/ui/screens/payment_methods_screen.dart:151:39: Error: The getter 'ScaffoldMessenger' isn't defined for the class 'PaymentMethodsList'.
- 'PaymentMethodsList' is from 'package:stripe_sdk/src/ui/screens/payment_methods_screen.dart' ('../lib/src/ui/screens/payment_methods_screen.dart'). Try correcting the name to the name of an existing getter, or defining a getter or field named 'ScaffoldMessenger'. ScaffoldMessenger.of(rootContext).showSnackBar(SnackBar( ^^^^^^^^^^^^^^^^^
-
Admin over 3 yearsBut will it run on android and iOS?
-
chunhunghan over 3 yearsYes. ScaffoldMessenger is part of Flutter framework. it can run on Android and iOS
-
chunhunghan over 3 yearsyou can use flutter doctor to check your current version
-
Admin over 3 yearsBut I won't be able to integrate with the flutter app build in flutter stable version. how should I do that? Because the app build in stable version won't run under master version for the same.
-
chunhunghan over 3 years@michaeljohnson, Need to reproduce, could you post minimum reproduce code to a new question and error message you encounter. to allow more people can help you.