achievement_view 1.0.1 copy "achievement_view: ^1.0.1" to clipboard
achievement_view: ^1.0.1 copied to clipboard

Beautiful toast to show Achievements in your application in a simple way

example/lib/main.dart

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

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

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

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key}) : super(key: key);

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  bool isCircle = false;

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

  void show(BuildContext context) {
    AchievementView(
      title: "Yeaaah!",
      subTitle: "Training completed successfully! ",
      isCircle: isCircle,
      listener: print,
    ).show(context);
  }
}
106
likes
150
pub points
85%
popularity

Publisher

verified publisherrafaelbarbosatec.com

Beautiful toast to show Achievements in your application in a simple way

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on achievement_view