Creating Dynamic Home Screen Widgets on Android 14 with Flutter
Aug 20, 2025



Summary
Summary
Summary
Summary
This tutorial shows how to integrate Flutter with Android 14’s AppWidget framework using the home_widget plugin. You’ll configure manifest entries, design XML layouts with Material You dynamic colors, initialize the plugin in Dart, and push data updates to native widgets. Finally, you’ll test and debug your dynamic widget on Android 14 devices.
This tutorial shows how to integrate Flutter with Android 14’s AppWidget framework using the home_widget plugin. You’ll configure manifest entries, design XML layouts with Material You dynamic colors, initialize the plugin in Dart, and push data updates to native widgets. Finally, you’ll test and debug your dynamic widget on Android 14 devices.
This tutorial shows how to integrate Flutter with Android 14’s AppWidget framework using the home_widget plugin. You’ll configure manifest entries, design XML layouts with Material You dynamic colors, initialize the plugin in Dart, and push data updates to native widgets. Finally, you’ll test and debug your dynamic widget on Android 14 devices.
This tutorial shows how to integrate Flutter with Android 14’s AppWidget framework using the home_widget plugin. You’ll configure manifest entries, design XML layouts with Material You dynamic colors, initialize the plugin in Dart, and push data updates to native widgets. Finally, you’ll test and debug your dynamic widget on Android 14 devices.
Key insights:
Key insights:
Key insights:
Key insights:
Setting up the Home Widget Plugin: Configure pubspec, AndroidManifest, and provider XML for AppWidget integration.
Designing the Native Widget Layout: Use RemoteViews with Material You theming and XML layouts for dynamic colors.
Integrating Flutter Data and Updates: Initialize HomeWidget in Dart and call saveWidgetData/updateWidget to reflect state changes.
Testing and Debugging on Android 14: Validate dynamic color adaptation, manual updates, and tap actions on an Android 14 emulator.
Introduction
Dynamic home screen widgets give users immediate access to key app functions and real-time data. Android 14 enhances widget theming with Material You dynamic colors, improved resizing, and streamlined update flows. In this tutorial, you’ll integrate Flutter with Android’s AppWidget framework using the home_widget plugin. You’ll learn to configure, design, and update a native widget layout from Dart code to deliver a seamless, dynamic widget experience on Android 14.
Setting up the Home Widget Plugin
First, add the home_widget dependency to your pubspec.yaml:
dependencies:
flutter:
sdk: flutter
home_widget
Next, configure AndroidManifest.xml under android/app/src/main:
• Add the BROADCAST
permission:
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
• Register the AppWidgetProvider inside <application>
:
<receiver
android:name="com.example.app.HomeScreenWidgetProvider"
android:exported="false">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE"/>
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/home_widget_provider"/>
</receiver>
Finally, create android/app/src/main/res/xml/home_widget_provider.xml
to describe the widget’s dimensions, updatePeriodMillis (0 if manual), and previewImage.
Designing the Native Widget Layout
Widgets on Android rely on RemoteViews and an XML layout under res/layout
. For dynamic color support on Android 14, use android:theme="@style/Widget.MaterialComponents.DayNight"
. Example layout home_widget_layout.xml
:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="widget_root"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="16dp"
android:background="?android:attr/colorSurface">
<TextView
android:id="@+id/widget_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Counter"
android:textAppearance="@style/TextAppearance.MaterialComponents.Headline6"/>
<TextView
android:id="@+id/widget_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="0"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"/>
</LinearLayout>
Ensure the provider XML (home_widget_provider.xml
) references this layout. You can also add <button>
elements and link onClickPendingIntent
for widget taps.
Integrating Flutter Data and Updates
Initialize the plugin in main.dart
before runApp:
void main() {
WidgetsFlutterBinding.ensureInitialized();
HomeWidget.initialize();
runApp(MyApp());
}
In your Flutter state management (setState, Bloc, Provider), save and push updates to the widget:
void updateCounter(int count) {
HomeWidget.saveWidgetData<int>('counter', count);
HomeWidget.updateWidget(
name: 'HomeScreenWidgetProvider',
androidName: 'HomeScreenWidgetProvider',
);
}
On Android 14, widgets automatically apply dynamic color tokens if your layout uses Material themes. For tap actions, configure a deep link in the <receiver>
or use HomeWidget.launchApp()
to handle taps in Flutter.
Testing and Debugging on Android 14
Use an Android 14 emulator or physical device. Install the app, add the widget via the widget picker, and verify:
• Dynamic color adapts to the current wallpaper palette.
• Widget updates when updateCounter
runs. • Tap actions open the app or navigate to the expected screen.
Monitor logs with adb logcat
for HomeWidget
tags. If updates don’t appear, confirm your provider XML’s updatePeriodMillis
is zero for manual updates and that HomeWidget.updateWidget()
is invoked after data saving.
Vibe Studio

