搜索分类、插件与代码仓

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 项

源码仓库

使用此插件的项目