flutter_homescreen_widget library

A Flutter plugin for updating iOS WidgetKit and Android Glance home screen widgets using Flutter widgets as the UI.

Quick start

final _navKey = GlobalKey<NavigatorState>();

void main() {
  FlutterHomescreenWidget.init(_navKey);
  runApp(MaterialApp(navigatorKey: _navKey, home: MyHome()));
}

Then update a widget:

await FlutterHomescreenWidget.update(
  widgetName: 'MyWidget',
  size: const Size(329, 155),
  content: MyWidgetUI(data: data),
  actions: [
    WidgetAction(id: 'tap', area: const Rect.fromLTWH(0, 0, 1, 1)),
  ],
);

Classes

FlutterHomescreenWidget
Entry point for the flutter_homescreen_widget plugin.
WidgetAction
Defines a tappable area on a home screen widget.