搜尋套件、儲存庫與 APP 分類

flutter_widgetkit 封面
套件詳情v1.0.3

flutter_widgetkit

適用於 iOS 小工具擴充功能的 Flutter 庫。將小工具整合到您的應用程式中

iOS
近 30 天下載
7050
喜歡數
63
Pub 分數
140

安裝套件

flutter pub add flutter_widgetkit

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

Flutter WidgetKit 是一個庫,可讓 Flutter 應用程式整合 iOS 小工具擴展,使開發者能在 iOS 主螢幕上顯示動態內容。它將 Flutter UI 與 Apple 的 WidgetKit 框架連結起來,實現 Flutter 建構的小工具無縫整合到 iOS 應用小工具中。此套件簡化了建立互動式且視覺上一致的小工具的過程,能夠即時反映應用資料。專為 iOS 設計,透過提供快速存取關鍵資訊的途徑來提升使用者參與度,而無需啟動完整應用程式。

適用情境

  • 在主螢幕上顯示即時應用資料
  • 為生產力應用程式創建互動式小部件
  • 透過快速應用存取增強使用者參與度
  • 展示即時更新,例如天氣或通知
  • 使用動態內容建構自訂應用程式圖示

主要特色

  • 與 iOS WidgetKit 的無縫整合
  • 支援動態和靜態小工具內容
  • 即時資料同步
  • 跨平台一致性與Flutter UI
  • 透過 pub add 命令輕鬆設定

適合對象

  • 專注於 iOS 的 Flutter 開發者
  • 需要主畫面小工具的應用程式
  • 開發互動式儀表板的開發者
  • 針對蘋果生態系統使用者的團隊
  • 需要即時小部件更新的項目

使用建議

  • 需要 iOS 平台目標
  • 僅限iOS;Android上無法使用
  • 需要 Xcode 設定以擴充小工具
  • 可能需要額外的程式碼來處理複雜互動
  • 依賴於蘋果的 WidgetKit API 的穩定性

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

flutter_widgetkit

flutter widgetkit

Flutter Library for the iOS 🍏 WidgetKit framework and Widget Communication

widget_small widget_medium widget_small

Table of Contents 📚

Introduction 👨‍🏫

This library allows you to call essential methods from the iOS "WidgetKit Framework", which are needed when developing a widget. For example updating the widget timelines. It is also possible to communicate with the widget via App Groups/UserDefaults.

🚨 To be on the safe side: This library exposes API functionality of WidgetKit. The widgets themselves must be developed natively in SwiftUI.

ℹ️ Blog about writing a Widget with this library

Installation 🖇‍

Add flutter_widgetkit as a dependency in your pubspec.yaml file.

Usage 👨🏻‍💻

import 'package:flutter_widgetkit/flutter_widgetkit.dart';

// Reloading Widget Timelines
WidgetKit.reloadAllTimelines();
WidgetKit.reloadTimelines('test');

// Communicate with Widget
WidgetKit.setItem('testString', 'Hello World', 'group.com.fasky');

Methods 📖‍

WidgetKit.reloadAllTimelines()

Reloads the timelines for all configured widgets belonging to the containing app.


WidgetKit.reloadTimelines(ofKind: String)

Reloads the timelines for all widgets of a particular kind.


WidgetKit.setItem(String key, dynamic value, String appGroup)

Writes Key-Value to UserDefaults database.


WidgetKit.getItem(String key, String appGroup)

Reads Value from UserDefaults database.


WidgetKit.removeItem(String key, String appGroup)

Removes Value for Key from UserDefaults database.


Contributors 🤓

Thomas Leiter

Thomas Leiter

License 🔖

MIT License

Copyright (c) 2020 Thomas Leiter, Fasky OG

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。