Refactor UI components across various screens to use SVG avatars, enhance biometric authentication check, and improve code readability with consistent formatting.

This commit is contained in:
2025-06-02 10:42:54 +05:30
parent a2d1ac5226
commit 0d2dfc817e
17 changed files with 346 additions and 231 deletions

View File

@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:material_symbols_icons/material_symbols_icons.dart';
class CardPinSetScreen extends StatefulWidget {
@@ -8,7 +9,7 @@ class CardPinSetScreen extends StatefulWidget {
State<CardPinSetScreen> createState() => _CardPinSetScreen();
}
class _CardPinSetScreen extends State<CardPinSetScreen>{
class _CardPinSetScreen extends State<CardPinSetScreen> {
final _formKey = GlobalKey<FormState>();
final _pinController = TextEditingController();
final _confirmPinController = TextEditingController();
@@ -44,24 +45,33 @@ class _CardPinSetScreen extends State<CardPinSetScreen>{
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
leading: IconButton(icon: const Icon(Symbols.arrow_back_ios_new),
leading: IconButton(
icon: const Icon(Symbols.arrow_back_ios_new),
onPressed: () {
Navigator.pop(context);
},),
title: const Text('Card PIN', style: TextStyle(color: Colors.black,
fontWeight: FontWeight.w500),),
},
),
title: const Text(
'Card PIN',
style: TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
),
centerTitle: false,
actions: const [
actions: [
Padding(
padding: EdgeInsets.only(right: 10.0),
padding: const EdgeInsets.only(right: 10.0),
child: CircleAvatar(
backgroundImage: AssetImage('assets/images/avatar.jpg'), // Replace with your image
backgroundColor: Colors.grey[200],
radius: 20,
child: SvgPicture.asset(
'assets/images/avatar_male.svg',
width: 40,
height: 40,
fit: BoxFit.cover,
),
),
),
],
),
body: Padding(
padding: const EdgeInsets.all(16.0),
child: Form(
@@ -145,4 +155,4 @@ class _CardPinSetScreen extends State<CardPinSetScreen>{
),
);
}
}
}