Interactive Widgets
Follow the necessary steps to set up everything on the Flutter Side as described here.
- Add the necessary Receiver and Service to your
AndroidManifest.xml
file<receiver android:name="es.antonborri.home_widget.HomeWidgetBackgroundReceiver" android:exported="true"> <intent-filter> <action android:name="es.antonborri.home_widget.action.BACKGROUND" /> </intent-filter> </receiver>
- Add a
HomeWidgetBackgroundIntent.getBroadcast
PendingIntent to the View you want to add a click listener toval backgroundIntent = HomeWidgetBackgroundIntent.getBroadcast( context, Uri.parse("homeWidgetExample://titleClicked") ) setOnClickPendingIntent(R.id.widget_title, backgroundIntent)