/flutter_screen_util

flutter屏幕宽度适配

Primary LanguageDartOtherNOASSERTION

screen_utils

FlutterScreenUtils

Getting Started

##1. Depend on it

Add this to your package's pubspec.yaml file:

  dependencies:
       screen_utils: ^0.0.1

##2. Install it You can install packages from the command line:

with Flutter:

  $ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

##3. Import it Now in your Dart code, you can use:

  import 'package:screen_utils/screen_utils.dart';

##4. Use it (1)init


  Adapt.init(context);
  //开关(默认打开)
  Adapt.setStatus(true);
  //设计图尺寸
  Adapt.setWidth(375);

(2)use


  Adapt Adapt.set()

This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference. "# flutter_screen_util"