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

nes_ui 封面
套件詳情v0.32.0

nes_ui

受舊式復古電子遊戲機啟發的 UI 庫

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
1220
喜歡數
120
Pub 分數
150

安裝套件

flutter pub add nes_ui

套件介紹

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

一個 Flutter 小部件庫,為現代應用帶來復古視頻遊戲主機的美學風格,靈感來自經典的 NES 風格設計。它提供了一組可自定義的 UI 元件,包含像素化字體、懷舊色彩調色盤以及懷舊視覺效果,如掃描線和 CRT 屏幕扭曲。非常適合用於遊戲、主題應用或尋求懷舊感覺的創意專案。該套件支援所有主要平台,確保在各裝置上保持一致的復古風格。

適用情境

  • 復古主題的移動遊戲
  • 復古風格的應用程式介面
  • 互動數位藝術裝置
  • 具有懷舊設計的教育類應用程式
  • 具有像素藝術美學的創意原型

主要特色

  • NES風格的視覺效果
  • 像素級精確的 UI 組件
  • 掃描線和CRT效果
  • 跨平台相容性
  • 可自定義的復古配色方案
  • 支援響應式復古版面

適合對象

  • 開發懷舊遊戲體驗的開發者
  • 設計師探索懷舊使用者介面趨勢
  • 希望擁有獨特視覺形象的應用程式創作者
  • Flutter 初學者學習小部件自訂
  • 旨在實現有趣、低保真的美學的項目

使用建議

  • 可能不適合專業或極簡設計需求
  • 視覺效果對舊裝置的效能影響
  • 復古風格中有限的可存取性功能
  • 需要仔細調整對比度以確保可讀性
  • 不適合內容密集或資料驅動的應用程式

原始 README

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

Nes

style: very good analysis Powered by Mason License: MIT

UI library inspired by old retro video game console

Our top sponsors

Check out these amazing sponsors that support my work!


Invertase

Become a featured sponsor!

Installation 💻

❗ In order to start using Nes UI you must have the Flutter SDK installed on your machine.

Add nes_ui to your pubspec.yaml:

dependencies:
  nes_ui:

Install it:

flutter packages get

Configure it

Nes UI provides a ThemeData that you can add to your MaterialApp, that theme can be obtained from the flutterNesTheme method:

import 'package:nes_ui/nes_ui.dart';

MaterialApp(
  theme: flutterNesTheme(),
);

Check the many arguments on the method to customize the theme.

Font

Nes UI uses the Press start 2P from the Google Fonts package.

Google fonts will fetch the files in runtime over http. To keep that behaviour and ensure that it works, be sure to call WidgetsFlutterBinding.ensureInitialized(); at your main method.

For more info on that follow this Google Fonts package guide.

If instead you want to bundle the fonts in the app and avoid http requests, follow this other guide.

You also should include the font license on LicenseRegistry when bundling it on the app.

For example:

void main() {
  LicenseRegistry.addLicense(() async* {
    final license = await rootBundle.loadString('google_fonts/OFL.txt');
    yield LicenseEntryWithLineBreaks(['google_fonts'], license);
  });

  runApp(...);
}

More about font license here.

Widget gallery

Find all the widgets in this catalog made on Widgetbook.

Getting help

If you need any help or have suggestions, join our Discord.

Material Customized Widgets

Nes UI tries to use the most out of material that it can, customizing its looks to fit the package's desired look, for example, here is a list of some of the widgets that Nes ui customizes:

  • Text
  • TextField/TextFormField
  • Divider
  • ...

Custom Widgets

Some widgets are too different from the Material look and structure, making the customization of the material widget not really possible, so many widgets are built from scratch, here is a list of some of the widgets that Nes UI provides:

  • NesButton
  • NesCheckbox
  • NesContainer
  • NesConfirmDialog
  • NesIcon
  • NesSelectionList
  • NesIterableOptions
  • ...

Custom Extension

Nes UI is built taking advantage of the Theme Extensions and custom extensions can also be provided. In order to provide your own extension, you need to create it, and provide it to the flutterNesTheme:

    theme: flutterNesTheme(
      brightness: state.lightMode ? Brightness.light : Brightness.dark,
      customExtensions: [
        CustomExampleExtension.light, // Your custom extension goes here.
      ],
    ),

For more information, look at the example code.

Support this project 💙

所屬分類

依賴

依賴清單 5 項

原始碼儲存庫

使用此套件的專案