From cbae1da3487306587e4c36a4248704f15cc5e5aa Mon Sep 17 00:00:00 2001 From: Alexander Dischberg Date: Thu, 22 Sep 2022 23:21:47 +0800 Subject: [PATCH] chore: bump version --- app_widget/example/lib/main.dart | 31 +++++++++++++++++++------------ app_widget/example/pubspec.lock | 4 ++-- app_widget/pubspec.yaml | 4 ++-- 3 files changed, 23 insertions(+), 16 deletions(-) diff --git a/app_widget/example/lib/main.dart b/app_widget/example/lib/main.dart index 3aed0ce..eb3e860 100644 --- a/app_widget/example/lib/main.dart +++ b/app_widget/example/lib/main.dart @@ -1,3 +1,6 @@ +import 'dart:convert'; +import 'dart:math'; + import 'package:flutter/material.dart'; import 'package:app_widget/app_widget.dart'; @@ -124,12 +127,14 @@ class UpdateWidgetButton extends StatelessWidget { // send configure await _appWidgetPlugin.updateWidget( - widgetId: widgetId, - widgetLayout: 'example_layout', - textViews: { - 'widget_title': 'App Widget', - 'widget_message': 'Updated in flutter' - }); + widgetId: widgetId, + widgetLayout: 'example_layout', + textViews: { + 'widget_title': 'App Widget', + 'widget_message': 'Updated in flutter' + }, + payload: jsonEncode({'number': Random.secure().nextInt(10)}), + ); } }, child: const Text('Update Widget'), @@ -254,12 +259,14 @@ class ConfigureButton extends StatelessWidget { // send configure await _appWidgetPlugin.configureWidget( - widgetId: _widgetId!, - widgetLayout: 'example_layout', - textViews: { - 'widget_title': 'App Widget', - 'widget_message': 'Configured in flutter' - }); + widgetId: _widgetId!, + widgetLayout: 'example_layout', + textViews: { + 'widget_title': 'App Widget', + 'widget_message': 'Configured in flutter' + }, + payload: jsonEncode({'number': Random().nextInt(10)}), + ); messenger.showSnackBar( const SnackBar(content: Text('Widget has been configured!'))); } else { diff --git a/app_widget/example/pubspec.lock b/app_widget/example/pubspec.lock index de895fe..9d5fd07 100644 --- a/app_widget/example/pubspec.lock +++ b/app_widget/example/pubspec.lock @@ -7,14 +7,14 @@ packages: path: ".." relative: true source: path - version: "0.2.0" + version: "0.2.1" app_widget_android: dependency: transitive description: name: app_widget_android url: "https://pub.dartlang.org" source: hosted - version: "0.2.0" + version: "0.2.1" app_widget_platform_interface: dependency: transitive description: diff --git a/app_widget/pubspec.yaml b/app_widget/pubspec.yaml index f807c5a..7112a31 100644 --- a/app_widget/pubspec.yaml +++ b/app_widget/pubspec.yaml @@ -1,6 +1,6 @@ name: app_widget description: Flutter plugin to manage app widget / home screen widget from within flutter app. -version: 0.2.0 +version: 0.2.1 homepage: https://noxasch.tech/ repository: https://github.com/noxasch/flutter_app_widget/tree/master/app_widget issue_tracker: https://github.com/noxasch/flutter_app_widget/issues @@ -14,7 +14,7 @@ dependencies: sdk: flutter plugin_platform_interface: ^2.0.2 app_widget_platform_interface: ^0.2.0 - app_widget_android: ^0.2.0 + app_widget_android: ^0.2.1 # app_widget_platform_interface: # local dev # path: ../app_widget_platform_interface # app_widget_android: # local dev