Initial commit for complete UI
This commit is contained in:
124
lib/screens/account_screen.dart
Normal file
124
lib/screens/account_screen.dart
Normal file
@@ -0,0 +1,124 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:glowwheels/screens/privacy_policy_screen.dart';
|
||||
import 'package:glowwheels/screens/profile_details_screen.dart';
|
||||
|
||||
import 'package:glowwheels/screens/terms_condition_screen.dart';
|
||||
import 'package:glowwheels/widgets/profile_header.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
class AccountScreen extends StatelessWidget {
|
||||
const AccountScreen({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.white,
|
||||
appBar: AppBar(
|
||||
centerTitle: true,
|
||||
elevation: 0,
|
||||
backgroundColor: Colors.white,
|
||||
title: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: const [
|
||||
ImageIcon(AssetImage("assets/icon/account_icon.png")),
|
||||
|
||||
SizedBox(width: 8),
|
||||
Text(
|
||||
"Account",
|
||||
style: TextStyle(color: Colors.black),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Column(
|
||||
children: [
|
||||
// Profile Info
|
||||
ProfileHeader(),
|
||||
const SizedBox(height: 24),
|
||||
|
||||
// Section Title
|
||||
Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text("Options",
|
||||
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold)),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
// Option Cards
|
||||
OptionTile(
|
||||
icon: "assets/icon/account_icon.png",
|
||||
title: "Profile Details",
|
||||
onTap: () {
|
||||
Navigator.of(context).push(
|
||||
MaterialPageRoute(builder: (_) => ServiceCenterDetailsScreen()),
|
||||
);
|
||||
},
|
||||
),
|
||||
OptionTile(
|
||||
icon: "assets/icon/terms_icon.png",
|
||||
title: "Terms and Conditions",
|
||||
onTap: () {
|
||||
Navigator.of(context).push(
|
||||
MaterialPageRoute(builder: (_) => TermsOfServiceScreen()),
|
||||
);
|
||||
},
|
||||
),
|
||||
OptionTile(
|
||||
icon: "assets/icon/privacy_icon.png",
|
||||
title: "Privacy Policy",
|
||||
onTap: () {
|
||||
Navigator.of(context).push(
|
||||
MaterialPageRoute(builder: (_) => PrivacyPolicyScreen()),
|
||||
);
|
||||
},
|
||||
),
|
||||
OptionTile(
|
||||
icon: "assets/icon/logout_icon.png",
|
||||
title: "Log Out",
|
||||
onTap: () {},
|
||||
isDestructive: true,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class OptionTile extends StatelessWidget {
|
||||
final String icon;
|
||||
final String title;
|
||||
final VoidCallback onTap;
|
||||
final bool isDestructive;
|
||||
|
||||
const OptionTile({
|
||||
super.key,
|
||||
required this.icon,
|
||||
required this.title,
|
||||
required this.onTap,
|
||||
this.isDestructive = false,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Card(
|
||||
color: isDestructive ? Colors.white : Colors.white,
|
||||
elevation: 0.5,
|
||||
margin: const EdgeInsets.symmetric(vertical: 6),
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
|
||||
child: ListTile(
|
||||
leading: ImageIcon(AssetImage(icon),
|
||||
color: Color.fromRGBO(25, 25, 112, 1)),
|
||||
title: Text(title,
|
||||
|
||||
style: GoogleFonts.inter(
|
||||
fontSize: 14,color: Color.fromRGBO(41, 45, 50, 1)
|
||||
,fontWeight: FontWeight.w500
|
||||
),),
|
||||
trailing: const Icon(Icons.arrow_forward_ios, size: 16),
|
||||
onTap: onTap,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user