Ha, that's been one of the benefits I've extolled to others about Flutter, being able to use a "real" programming languages. I'm coming from Swift. There are some things I miss but Dart holds its own.
Ha, that's been one of the benefits I've extolled to others about Flutter, being able to use a "real" programming languages. I'm coming from Swift. There are some things I miss but Dart holds its own.
My Flutter app supposedly runs on Android 5.1, which came out in March 2015. Amazing if true!
It's been a learning experience moving from iOS to Flutter. In iOS I'm used to being able to broadcast notifications to the entire app whereas in Flutter notifications only go *up* the widget tree. How to send information downstream? ChangeNotificationProviders. Will check out your recommendations.
I not only need a service, but to be notified when values change. This is what I'm using to notify my screens when a purchase status has changed.
What would you recommend?
Fortunately what I was looking for was a "global" provider accessible everywhere in my app. In that case, you can wrap your App widget with the ChangeNotifierProvider. Then everyone will able to access it.
One can wrap the widget you're navigating to in the route with a ChangeNotifierProvider.value and pass the provider instance down that way. But you'd encounter a problem if you're using static restorable routes like me. (You don't have access to the provider instance at that point.)
On the subject of #flutter ChangeNotifierProviders, TIL that a Provider is not accessible to widgets on the other side of a Navigator push. Trying to access it gets a "could not find provider above this widget" error.
screenshot of Google Play refund screen
Coding my first in-app purchase in Flutter and having my first experience with purchases of any kind in Google Play. Coming from iOS land, LOVE that a developer can issue refunds and even have control over what percentage is refunded and whether the user retains the entitlement.
No worries! :)
To answer my own question: Yes, you need to enroll in the "15% service fee". But Google puts it front & center when you first set up an account, so it's easy to do.
I've noticed that in WebViewWidget (pub.dev/packages/web...). I can add "padding" to the end of its content (and extra line break or two) but the scroll bar goes a little too far down when at the end. It uses native implementations of WebView so it's not using a standard Flutter Scrollbar. ๐คทโโ๏ธ
Do you know off-hand the way Google Play does it? It's similar, but I think it was 15% of first $1 million, no need to apply to a program.
Excerpt of the ChangeNotifierProvider README describing how to reuse an existing object instance
TIL if you want to cache and reuse a ChangeNotifierProvider, and not have it prematurely disposed and rendered useless, you should use ChangeNotifierProvider.value rather than the default constructor (with its create parameter).
pub.dev/packages/pro...
Hi all! I'm a long-time iOS developer who's gotten into #Flutter this year. I've deployed one new app to Android & iOS (itsallwidgets.com/pray-the-psa...), written a second app for a client and am in the fourth week of rewriting a 11-year-old iOS app of mine in Flutter.