搜索插件、代码仓与 APP 分类

figma_frame_inspector 封面
插件详情v0.0.5

figma_frame_inspector

一个 Flutter 插件,用于验证应用中实现的 Figma 框架的准确性。

AndroidiOSmacOSWindowsLinux
近 30 天下载
45
喜欢数
25
Pub 分数
150

安装插件

flutter pub add figma_frame_inspector

插件介绍

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

Figma Frame Inspector 是一个 Flutter 插件,旨在帮助开发者验证其应用程序中 Figma 设计实现的准确性。它会将 Figma 帧的边界和尺寸直接叠加在运行中的应用上,从而实现实时的设计与开发视觉对比。此工具简化了测试过程中的 UI 验证,确保与设计规范完全像素对齐。该插件支持 Android、iOS、macOS、Windows 和 Linux 多个平台,适用于跨平台团队。在设计师与开发者紧密协作的环境中,该工具尤为有用。

适合场景

  • 验证UI保真度与Figma设计的一致性
  • 跨平台 UI 一致性检查
  • 设计交接验证
  • 实时调试布局差异
  • 设计师与开发人员之间的团队协作

主要特点

  • 在应用程序中叠加显示 Figma 帧边界
  • 支持多个平台
  • 实时视觉对比
  • 通过 pub add 的简单集成
  • 突出显示布局偏差

适合对象

  • UI/UX 开发人员
  • 使用 Flutter 的设计师
  • 跨平台开发团队
  • 质量保证测试人员
  • 使用 Figma 进行设计的团队

使用建议

  • 仅用于开发/测试
  • 需要Figma框架数据
  • 不适用于生产构建
  • 可能会影响调试模式下的性能
  • 仅限视觉检查,不包含自动断言

原始 README

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

Figma Frame Inspector

Pub Version

A Flutter plugin to verify how accurately the Figma frame was implemented in the app (whether paddings and elements sizes are correct).

With this tool any developer can verify all the paddings, font styles and elements sizes matches design specification in Figma.

recording

How it works

This plugin provides FigmaFrameInspector widget that renders provided Figma frame on top of child screen widget. This helps to check proper frame implementation.

PS: Example Figma frame was taken from here

Implementation Figma Diff

Installation

flutter pub add figma_frame_inspector

Usage

Get Figma Personal Access Token
  • In Figma go to Account -> Personal Access Tokens
  • Generate a new token
Get Figma Frame URL
  • In Figma open design file
  • On the left side in Layers section select a frame that you need to verify
  • Copy the URL of the frame

figma-copy-frame

Integration
  • import 'package:figma_frame_inspector/figma_frame_inspector.dart';
  • Wrap your app with FigmaFrameInspector widget:
class MyHomePage extends StatelessWidget {
  const MyHomePage({Key? key, required this.title}) : super(key: key);

  final String title;

  @override
  Widget build(BuildContext context) {
    return FigmaFrameInspector( // <-- Wrap your screen widget with this widget.
      frameUrl:
          "<figma-frame-url>", // <-- Specify the Figma frame url. Looks like this: https://www.figma.com/file/<file_key>/<file_name >?node-id=<node_id>
      figmaToken: '<figma-token>', // <-- Specify the Figma `Personal access token` from Account Settings page.
      // Optional parameters:
      scale: 3, // A number between `0.01` and `4`, the image scaling factor.
      initialOpacity: .3, // Opacity of the frame on the screen start (default `30%`).
      enabled: true, // Enable or disable the frame overlay (default `true`).
      isTouchToChangeOpacityEnabled: true, // Enable or disable vertical scroll to change the frame overlay opacity (default `true`).
      child: Scaffold(
        appBar: AppBar(
          title: Text(title),
        ),
        floatingActionButton: const FloatingActionButton(
          onPressed: null,
          tooltip: 'Increment',
          child: Icon(Icons.add),
        ),
      ),
    );
  }
}

Credits

This plugin was heavily inspired by flutter_figma_preview

Figma sample design taken from here https://www.figma.com/community/file/1060856334579637757

License

Can be found here.

所属分类

依赖

依赖清单 2 项

源码仓库

使用此插件的项目

暂无相关数据。