package_test 0.0.4

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 48

package_test

A new flutter plugin project.

Getting Started

For help getting started with Flutter, view our online documentation.

For help on editing plugin code, view the documentation.

0.0.1

  • TODO: Describe initial release.

example/lib/main.dart

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

import 'package:flutter/services.dart';
import 'package:package_test/package_test.dart';

void main() => runApp(new MyAppTest());

class MyAppTest extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      home: new Scaffold(
          appBar: new AppBar(title: new Text('Demo')),
          body: new Builder(builder: (BuildContext context) {
            return new FlatButton(
              child: new Text('BUTTON'),
              onPressed: () {
                // here, Scaffold.of(context) returns the locally created Scaffold
                showAlert(context);
              },
            );
          })),
    );
  }

  void showAlert(BuildContext context) {
    AlertDialog dialog;
    var title = " abcdhadasda ";
    var description = "dsakdjs dksajd klasjd lkasdjsald as";
    var confirm = "OK";

    dialog = new AlertDialog(
      contentPadding: new EdgeInsets.all(0.0),
      content: new Container(
        width: 300.0,
        height: 220.0,
        decoration: new BoxDecoration(
          shape: BoxShape.rectangle,
          color: const Color(0xFFFFFF),
          borderRadius: new BorderRadius.all(new Radius.circular(32.0)),
        ),
        child: new Column(
          children: <Widget>[
            Container(
              height: 170.0,
              child: Column(
                mainAxisAlignment: MainAxisAlignment.center,
                children: <Widget>[
                  Image.asset(
                    "images/sapban.png",
                    height: 50.0,
                    width: 100.0,
                  ),
                  Container(
                    margin: title.isNotEmpty
                        ? EdgeInsets.all(8.0)
                        : EdgeInsets.all(0.0),
                    child: Text(
                      title != null ? title : "",
                      style: TextStyle(
                        color: Color(0xFFe5101d),
                        fontSize: 16.0,
                      ),
                      textAlign: TextAlign.center,
                    ),
                  ),
                  Text(
                    description,
                    style: TextStyle(
                      color: Colors.black,
                      fontSize: 14.0,
                    ),
                    textAlign: TextAlign.center,
                  ),
                ],
              ),
            ),
            GestureDetector(
              onTap: () => Navigator.pop(context),
              child: new Container(
                height: 50.0,
                decoration: new BoxDecoration(
                  color: const Color(0xFFd30c0c),
                ),
                child: new Center(
                  child: new Text(
                    confirm != null ? confirm : "OK",
                    style: TextStyle(
                      color: Colors.white,
                      fontSize: 18.0,
                    ),
                    textAlign: TextAlign.center,
                  ),
                ),
              ),
            ),
          ],
        ),
      ),
    );

    // showDialog(context: context, child: dialog);

    showDialog(context: context, builder: (_) => dialog);
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  package_test: ^0.0.4

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:


import 'package:package_test/package_test.dart';
  
Version Uploaded Documentation Archive
0.0.4 Aug 3, 2018 Go to the documentation of package_test 0.0.4 Download package_test 0.0.4 archive
0.0.3 Jul 31, 2018 Go to the documentation of package_test 0.0.3 Download package_test 0.0.3 archive
0.0.2 Jul 31, 2018 Go to the documentation of package_test 0.0.2 Download package_test 0.0.2 archive
0.0.1 Jul 31, 2018 Go to the documentation of package_test 0.0.1 Download package_test 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
48
Learn more about scoring.

We analyzed this package on Dec 5, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.7
  • Flutter: 1.0.0

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Fix lib/package_test.dart. (-1.49 points)

Analysis of lib/package_test.dart reported 3 hints:

line 2 col 8: Unused import: 'dart:async'.

line 4 col 8: Unused import: 'package:flutter/services.dart'.

line 5 col 8: Unused import: 'package:package_test/package_test.dart'.

Maintenance suggestions

Package is pre-v0.1 release. (-10 points)

While there is nothing inherently wrong with versions of 0.0.*, it usually means that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.28.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8