Skip to content

Commit c009490

Browse files
Merge pull request #412 from xkaper001/xkaper001/issue409
UI Improvements in `profile_screen` & `email_verification_screen` Fixes #409
2 parents fe04341 + 21fb6d7 commit c009490

File tree

3 files changed

+41
-38
lines changed

3 files changed

+41
-38
lines changed

lib/views/screens/email_verification_screen.dart

+4-7
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class EmailVerificationScreen extends StatelessWidget {
3333
child: Column(
3434
children: [
3535
SizedBox(
36-
height: UiSizes.height_60,
36+
height: UiSizes.height_10,
3737
),
3838
MergeSemantics(
3939
child: Column(
@@ -46,7 +46,7 @@ class EmailVerificationScreen extends StatelessWidget {
4646
),
4747
),
4848
SizedBox(
49-
height: UiSizes.height_40,
49+
height: UiSizes.height_20,
5050
),
5151
Align(
5252
alignment: Alignment.centerLeft,
@@ -77,11 +77,8 @@ class EmailVerificationScreen extends StatelessWidget {
7777
],
7878
),
7979
),
80-
Expanded(
81-
flex: 1,
82-
child: SizedBox(
83-
height: UiSizes.height_60,
84-
),
80+
SizedBox(
81+
height: UiSizes.height_60,
8582
),
8683
OtpTextField(
8784
autoFocus: true,

lib/views/screens/profile_screen.dart

+33-28
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ class ProfileScreen extends StatelessWidget {
6666
) {
6767
return Row(
6868
children: [
69+
SizedBox(width: UiSizes.width_20),
6970
GetBuilder<ThemeController>(
7071
builder: (themeController) => CircleAvatar(
7172
backgroundColor: Theme.of(Get.context!).colorScheme.secondary,
@@ -84,8 +85,20 @@ class ProfileScreen extends StatelessWidget {
8485
Expanded(
8586
child: MergeSemantics(
8687
child: Column(
87-
crossAxisAlignment: CrossAxisAlignment.start,
88+
crossAxisAlignment: CrossAxisAlignment.center,
8889
children: [
90+
if (isCreatorProfile == null && controller.isEmailVerified!)
91+
const Padding(
92+
padding: EdgeInsets.only(top: 10),
93+
child: Row(
94+
children: [
95+
Icon(Icons.verified_user_outlined, color: Colors.green),
96+
SizedBox(width: 5),
97+
Text("Verified",
98+
style: TextStyle(color: Colors.green)),
99+
],
100+
),
101+
),
89102
Text(
90103
isCreatorProfile != null
91104
? creatorName ?? ''
@@ -96,29 +109,30 @@ class ProfileScreen extends StatelessWidget {
96109
overflow: TextOverflow.ellipsis,
97110
),
98111
),
99-
Text(
112+
Chip(label: Text(
100113
"@${isCreatorProfile != null ? '' : controller.userName}",
101114
style: TextStyle(
102115
fontSize: UiSizes.size_14,
103116
overflow: TextOverflow.ellipsis,
104117
),
105118
),
106-
if (isCreatorProfile == null && controller.isEmailVerified!)
107-
const Padding(
108-
padding: EdgeInsets.only(top: 10),
109-
child: Row(
110-
children: [
111-
Icon(Icons.verified_user_outlined, color: Colors.green),
112-
SizedBox(width: 5),
113-
Text("Verified user",
114-
style: TextStyle(color: Colors.green)),
115-
],
116-
),
117-
),
119+
shape: RoundedRectangleBorder(
120+
borderRadius: BorderRadius.circular(16),
121+
side: BorderSide(color: Colors.grey.shade300),
122+
),
123+
),
124+
// Text(
125+
// "@${isCreatorProfile != null ? '' : controller.userName}",
126+
// style: TextStyle(
127+
// fontSize: UiSizes.size_14,
128+
// overflow: TextOverflow.ellipsis,
129+
// ),
130+
// ),
118131
],
119132
),
120133
),
121134
),
135+
SizedBox(width: UiSizes.width_20),
122136
],
123137
);
124138
}
@@ -178,20 +192,11 @@ class ProfileScreen extends StatelessWidget {
178192
),
179193
const SizedBox(width: 10),
180194
if (isCreatorProfile == null)
181-
Expanded(
182-
child: ElevatedButton(
183-
onPressed: () {
184-
Get.toNamed(AppRoutes.settings);
185-
},
186-
child: const Row(
187-
mainAxisAlignment: MainAxisAlignment.center,
188-
children: [
189-
Icon(Icons.settings),
190-
SizedBox(width: 10),
191-
Text("Settings"),
192-
],
193-
),
194-
),
195+
ElevatedButton(
196+
onPressed: () {
197+
Get.toNamed(AppRoutes.settings);
198+
},
199+
child: Icon(Icons.settings),
195200
),
196201
],
197202
);

pubspec.yaml

+4-3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ version: 1.0.0+1
2121

2222
environment:
2323
sdk: '>=2.18.6 <3.0.0'
24+
2425

2526
# Dependencies specify other packages that your package needs in order to work.
2627
# To automatically upgrade your package dependencies to the latest versions
@@ -41,10 +42,10 @@ dependencies:
4142
file_picker: ^8.0.7
4243
firebase_analytics: ^10.6.3
4344
firebase_core: ^2.20.0
44-
firebase_messaging: 14.7.3
45+
firebase_messaging: ^14.9.4
4546
flutter:
4647
sdk: flutter
47-
flutter_local_notifications: ^16.1.0
48+
flutter_local_notifications: ^18.0.0
4849
flutter_media_metadata: ^1.0.0+1
4950
flutter_native_splash: ^2.2.19
5051
flutter_onboarding_slider: ^1.0.10
@@ -58,7 +59,7 @@ dependencies:
5859
get: ^4.6.5
5960
get_storage: ^2.1.1
6061
google_fonts: ^4.0.3
61-
http: null
62+
http: ^0.13.6
6263
image_cropper: ^4.0.1
6364
image_picker: ^0.8.7+4
6465
internet_connection_checker_plus: 1.0.1

0 commit comments

Comments
 (0)