You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
989 B
Dart
34 lines
989 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:lottie/lottie.dart';
|
|
|
|
class SuccessDialog extends StatelessWidget {
|
|
bool isFromDashboard;
|
|
|
|
SuccessDialog(this.isFromDashboard);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
double size = MediaQuery.of(context).size.width / 1.8;
|
|
return Column(
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
Container(
|
|
width: size,
|
|
height: size,
|
|
child: Card(
|
|
child: Lottie.asset('assets/lottie/lt_success.json', repeat: false, reverse: false, onLoaded: (v) {
|
|
print("calling_lottie " + v.seconds.toString());
|
|
Future.delayed(Duration(seconds: 2)).then((value) {
|
|
Navigator.pop(context);
|
|
if (isFromDashboard) Navigator.pop(context);
|
|
});
|
|
}),
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|