Screen design of Dashboard & customer Info
This commit is contained in:
@@ -1,4 +1,11 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
||||
|
||||
import '../../../app.dart';
|
||||
import '../../dashboard/screens/dashboard_screen.dart';
|
||||
import '../../../api/services/auth_service.dart';
|
||||
import 'package:material_symbols_icons/get.dart';
|
||||
|
||||
class MPinScreen extends StatefulWidget {
|
||||
const MPinScreen({super.key});
|
||||
@@ -48,7 +55,7 @@ class MPinScreenState extends State<MPinScreen> {
|
||||
['1', '2', '3'],
|
||||
['4', '5', '6'],
|
||||
['7', '8', '9'],
|
||||
['', '0', '<']
|
||||
['Enter', '0', '<']
|
||||
];
|
||||
|
||||
return Column(
|
||||
@@ -62,6 +69,17 @@ class MPinScreenState extends State<MPinScreen> {
|
||||
onTap: () {
|
||||
if (key == '<') {
|
||||
deleteDigit();
|
||||
} else if (key == 'Enter') {
|
||||
if (mPin.length == 4) {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => const NavigationScaffold()),
|
||||
);
|
||||
} else {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(content: Text("Please enter 4 digits")),
|
||||
);
|
||||
}
|
||||
} else if (key.isNotEmpty) {
|
||||
addDigit(key);
|
||||
}
|
||||
@@ -74,9 +92,14 @@ class MPinScreenState extends State<MPinScreen> {
|
||||
color: Colors.grey[200],
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
child: key == 'Enter' ? const Icon(Symbols.check) : Text(
|
||||
key == '<' ? '⌫' : key,
|
||||
style: const TextStyle(fontSize: 24),
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: key == 'Enter' ?
|
||||
FontWeight.normal : FontWeight.normal,
|
||||
color: key == 'Enter' ? Colors.blue : Colors.black,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -107,7 +130,9 @@ class MPinScreenState extends State<MPinScreen> {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
TextButton(onPressed: () {}, child: const Text("Try another way")),
|
||||
TextButton(onPressed: () {
|
||||
AuthService.authenticateWithBiometrics(context);
|
||||
}, child: const Text("Try another way")),
|
||||
TextButton(onPressed: () {}, child: const Text("Register?")),
|
||||
],
|
||||
),
|
||||
|
Reference in New Issue
Block a user