achievement_view 0.2.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 90

pub package

AchievementView #

Beautiful toast to show Achievements in your application

Usage of the achievement_view on an android device

Usage #

To use this plugin, add achieviment_view as a dependency in your pubspec.yaml file.

Example #

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

void showAchievementView(BuildContext context){
    AchievementView(
        context,
        title: "Yeaaah!",
        subTitle: "Training completed successfully",
        //onTab: _onTabAchievement,
        //icon: Icon(Icons.insert_emoticon, color: Colors.white,),
        //typeAnimationContent: AnimationTypeAchievement.fadeSlideToUp,
        //borderRadius: 5.0,
        //color: Colors.blueGrey,
        //textStyleTitle: TextStyle(),
        //textStyleSubTitle: TextStyle(),
        //alignment: Alignment.topCenter,
        //duration: Duration(seconds: 3),
        //isCircle: false,
        listener: (status){
          print(status);
          //AchievementState.opening
          //AchievementState.open
          //AchievementState.closing
          //AchievementState.closed
        }
    )..show();
  }

[0.2.0] - 23/04/2019.

  • Fix bug tetStyle

[0.1.2] - 23/04/2019.

  • Update readmi

[0.1.1] - 23/04/2019.

  • Change Color
  • Change animantion content
  • change textStyle
  • Change card retangle or circle
  • listener status animation
  • change icon (widget)
  • change alignment in de screen
  • change duration show
  • change borderradiun in Retangle mode
  • set Title and SubTitle
  • align code

[0.0.1] - 23/04/2019.

  • Change Color
  • Change animantion content
  • change textStyle
  • Change card retangle or circle
  • listener status animation
  • change icon (widget)
  • change alignment in de screen
  • change duration show
  • change borderradiun in Retangle mode
  • set Title and SubTitle

example/README.md

achievement_view_demo #

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

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

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {

  bool isCircle = false;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Container(
        child: Center(
          child: Column(
            mainAxisSize: MainAxisSize.min,
            children: <Widget>[
              Row(
                mainAxisSize: MainAxisSize.min,
                children: <Widget>[
                  Checkbox(
                    value: isCircle,
                    onChanged: (change){
                      setState(() {
                        isCircle = change;
                      });
                    },
                  ),
                  Text("isCircle")
                ],
              ),
              RaisedButton(
                  child: Text("Show"),
                  onPressed: (){
                    show(context);
                  })
            ],
          ),
        ),
      ),
    );
  }

  void show(BuildContext context){
    AchievementView(
        context,
        title: "Yeaaah!",
        subTitle: "Training completed successfully",
        isCircle: isCircle,
        listener: (status){
          print(status);
        }
    )..show();
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  achievement_view: ^0.2.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:achievement_view/achievement_view.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
80
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]
90
Learn more about scoring.

We analyzed this package on Oct 18, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

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.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test