MIF_E31222379_MOBILE/lib/screen/auth/login_screen.dart

86 lines
3.2 KiB
Dart

import 'package:flutter/material.dart';
import 'package:rijig_mobile/core/router.dart';
class LoginScreen extends StatelessWidget {
final _formKey = GlobalKey<FormState>();
LoginScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
body: SafeArea(
child: LayoutBuilder(
builder: (context, constraints) {
return SingleChildScrollView(
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Column(
children: [
SizedBox(height: constraints.maxHeight * 0.1),
Text("Halo, Rijig"),
SizedBox(height: constraints.maxHeight * 0.1),
Text(
"Masukkan Nomor Whatsapp",
style: Theme.of(context).textTheme.headlineSmall!.copyWith(
fontWeight: FontWeight.bold,
),
),
SizedBox(height: constraints.maxHeight * 0.05),
Form(
key: _formKey,
child: Column(
children: [
TextFormField(
decoration: const InputDecoration(
hintText: 'Phone',
filled: true,
fillColor: Color(0xFFF5FCF9),
contentPadding: EdgeInsets.symmetric(
horizontal: 16.0 * 1.5,
vertical: 16.0,
),
border: OutlineInputBorder(
borderSide: BorderSide.none,
borderRadius: BorderRadius.all(
Radius.circular(50),
),
),
),
keyboardType: TextInputType.phone,
onSaved: (phone) {},
),
Padding(
padding: const EdgeInsets.symmetric(vertical: 16.0),
),
ElevatedButton(
onPressed: () {
debugPrint("klik send otp");
router.push("/verif-otp");
},
style: ElevatedButton.styleFrom(
elevation: 0,
backgroundColor: const Color(0xFF00BF6D),
foregroundColor: Colors.white,
minimumSize: const Size(double.infinity, 48),
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(
Radius.circular(16),
),
),
),
child: const Text("send otp"),
),
],
),
),
],
),
);
},
),
),
);
}
}