multiscreen 1.2.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 79

multiscreen #

This plug-in helps applications design differently from GUI guides, even on devices with different resolutions.

Please refer example code.

##1.2.1 remove debug print

##1.2.0 support rotate screen

##1.1.0 change how to use.

##1.0.6 remove Singleton.

##1.0.5 update gradle

##1.0.4 fix conflict

##1.0.3 update gradle and kotlin

##1.0.2 update gradle and kotlin

##1.0.1 add readme and example code.

1.0.0 #

Release First version.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:multiscreen/multiscreen.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData.light(),
      home: _MyPage(),
    );
  }
}

class _MyPage extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    return _MyPageState();
  }
}

class _MyPageState extends State<_MyPage> {

  @override
  Widget build(BuildContext context) {
    debugPrint('resize(20) = ${resize(20)}');
    return Container(
      color: Colors.white,
      /// resize using Multiscreen.
      margin: EdgeInsets.only(top: resize(80)),
      child: Align(
        alignment: Alignment.center,
        child: Column(children: <Widget>[
          MaterialButton(
            color: Colors.blue,
            height: resize(40),
            minWidth: resize(280),
            child: Text(
              'text',
              style: TextStyle(
                  color: Colors.white,
                  fontSize: resize(16)),
            ),
            onPressed: () {},
          ),
          MaterialButton(
            color: Colors.blue,
            height: resize(40),
            minWidth: resize(300),
            child: Text(
              'text',
              style: TextStyle(
                  color: Colors.white,
                  fontSize: resize(16)),
            ),
            onPressed: () {},
          ),
          MaterialButton(
            color: Colors.blue,
            height: resize(40),
            minWidth: resize(320),
            child: Text(
              'text',
              style: TextStyle(
                  color: Colors.white,
                  fontSize: resize(16)),
            ),
            onPressed: () {},
          ),
          MaterialButton(
            color: Colors.blue,
            height: resize(40),
            minWidth: resize(340),
            child: Text(
              'text',
              style: TextStyle(
                  color: Colors.white,
                  fontSize: resize(16)),
            ),
            onPressed: () {},
          ),
          MaterialButton(
            color: Colors.blue,
            height: resize(40),
            minWidth: resize(360),
            child: Text(
              'text',
              style: TextStyle(
                  color: Colors.white,
                  fontSize: 16.0.resize360),
            ),
            onPressed: () {},
          ),
        ]),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  multiscreen: ^1.2.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:multiscreen/multiscreen.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
58
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
79
Learn more about scoring.

We analyzed this package on Jul 2, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13
  • Flutter: 1.17.5

Analysis suggestions

Package does not support Flutter platform linux

Because of import path [package:multiscreen/multiscreen.dart] that declares support for platforms: android, ios

Package does not support Flutter platform macos

Because of import path [package:multiscreen/multiscreen.dart] that declares support for platforms: android, ios

Package does not support Flutter platform web

Because of import path [package:multiscreen/multiscreen.dart] that declares support for platforms: android, ios

Package does not support Flutter platform windows

Because of import path [package:multiscreen/multiscreen.dart] that declares support for platforms: android, ios

Package not compatible with SDK dart

because of import path [multiscreen] that is in a package requiring null.

Health suggestions

Fix lib/multiscreen.dart. (-0.50 points)

Analysis of lib/multiscreen.dart reported 1 hint:

line 3 col 8: Unused import: 'package:flutter/foundation.dart'.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.6.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8
Dev dependencies
flutter_test