import 'package:flutter/material.dart'; class ForgotPasswordScreen extends StatefulWidget { const ForgotPasswordScreen({super.key}); @override State createState() => _ForgotPasswordScreenState(); } class _ForgotPasswordScreenState extends State { int step = 0; @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: const Text("Reset Password"), ), body: Padding( padding: const EdgeInsets.all(20), child: Column( children: [ if (step == 0) ...[ const Text( "Masukkan nama akun dan Gmail", style: TextStyle(fontSize: 18), ), const SizedBox(height: 20), TextField( decoration: InputDecoration( hintText: "Nama Akun", border: OutlineInputBorder( borderRadius: BorderRadius.circular(10), ), ), ), const SizedBox(height: 20), TextField( decoration: InputDecoration( hintText: "Gmail", border: OutlineInputBorder( borderRadius: BorderRadius.circular(10), ), ), ), const SizedBox(height: 30), ElevatedButton( onPressed: () { setState(() { step = 1; }); }, child: const Text("Kirim Kode"), ), ], if (step == 1) ...[ const Text( "Masukkan kode verifikasi", style: TextStyle(fontSize: 18), ), const SizedBox(height: 20), TextField( decoration: InputDecoration( hintText: "Kode Verifikasi", border: OutlineInputBorder( borderRadius: BorderRadius.circular(10), ), ), ), const SizedBox(height: 30), ElevatedButton( onPressed: () { setState(() { step = 2; }); }, child: const Text("Verifikasi"), ), ], if (step == 2) ...[ const Text( "Buat password baru", style: TextStyle(fontSize: 18), ), const SizedBox(height: 20), TextField( obscureText: true, decoration: InputDecoration( hintText: "Password Baru", border: OutlineInputBorder( borderRadius: BorderRadius.circular(10), ), ), ), const SizedBox(height: 20), TextField( obscureText: true, decoration: InputDecoration( hintText: "Konfirmasi Password", border: OutlineInputBorder( borderRadius: BorderRadius.circular(10), ), ), ), const SizedBox(height: 30), ElevatedButton( onPressed: () { Navigator.pop(context); }, child: const Text("Simpan Password"), ), ], ], ), ), ); } }