hendra hendra - 3 years ago 281
Dart Question

Flutter: Is it somehow possible to create App Widgets (Android) and Today Extensions (iOS)?

I took a look at flutter for building a mobile app. Is it possible to create

(not flutter-widgets, but
App Widgets
(Android) and
Today Extensions
(iOS)) in a flutter app? I guess it can't be done with dart, but is there a way of implementing them native in Java/Swift and include them in the flutter-app?


Answer Source

There is no guide or docs showing how to implement a App Widget for a flutter app. It is definitely possible to implement a app widget with native code. Just create a flutter project and open the android part with android studio, just implement your home screen widget, it'll work like a charm.

I just wrote a simple app widget for a flutter app that takes you to https://flutter.io link when tapped. Here is the simple app created with flutter and a app widget added with native code. Install it and look for home_widget_example on Home Screen Widgets.

Gif image

If you wanted to look into the source code, and build app from source. Here it is.

Hope that helped!

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download