简体   繁体   English

Flutter 中的主屏幕小部件

[英]Home Screen widget in Flutter

I have to build a flutter app where the data need to be shown on home screen of the phone, if the app is in background mode.如果应用程序处于后台模式,我必须构建一个 flutter 应用程序,其中数据需要显示在手机的主屏幕上。

Till now i have not found any relevant information regarding the home screen widget or how to create the app widget in flutter except the one that到目前为止,我还没有找到有关主屏幕小部件或如何在 flutter 中创建应用小部件的任何相关信息,除了

we can build app widget in native(Android/iOS).我们可以在原生(Android/iOS)中构建应用小部件。Native widget in androidandroid 中的原生小部件

Do i need to handle app widget from the native code or is there a way to handle app widget in flutter.我需要从本机代码处理应用程序小部件,还是有办法在 flutter 中处理应用程序小部件。

It's not official supported, but there are some packages, to do the basic stuff:它不是官方支持的,但是有一些包可以做一些基本的事情:

https://pub.dev/packages/home_widget https://pub.dev/packages/home_widget

Android Android iOS iOS
图片 图片

There is also a ticket in the Flutter repo: Explore home widgets for iOS 14 . Flutter repo 中还有一张票: Explore home widgets for iOS 14 So you can upvote this ticket, if you are interested.因此,如果您有兴趣,可以投票支持这张票。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM