Flutter - Update periodically home screen widget in Ios and Andorid - flutter

I made home screen widget using resources from https://medium.com/#ashishgarg1998/how-to-create-home-screen-app-widgets-in-flutter-ce3458f3638e but have issues to update this widget periodically. I have tried to update with background task applying workmanager plugin but this plugin does not support periodic task in Ios. Can anyone help to solve it with single plugin or source code

Related

How to wait until a widget gets loaded in flutter integration test?

Is there any way in flutter integration test keeping wait until a widget gets loaded completely?
Like waiting until the home page is loaded after finishing the splash screen?
You can use await tester.pumpAndSettle(), it awaits every animation to end before going to the next step. For more info you can look at the docs in this link.

is it possible to run initialisation code before native splash screen is removed by flutter engine in flutter

I want run initialisations of the application and fetch some data async in flutter before app starts and while native splash screen is active.
I want to start the app after all initialisations are complete and then i want to remove native splash screen and start flutter application.
Basically i want to fetch shared preferences and run init code snippets and path_provider code before starting user interaction and while native splash screen is running after flutter engine is loaded.
Not during the actual Native splashscreen. But you can create a screen that looks identical to the native splashscreen, do your stuff there, and then navigate once you are done.

Home Screen widget in Flutter

I have to build a flutter app where the data need to be shown on home screen
of the phone, if the app is in background mode.
Till now i have not found any relevant information regarding the home screen widget or how to create the app widget in flutter except the one that
we can build app widget in native(Android/iOS).
Native widget in android
Do i need to handle app widget from the native code or is there a way to handle app widget in flutter.
It's not official supported, but there are some packages, to do the basic stuff:
https://pub.dev/packages/home_widget
Android
iOS
There is also a ticket in the Flutter repo: Explore home widgets for iOS 14. So you can upvote this ticket, if you are interested.

Attempting to hot reload Flutter app restarts whole app

I'm working on a Flutter app and I've noticed that whenever I save my app to see the updated changes, my entire app reloads. I would expect the page that I have open to hot reload with my new changes on it.
I think that the way my widget tree is organised could have an effect on this. My entire app is wrapped in a widget that runs at startup that initialises to a ServicesLoadingState. Then, after the services have finished starting up (in the BLoC), it yields a ServicesReadyState and then all my widgets are drawn. I think when I hot reload, the state of the topmost widget switches back to ServicesLoadingState, reloads the services, and shows me the behaviour I'm experiencing.
I've tried googling "flutter hot reload restarts app" but I haven't found any good tips on how to prevent this. How can I stop hot reload from restarting the entire app?
Can you check if you are using a global navigatorKey in your MaterialApp ?
I faced the same issue and I found that it was due to navigatorKey in my MaterialApp.
So when I'm in dev mode, I comment the navigatorKey property.

Can PlatformView on flutter help build AdMob BannerAd widget for flutter?

The firebase_admob plugin has support for banner ad which can be placed only on a fixed set of positions (top,bottom) because its just putting native view in top of the flutters activity/ViewController. Is it possible no to export BannerAd as a widget using PlatformView?
Or is it somehow possible right now to add banner ad inside a scrollable widget of flutter.
You can try thís https://pub.dartlang.org/packages/flutter_native_admob. It uses exact PlatformView as you expect. But the limitation is not supporting iOS yet.
Warning: The plugin is based on Flutter PlatformView (AndroidView) to
create a custom widget from Native View. Therefore, only Android is
supported at the moment. For iOS, wait for Flutter team to implement
iOSView equivalent.