移动开发

flutter-home-screen-widget

flutter/agent-plugins

Adding a Home Screen widget to your Flutter App

  • 544 次安装
  • 3100 星标
  • 收录于

安装命令

npx skills add https://github.com/flutter/agent-plugins --skill flutter-home-screen-widget

SKILL.md

flutter-home-screen-widgets

Goal

Implements native home screen widgets (iOS and Android) for a Flutter application using the home_widget package. It establishes data sharing between the Dart environment and native platforms via App Groups (iOS) and SharedPreferences (Android), enabling text updates and rendering Flutter UI components as images for native display. Assumes a pre-existing Flutter project environment with native build tools (Xcode and Android Studio) configured.

Instructions

  1. Initialize Dependencies Add the home_widget package to the Flutter project.

    flutter pub add home_widget
    flutter pub get
    
  2. Decision Logic: Platform & Feature Selection Determine the target platforms and required widget capabilities. [BLOCKING] User Consultation BEFORE performing any implementation, you MUST ask:

    • "Which platforms are you targeting?"
    • "Do you need simple text or complex UI?"