Commit 7f89662f authored by Budi Prasetyo's avatar Budi Prasetyo

forgot password

parent 58b0b867
import 'package:flutter/material.dart';
class ForgotPassword extends StatefulWidget {
const ForgotPassword({Key? key}) : super(key: key);
@override
State<ForgotPassword> createState() => _ForgotPasswordState();
}
class _ForgotPasswordState extends State<ForgotPassword> {
final formKey = GlobalKey<FormState>();
String email = '';
@override
Widget build(BuildContext context) {
return Stack(
children: [
Container(
decoration: BoxDecoration(image: DecorationImage(image: AssetImage('assets/images/medapp_image1.png'),fit: BoxFit.fill)),
),
Padding(
padding: const EdgeInsets.all(21.0),
child: ElevatedButton(onPressed: (){
Navigator.pushNamed(context, '/login');
}, child: Icon(Icons.arrow_back)),
),
Center(
child:AlertDialog(
title: Text('Enter your email address'),
content: Form(
key: formKey,
child: TextFormField(
textAlign: TextAlign.start,
decoration: InputDecoration(
labelText: "Email",
hintStyle: const TextStyle(),
border: OutlineInputBorder(
borderRadius:
BorderRadius.circular(5.0)),
),
onChanged: (value) => email = value,
),
),
actions: <Widget>[
TextButton(
onPressed: () {
Navigator.pushNamed(context, 'dashboard');
},
child: const Text('Send'),
),
],
)
),
],
);
}
}
......@@ -56,7 +56,7 @@ class _Dashboard4State extends State<Dashboard4> {
padding: const EdgeInsets.all(30.0),
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 10),
decoration: ,
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20),color: Colors.blueAccent[200]),
child: Column(
children: [
Container(
......@@ -69,7 +69,8 @@ class _Dashboard4State extends State<Dashboard4> {
Container(
// height: screenSize.height*0.63,
width: screenSize.width*0.95,
color: Colors.white,
decoration: BoxDecoration(borderRadius: BorderRadius.circular(40)),
//color: Colors.white,
child: PaginatedDataTable(
rowsPerPage:5,
// header :Text("Data Message User"),
......
......@@ -199,7 +199,20 @@ class _loginState extends State<login> {
),
),
const Spacer(
flex: 3,
flex: 2,
),
Row(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.end,
children: [
TextButton(onPressed: (){
Navigator.pushNamed(context, '/reset_password');
}, child: Text('Forgot Password?')),
SizedBox(width: 52,)
],
),
const Spacer(
flex: 2,
),
Row(
children: [
......
import 'package:flutter/material.dart';
import 'package:medapp_eksad/auth/forget_password.dart';
import 'package:medapp_eksad/dashboard/admin/main_dashboard_admin.dart';
import 'package:medapp_eksad/homepage.dart';
import 'package:medapp_eksad/login.dart';
......@@ -26,7 +27,8 @@ class MyApp extends StatelessWidget {
'/contact': (context) => const ContactUs(),
'/login': (context) => const login(),
'/register': (context) => const Register(),
'/dashboard': (context) => const DashboardAdmin()
'/dashboard': (context) => const DashboardAdmin(),
'/reset_password': (context) => const ForgotPassword(),
},
);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment