app_widget
0.4.1, released 8 months ago by noxasch.tech
Manage Android home screen widgets from within Flutter.
What it does
Allows developers to manage, configure, update, and receive click events for home screen widgets entirely from Flutter code. It exposes APIs for updating text views, handling configurations, and triggering widget reloads on Android.
AI-written summary of version 0.4.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to build and manage Android home screen widgets using Flutter logic.
- You want to handle widget configuration screens and click events in Dart.
Skip it when
- You need robust cross-platform support including iOS widgets.
- You require a purely declarative UI approach for widgets.
Strengths
- Reduces the need to write extensive native code for home screen widgets.
- Provides callback hooks for configuration and widget clicks.
Weaknesses
- iOS is not supported.
- Still considered alpha, with potential breaking changes between minor versions.
Setup
- Kind
- Plugin (native code)
- Effort
- High
- Code generation
- No
- Direct dependencies
- 3
Requires native Android setup including creating layout XML, appwidget-provider XML, updating AndroidManifest with receivers, and editing MainActivity in Kotlin.
final appWidgetPlugin = AppWidgetPlugin(
androidPackageName: 'tech.noxasch.app_widget_example',
);
await appWidgetPlugin.configureWidget(
widgetId: _widgetId!,
layoutId: _layoutId!,
textViews: {
'widget_title': 'MY WIDGET',
'widget_message': 'This is my widget message'
},
);Alternatives
Packages that do the same job and could replace app_widget.
- quick_actions
Flutter plugin for creating shortcuts on home screen, quick actions on iOS and app shortcuts on Android.
92Compare - flutter_overlay_window
Flutter plugin to display your app over other apps on the screen.
85Compare - flutter_screen_wake
Manage device screen wake state and brightness on Android and iOS.
40Compare - wallpaper_manager_flutter
Set Android home or lock screen wallpaper programmatically
41Compare
Works with
Packages commonly used together with app_widget: ones it builds on, ones built on it, and its own family.