You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

140 lines
4.3 KiB

import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:teso/Pages/Sub_Pages/LandingPage/resetVerification.dart';
class SuccessPage extends StatefulWidget {
@override
_SuccessPageState createState() => _SuccessPageState();
}
class _SuccessPageState extends State<SuccessPage> {
var usern = new TextEditingController();
bool visibleT = true;
var password = new TextEditingController();
bool loading = false;
bool error = false;
bool rememberMe = false;
bool success = false;
String usernameFor;
@override
void dispose() {
super.dispose();
}
@override
Widget build(BuildContext context) {
return Dialog(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(Consts.padding),
),
elevation: 0.0,
backgroundColor: Colors.transparent,
child: SingleChildScrollView(
scrollDirection: Axis.vertical,
child: Stack(
children: <Widget>[
Container(
padding: EdgeInsets.only(
top: Consts.avatarRadius + Consts.padding,
bottom: Consts.padding,
left: Consts.padding,
right: Consts.padding,
),
margin: EdgeInsets.only(top: Consts.avatarRadius),
decoration: new BoxDecoration(
color: Colors.white,
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(Consts.padding),
boxShadow: [
BoxShadow(
color: Colors.black26,
blurRadius: 10.0,
offset: const Offset(0.0, 10.0),
),
],
),
child: Column(
mainAxisSize: MainAxisSize.min, // To make the card compact
children: <Widget>[
Visibility(
visible: visibleT,
child: Text(
"Success",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 15.0,
fontWeight: FontWeight.w700,
color: Colors.green,
),
),
),
SizedBox(height: 16.0),
Text(
"A password reset link has been sent to your email !!!",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 12.0,
color: Colors.black87,
),
),
SizedBox(height: 14.0),
Align(
alignment: Alignment.bottomRight,
child: TextButton(
onPressed: () async {
await Navigator.push(context, MaterialPageRoute(
builder: (context) {
return ResetVerificationCode();
},
));
Navigator.pop(context);
},
child: Text(
"OK",
style: TextStyle(
color: Colors.black87,
),
),
),
),
Visibility(
visible: loading,
child: Align(
alignment: Alignment.bottomCenter,
child: CupertinoActivityIndicator(
animating: true,
radius: 15,
),
),
),
],
),
),
Positioned(
left: Consts.padding,
right: Consts.padding,
child: CircleAvatar(
child: Icon(
Icons.check_circle,
color: Colors.green,
size: 100,
),
backgroundColor: Colors.white,
radius: Consts.avatarRadius,
),
),
],
),
),
);
}
}
class Consts {
Consts._();
static const double padding = 16.0;
static const double avatarRadius = 55.0;
}