tf_toast 0.4.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 24

tf_toast #

A new Flutter project.

Getting Started #

This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.

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

0.4.0 #

  • fix toast.backgroundColor = black; title.color = white; subTitle.color = white

0.3.0 #

  • Determine the widget size based on the content

0.2.0 #

  • fix

0.1.0 #

  • Toast.show...
  • Toast.loading...
  • Toast.fail...
  • Toast.success...

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:tf_toast_example/TestToastPage.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: HomePage(),
    );
  }
}

class HomePage extends StatefulWidget {
  @override
  State<StatefulWidget> createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Plugin example app')),
      body: Center(
        child: FlatButton(
          child: Text('TestToastPage'),
          onPressed: () {
            Navigator.of(context)
                .push(MaterialPageRoute(builder: (context) => TestToastPage()));
          },
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  tf_toast: ^0.4.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or 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:tf_toast/generated/i18n.dart';
import 'package:tf_toast/Toast.dart';
import 'package:tf_toast/ToastConfig.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
41
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
60
Overall:
Weighted score of the above. [more]
24
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.9+1
  • Flutter: 1.17.3

Health issues and suggestions

Fix lib/Toast.dart. (-58.44 points)

Analysis of lib/Toast.dart failed with 3 errors, 3 hints, including:

line 219 col 21: This requires the 'control-flow-collections' experiment to be enabled.

line 225 col 21: This requires the 'control-flow-collections' experiment to be enabled.

line 240 col 21: This requires the 'control-flow-collections' experiment to be enabled.

line 140 col 13: Name non-constant identifiers using lowerCamelCase.

line 141 col 13: Name non-constant identifiers using lowerCamelCase.

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

Analysis of lib/ToastConfig.dart reported 1 hint:

line 115 col 19: Use ; instead of {} for empty constructor bodies.

Format lib/generated/i18n.dart.

Run flutter format to format lib/generated/i18n.dart.

Maintenance issues and suggestions

No valid SDK. (-20 points)

The analysis could not detect a valid SDK that can use this package.

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Dependencies

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