Giter VIP home page Giter VIP logo

flutter_app_widget's Introduction

Flutter App Widget

App Widget / Home Screen widget plugin for flutter app

Usage

Please see app_widget subdirectory for the usage documentation.

Plaform Support

Android iOS
โœ”๏ธ

Project Structure

This project follow the standard for flutter plugin development where each pieces are independent of each other. Other platform interface can be easily added by inherit the base platform interface and expose the require api to the main app_wiget plugin.

Contributing

  1. Fork
  2. Checkout to feature branch
  3. Add feature and unit test
  4. Make sure all unit test pass
  5. Add platform integration test and run integration test
  6. Create a PR

Android Integration Test

  • Make sure to run on the latest and minSdk supported

in app_widget/example/integration_test/app_widget_test.dart

cd app_widget/example
# this will require a connected device for android
flutter test integration_test/app_widget_test.dart

flutter_app_widget's People

Contributors

noxasch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

flutter_app_widget's Issues

Support custom onClick payload

Currently we support fixed payload for widget onclick payload. Adding this will allow dev to specify their on payload map for their usage.

Redrawing the widget for each text

If there are 5 textviews, in the "update" operation
setting textview1 value -> updating widget.
setting textview2 value -> updating widget.
...

This is very wrong. Android doesn't support fast widget update anyway.
It should set all values first and update once.

Layout Name CallBack

Can you give the configure layout function which layout it is with a callback?

I have 2 layouts and I want to know which one is selected.

handle on reboot and app update

Currently, we need to wait for the next workmanager or any other schedule to update the widget after reboot or update.

Expose a callback dispatcher for reboot, update and ondelete as a callback dispatcher and handle this on the background by listening to broadcast event. This will allow dev to reduce code on native.

[BUG]

Describe the bug
Package name is not passed through the methods getWidgetIds and reloadWidget

To Reproduce
Initialize AppWidget with a different packageName (this can happen if package name of widget is not exactly the same as the global App).
Call getWidgetIds or reloadWidget

Expected behavior
Widget provider is found.

Solution
Add this line:
'androidPackageName': androidPackageName,

in file app_widget_android_plugin.dart in methods getWidgetIds and reloadWidgets to pass the parameter. So it will look like:

Line 73
final widgetIds =
await _methodChannel.invokeMethod<List?>('getWidgetIds', {
'androidProviderName': androidProviderName,
'androidPackageName': androidPackageName,
});

Line 92
return _methodChannel.invokeMethod(
'reloadWidgets',
{'androidProviderName': androidProviderName,
'androidPackageName': androidPackageName,},
);

IOS support

This will include api unification whenever possible and possibly will introduce a breaking changes.

NOTE:
I'm currently unable focus on this feature as I'm not an IOS dev and I have full time job to work on at the moment.
If any IOS dev want to contribute, will be greatly appreciated.

UPDATE:
My MacBook pro has recently dead on and left me with a windows/linux machine. Thus I have no intention to work on this for the time being or until circumstances change. However I am open for anyone interested to work on and maintain on the iOS part, If you are interested on this, do let me know or create a PR or Issue so we can discuss on how can create a unified method that work for both iOS and Android.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.