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

套件詳情v0.1.0

platform_ui

平台特定的 Widget 和 UI 工具包

近 30 天下載
18
喜歡數
41
Pub 分數
40

安裝套件

flutter pub add platform_ui

套件介紹

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

Platform UI 是一個 Flutter/Dart 套件,提供平台特定的元件與 UI 工具包,旨在為 iOS、Android 及其他平台提供類似原生的體驗。它提供可適應的元件,能根據目標平台自動調整外觀與行為,確保符合平台規範。此套件透過抽象平台差異來簡化跨平台開發,同時維持視覺保真度。僅需透過 `flutter pub add platform_ui` 進行最小設定,開發者即可提升 UI 回應性與使用者體驗,無需撰寫平台特定程式碼。

適用情境

  • 使用原生外觀和感覺構建跨平台應用
  • 為 iOS 和 Android 建立適應性介面
  • 簡化平台特定元件的實作
  • 增強跨裝置的UI一致性
  • 減少平台感知組件的樣板程式碼

主要特色

  • 適用於不同平台的自動適應小部件
  • 最小設定需求
  • 支援 iOS 和 Android 設計指南
  • 可擴展的組件架構
  • 內建主題以保持平台一致性

適合對象

  • 跨平台 Flutter 開發人員
  • 優先考慮原生使用者體驗的團隊
  • 針對多個作業系統的應用
  • 尋求減少平台特定代碼的開發者
  • 需要在各種設備上保持一致的使用者介面的專案

使用建議

  • 僅限iOS和Android(未提及桌面端/網頁端支援)
  • 依賴外部相依性以實現完整功能
  • 可能需要額外的自訂以滿足複雜的UI需求
  • 不適用於需要高度客製化非原生設計的應用程式
  • 性能影響方面沒有明確的文件

原始 README

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

Platform UI

by @KRTirtho

Flutter platform specific UI widgets

It mimics the native UI widgets (android, iOS, macOS, linux and windows) as much as possible in Flutter & has a wide collection of platform specific widgets. The names and APIs are similar to Flutter's Material UI widgets to make the Flutter developer feel at home. It's utilizes:

Feature Highlights

  • Simple and customizable platform specific UI widgets
  • Supports all major platforms (android, iOS, macOS, linux and windows)
  • Exposes the internal API to build widgets on top of it
  • Changeable default TargetPlatform for overriding platform design in another platform (it's crazy but cool)
  • Wide collection of platform specific widgets
  • Widget APIs are similar to Flutter's Material UI widgets
  • Dark Mode support

Install

Run following in a terminal:

$ flutter pub add platform_ui fluent_ui macos_ui libadwaita adwaita

Preview

https://krtirtho.github.io/platform_ui/

Usage

Import the package:

import 'package:platform_ui/platform_ui.dart';

Example

import 'package:flutter/material.dart';
import 'package:platform_ui/platform_ui.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return PlatformApp(
      title: 'Platform UI',
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return PlatformScaffold(
      appBar: PlatformAppBar(
        title: Text('Platform UI'),
      ),
      body: Center(
        child: PlatformText(
          'Hello World',
          style: TextStyle(fontSize: 30),
        ),
      ),
    );
  }
}

Documentation

Screenshots

Desktop (Linux → Macos → Windows)

Desktop

Mobile (Android → iOS)

Mobile

Support

If you like this project, please consider supporting it by:

  • Starring and sharing the project
  • Following @KrTirtho on Twitter
  • Buying us a coffee ☕️

License

MIT

所屬分類

依賴

依賴清單 8 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。