-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaccount_info.dart
76 lines (70 loc) · 2.31 KB
/
account_info.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import 'package:flutter/material.dart';
class AccountInfo extends StatefulWidget {
const AccountInfo({super.key});
@override
State<AccountInfo> createState() => _AccountInfoState();
}
class _AccountInfoState extends State<AccountInfo> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Container(
color: Color(0x900B0B).withOpacity(0.8),
padding: EdgeInsets.all(20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Icon(Icons.account_circle, size: 40, color: Colors.white),
SizedBox(width: 10),
Text('Account Info', style: TextStyle(color: Colors.white, fontSize: 30, fontWeight: FontWeight.bold)),
Spacer(),
ElevatedButton(
onPressed: () {
// Handle edit button tap
},
style: ElevatedButton.styleFrom(
primary: Colors.white, // Change button background color here
onPrimary: Color(0x900B0B).withOpacity(0.8), // Change text color here
),
child: Text('Edit'),
),
],
),
SizedBox(height: 20),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_buildInfoRow(Icons.person, 'John Doe'),
_buildDivider(),
_buildInfoRow(Icons.email, 'john.doe@example.com'),
_buildDivider(),
_buildInfoRow(Icons.phone, '+1 234 567 890'),
_buildDivider(),
],
),
],
),
),
);
}
Widget _buildInfoRow(IconData icon, String text) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Icon(icon, color: Colors.white, size: 20),
SizedBox(width: 10),
Text(text, style: TextStyle(color: Colors.white, fontSize: 20)),
],
),
SizedBox(height: 10),
],
);
}
Widget _buildDivider() {
return Divider(color: Colors.white);
}
}