eyro_toast 0.1.0

Flutter Toast #

Pub Build Status Coverage Status GitHub FOSSA Status

A simple yet powerful Flutter plugin for showing Toast at Android and iOS.

Features:

  • Native Toast
  • Pure Flutter Toaster

Installation #

Add to pubspec.yaml:

dependencies:
  eyro_toast: any

Import Library #

import 'package:eyro_toast/eyro_toast.dart';

Native Toast #

// showing short Toast
await EyroToast.showToast(
  text: 'This is short toast',
  duration: ToastDuration.short,
);

// showing long Toast
await EyroToast.showToast(
  text: 'This is long toast',
  duration: ToastDuration.long,
);

Pure Flutter Toaster #

await showToaster(
  text: 'This is a centered Toaster',
  duration: ToastDuration.short,
  gravity: ToastGravity.bottom,
  borderRadius: const BorderRadius.all(Radius.circular(16)),
  backgroundColor: const Color(0xAA000000),
  fontColor: const Color(0xFFFFFFFF),
  textAlign: TextAlign.center,
  margin: const EdgeInsets.symmetric(horizontal: 16),
  padding: const EdgeInsets.symmetric(
    horizontal: 16,
    vertical: 12,
  ),
  border: null,
);

Author #

Eyro Toast plugin is developed by Eyro Labs. You can contact us at admin@cubeacon.com.

[0.1.0] - Dec 18, 2019

  • Initial release.
    • Native Toast Android and iOS
    • Pure Flutter Toaster

example/README.md

Flutter Toast Example #

Native Toast #

// showing short Toast
await FlutterToast.showToast(
  text: 'This is short toast',
  duration: ToastDuration.short,
);

// showing long Toast
await FlutterToast.showToast(
  text: 'This is long toast',
  duration: ToastDuration.long,
);

Pure Flutter Toaster #

await showToaster(
  text: 'This is a centered Toaster',
  duration: ToastDuration.short,
  gravity: ToastGravity.bottom,
  borderRadius: const BorderRadius.all(Radius.circular(16)),
  backgroundColor: const Color(0xAA000000),
  fontColor: const Color(0xFFFFFFFF),
  textAlign: TextAlign.center,
  margin: const EdgeInsets.symmetric(horizontal: 16),
  padding: const EdgeInsets.symmetric(
    horizontal: 16,
    vertical: 12,
  ),
  border: null,
);

Use this package as a library

1. Depend on it

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


dependencies:
  eyro_toast: ^0.1.0

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:eyro_toast/eyro_toast.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
36
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]
68
Learn more about scoring.

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

  • Dart: 2.7.1
  • pana: 0.13.5
  • Flutter: 1.12.13+hotfix.7

Dependencies

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