项目作者: kherel

项目描述 :
Compare your design and current flutter layout.
高级语言: Dart
项目地址: git://github.com/kherel/pixel_perfect.git
创建时间: 2021-04-08T17:57:26Z
项目社区:https://github.com/kherel/pixel_perfect

开源协议:MIT License

下载


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.

  1. dependencies:
  2. pixel_perfect: any

How To Use

Simple use

Add assets folder with images to your pubspec.yaml

  1. uses-material-design: true
  2. assets:
  3. - assets/

Import the following package in your dart file

  1. import 'package:pixel_perfect/pixel_perfect.dart';
  1. return PixelPerfect(
  2. assetPath: 'assets/design.png', // path to your asset image
  3. scale: 1, // scale value (optional)
  4. initBottom: 20, // default bottom distance (optional)
  5. offset: Offset.zero, // default image offset (optional)
  6. initOpacity: 0.4, // init opacity value (optional)
  7. child: Scaffold(
  8. ..
  9. )
  10. )

Extended use

  1. return PixelPerfect.extended(
  2. image: Image.asset( // any image file
  3. 'assets/element.png',
  4. scale: 2,
  5. ),
  6. initBottom: 20, // default bottom distance (optional)
  7. offset: Offset.zero, // default image offset (optional)
  8. initOpacity: 0.4, // init opacity value (optional)
  9. child: Scaffold(
  10. ..
  11. )
  12. )

Video tutorials by Learn App Code

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