Vibe Studio, powered by Steve’s advanced AI agents, is a revolutionary no-code, conversational platform that empowers users to quickly and efficiently create full-stack Flutter applications integrated seamlessly with Firebase backend services. Ideal for solo founders, startups, and agile engineering teams, Vibe Studio allows users to visually manage and deploy Flutter apps, greatly accelerating the development process. The intuitive conversational interface simplifies complex development tasks, making app creation accessible even for non-coders.
Conclusion
By combining Flutter’s home_widget plugin with Android 14’s dynamic theming and AppWidget APIs, you can deliver rich, responsive home screen widgets. You now know how to configure the Android manifest, define native layouts, synchronize Flutter state, and test on the latest Android platform. Empower users with glanceable, interactive widgets in your Flutter apps.
Introduction
Dynamic home screen widgets give users immediate access to key app functions and real-time data. Android 14 enhances widget theming with Material You dynamic colors, improved resizing, and streamlined update flows. In this tutorial, you’ll integrate Flutter with Android’s AppWidget framework using the home_widget plugin. You’ll learn to configure, design, and update a native widget layout from Dart code to deliver a seamless, dynamic widget experience on Android 14.
Setting up the Home Widget Plugin
First, add the home_widget dependency to your pubspec.yaml:
dependencies:
flutter:
sdk: flutter
home_widget
Next, configure AndroidManifest.xml under android/app/src/main:
• Add the BROADCAST
permission:
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
• Register the AppWidgetProvider inside <application>
:
<receiver
android:name="com.example.app.HomeScreenWidgetProvider"
android:exported="false">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE"/>
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/home_widget_provider"/>
</receiver>
Finally, create android/app/src/main/res/xml/home_widget_provider.xml
to describe the widget’s dimensions, updatePeriodMillis (0 if manual), and previewImage.
Designing the Native Widget Layout
Widgets on Android rely on RemoteViews and an XML layout under res/layout
. For dynamic color support on Android 14, use android:theme="@style/Widget.MaterialComponents.DayNight"
. Example layout home_widget_layout.xml
:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="widget_root"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="16dp"
android:background="?android:attr/colorSurface">
<TextView
android:id="@+id/widget_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Counter"
android:textAppearance="@style/TextAppearance.MaterialComponents.Headline6"/>
<TextView
android:id="@+id/widget_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="0"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"/>
</LinearLayout>
Ensure the provider XML (home_widget_provider.xml
) references this layout. You can also add <button>
elements and link onClickPendingIntent
for widget taps.
Integrating Flutter Data and Updates
Initialize the plugin in main.dart
before runApp:
void main() {
WidgetsFlutterBinding.ensureInitialized();
HomeWidget.initialize();
runApp(MyApp());
}
In your Flutter state management (setState, Bloc, Provider), save and push updates to the widget:
void updateCounter(int count) {
HomeWidget.saveWidgetData<int>('counter', count);
HomeWidget.updateWidget(
name: 'HomeScreenWidgetProvider',
androidName: 'HomeScreenWidgetProvider',
);
}
On Android 14, widgets automatically apply dynamic color tokens if your layout uses Material themes. For tap actions, configure a deep link in the <receiver>
or use HomeWidget.launchApp()
to handle taps in Flutter.
Testing and Debugging on Android 14
Use an Android 14 emulator or physical device. Install the app, add the widget via the widget picker, and verify:
• Dynamic color adapts to the current wallpaper palette.
• Widget updates when updateCounter
runs. • Tap actions open the app or navigate to the expected screen.
Monitor logs with adb logcat
for HomeWidget
tags. If updates don’t appear, confirm your provider XML’s updatePeriodMillis
is zero for manual updates and that HomeWidget.updateWidget()
is invoked after data saving.
Vibe Studio

Vibe Studio, powered by Steve’s advanced AI agents, is a revolutionary no-code, conversational platform that empowers users to quickly and efficiently create full-stack Flutter applications integrated seamlessly with Firebase backend services. Ideal for solo founders, startups, and agile engineering teams, Vibe Studio allows users to visually manage and deploy Flutter apps, greatly accelerating the development process. The intuitive conversational interface simplifies complex development tasks, making app creation accessible even for non-coders.
Conclusion
By combining Flutter’s home_widget plugin with Android 14’s dynamic theming and AppWidget APIs, you can deliver rich, responsive home screen widgets. You now know how to configure the Android manifest, define native layouts, synchronize Flutter state, and test on the latest Android platform. Empower users with glanceable, interactive widgets in your Flutter apps.
Build Flutter Apps Faster with Vibe Studio
Build Flutter Apps Faster with Vibe Studio
Build Flutter Apps Faster with Vibe Studio
Build Flutter Apps Faster with Vibe Studio
Vibe Studio is your AI-powered Flutter development companion. Skip boilerplate, build in real-time, and deploy without hassle. Start creating apps at lightning speed with zero setup.
Vibe Studio is your AI-powered Flutter development companion. Skip boilerplate, build in real-time, and deploy without hassle. Start creating apps at lightning speed with zero setup.
Vibe Studio is your AI-powered Flutter development companion. Skip boilerplate, build in real-time, and deploy without hassle. Start creating apps at lightning speed with zero setup.
Vibe Studio is your AI-powered Flutter development companion. Skip boilerplate, build in real-time, and deploy without hassle. Start creating apps at lightning speed with zero setup.











