success_error_overlay 1.0.1 success_error_overlay: ^1.0.1 copied to clipboard
A plugin for showing Succes or Error OverLay in a few lines of code and highly customizable colors and text
import 'package:flutter/material.dart';
import 'package:success_error_overlay/success_error_overlay.dart';
class Example extends StatefulWidget {
@override
_ExampleState createState() => _ExampleState();
}
class _ExampleState extends State<Example> {
bool isVisible = false;
@override
Widget build(BuildContext context) {
return Scaffold(
body: Stack(
fit: StackFit.expand,
children: <Widget>[
Center(
child: RaisedButton(
onPressed: () => setState(() => isVisible = true),
child: Text("Show Overlay"),
),
),
!isVisible ? Container() : SuccessErrorOverlay(
onTap: () => setState(() => isVisible = false),
isCorrect: true,
),
],
),
);
}
}