搜索插件、代码仓与 APP 分类

app_widget 封面
插件详情v0.4.1

app_widget

Flutter 插件,用于在 Flutter 应用内管理应用小部件/主屏幕小部件。

Android
近 30 天下载
732
喜欢数
83
Pub 分数
160

安装插件

flutter pub add app_widget

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

app_widget 包是一个 Flutter 插件,旨在使开发者能够直接在 Flutter 应用内管理应用小部件和主屏幕小部件。它提供功能以在 Android 设备上更新、创建或删除小部件,从而实现与主屏幕的动态交互。该包与 Flutter 生态系统无缝集成,无需原生代码即可简化小部件管理。对于需要在主屏幕上显示实时更新的应用(如日历、天气应用或任务跟踪器)尤其有用。

适合场景

  • 从应用内更新主屏幕小部件
  • 创建动态应用小部件
  • 同步小部件数据与应用状态
  • 启用用户触发的小部件更新
  • 将小部件管理集成到应用设置中

主要特点

  • 仅支持 Android
  • 用于小部件更新的简单 API
  • 与 Flutter 生命周期的集成
  • 支持自定义小部件配置
  • 无需原生 Java/Kotlin 代码

适合对象

  • 开发交互式 Android 应用的开发者
  • 需要实时更新主屏幕的应用程序
  • 希望避免原生平台代码的团队
  • 专注于通过小部件提高用户参与度的项目
  • Flutter 应用针对 Android 主屏幕集成

使用建议

  • 仅限 Android 平台
  • 需要 Android 特定权限
  • 可能不适用于所有设备制造商
  • 小部件行为在不同 Android 版本中可能有所不同
  • 需要在多个安卓设备上进行测试

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

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

所属分类

依赖

依赖清单 3 项

  • app_widget_android^0.4.1
  • app_widget_platform_interface^0.4.0
  • plugin_platform_interface^2.1.7

源码仓库

使用此插件的项目

暂无相关数据。