搜索分类、插件与代码仓

pixel_perfect 封面
插件详情v1.1.3

pixel_perfect

帮助您使 Flutter 应用程序达到“像素级完美”的开发工具

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
5260
喜欢数
225
Pub 分数
150

安装插件

flutter pub add pixel_perfect

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

Pixel Perfect 是一款专为 Flutter 开发者设计的开发工具,通过提供视觉叠加层和对齐指南,帮助开发者实现像素级精确的设计。它能够跨不同屏幕尺寸和分辨率进行精确的布局检查,使 UI 外观的一致性更容易保证。该工具可无缝集成到开发工作流程中,设置简单,能够在设计实现过程中提供实时反馈。非常适合注重高保真 UI 的团队使用,支持所有主要平台,包括 Android、iOS、Web、macOS、Windows 和 Linux。

适合场景

  • 确保在多个设备屏幕上保持一致的用户界面
  • 验证布局中的精确间距和对齐
  • 开发过程中的调试设计差异
  • 与设计师协作,精确匹配原型图
  • 在应用发布前执行最终质量检查

主要特点

  • 视觉对齐指南和网格叠加
  • 实时布局检查
  • 跨平台支持
  • 所需配置最少
  • 与 Flutter 开发工具的集成

适合对象

  • 使用 Flutter 的 UI/UX 设计师
  • 专注于设计准确性的前端开发人员
  • 需要严格设计一致性的团队
  • 移动和Web应用开发项目
  • 以设计为导向的开发工作流程

使用建议

  • 不适用于生产构建
  • 在开发过程中可能会轻微影响性能
  • 在调试模式下需要手动激活
  • 最好与设计系统指南配合使用
  • 仅限视觉调试,不支持自动化测试

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

pixel_perfect

Pub License: MIT style: effective dart PRs Welcome Awesome Flutter

logo

Put a semi-transparent image with the design over the top of the developed layout. It helps you to compare original design and current page.

demo1

demo2

Getting started

Add pixel_perfect in your pubspec.yaml dependencies.

dependencies:
 pixel_perfect: any
How To Use

Simple use

Add assets folder with images to your pubspec.yaml

  uses-material-design: true
  assets:
    - assets/

Import the following package in your dart file

import 'package:pixel_perfect/pixel_perfect.dart';

return PixelPerfect(
  assetPath: 'assets/design.png', // path to your asset image
  scale: 1, // scale value (optional)
  initBottom: 20, //  default bottom distance (optional)
  offset: Offset.zero, // default image offset (optional)
  initOpacity: 0.4, // init opacity value (optional)
  child: Scaffold(
    ..
  )
)

Extended use


return PixelPerfect.extended(
  image: Image.asset( // any image file
    'assets/element.png',
    scale: 2,
  ), 
  initBottom: 20, //  default bottom distance (optional)
  offset: Offset.zero, // default image offset (optional)
  initOpacity: 0.4, // init opacity value (optional)
  child: Scaffold(
    ..
  )
)

Video tutorials by Learn App Code

How to Make Pixel Perfect Flutter Apps
How to Make Responsive Flutter Apps, Pixel Perfect

所属分类

源码仓库

使用此插件的项目