Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Profile Page UI Update #237

Merged
merged 2 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/theme/app_font.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,10 @@ class FontThemeClass {
);
}

TextStyle body(BuildContext ctx, {Color? color, FontWeight? fontWeight}) {
TextStyle body(BuildContext ctx,
{Color? color, FontWeight? fontWeight, double? fontSize}) {
return TextStyle(
fontSize: 16.sp,
fontSize: fontSize ?? 16.sp,
fontFamily: 'Outfit',
fontWeight: fontWeight ?? FontWeight.w400,
color: color ?? ctx.colorScheme.primaryText,
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/views/profile/preferences/preferences_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class PreferencesView extends StatelessWidget {
),
body: SafeArea(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 20).r,
padding: const EdgeInsets.symmetric(horizontal: 25).r,
child: SingleChildScrollView(
child: Column(
children: [
Expand Down
29 changes: 15 additions & 14 deletions lib/ui/views/profile/preferences/preferences_view_components.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class LogoutButton extends ViewModelWidget<PreferencesViewModel> {
context,
color: Colors.red.withOpacity(0.8),
fontWeight: FontWeight.w700,
fontSize: 18.sp,
),
),
),
Expand All @@ -41,11 +42,10 @@ class PasswordChangeTile extends ViewModelWidget<PreferencesViewModel> {
borderRadius: BorderRadius.circular(20).r,
),
leading: SizedBox(
width: 60.w,
child: Icon(
Icons.lock_outline_rounded,
size: 30.r,
color: context.colorScheme.accentColor,
size: 35.r,
color: context.colorScheme.secondary.withOpacity(0.6),
),
),
subtitle: Text(
Expand All @@ -70,7 +70,8 @@ class PasswordChangeTile extends ViewModelWidget<PreferencesViewModel> {
},
child: Icon(
Icons.arrow_forward_ios_rounded,
color: context.colorScheme.primaryText,
size: 25.r,
color: context.colorScheme.primaryText.withOpacity(0.6),
),
),
),
Expand All @@ -91,14 +92,13 @@ class MisNumberTile extends ViewModelWidget<PreferencesViewModel> {
minVerticalPadding: 15.r,
tileColor: context.colorScheme.card,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20).r,
borderRadius: BorderRadius.circular(12).r,
),
leading: SizedBox(
width: 60.w,
child: Icon(
Icons.school_outlined,
size: 30.r,
color: context.colorScheme.accentColor,
size: 35.r,
color: context.colorScheme.secondary.withOpacity(0.6),
),
),
trailing: GestureDetector(
Expand All @@ -107,7 +107,8 @@ class MisNumberTile extends ViewModelWidget<PreferencesViewModel> {
},
child: Icon(
Icons.copy_outlined,
color: context.colorScheme.primaryText,
color: context.colorScheme.primaryText.withOpacity(0.6),
size: 25.r,
),
),
title: Column(
Expand Down Expand Up @@ -148,14 +149,13 @@ class EmailAdressTile extends ViewModelWidget<PreferencesViewModel> {
minVerticalPadding: 15.r,
tileColor: context.colorScheme.card,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20).r,
borderRadius: BorderRadius.circular(12).r,
),
leading: SizedBox(
width: 60.w,
child: Icon(
Icons.email_outlined,
size: 30.r,
color: context.colorScheme.accentColor,
size: 35.r,
color: context.colorScheme.secondary.withOpacity(0.6),
),
),
trailing: GestureDetector(
Expand All @@ -164,7 +164,8 @@ class EmailAdressTile extends ViewModelWidget<PreferencesViewModel> {
},
child: Icon(
Icons.copy_outlined,
color: context.colorScheme.primaryText,
color: context.colorScheme.primaryText.withOpacity(0.6),
size: 25.r,
),
),
title: Column(
Expand Down
15 changes: 7 additions & 8 deletions lib/ui/views/profile/profile_view.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:abhiyaan/ui/common/circular_loading_indicator.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:abhiyaan/file_exporter.dart';
import 'package:abhiyaan/ui/common/url_launcher.dart';
import 'package:cached_network_image/cached_network_image.dart';

part 'profile_view_model.dart';
part "profile_view_component.dart";
Expand All @@ -24,7 +24,7 @@ class ProfileView extends StatelessWidget {
),
);
return ViewModelBuilder<ProfileViewModel>.reactive(
viewModelBuilder: () => locator<ProfileViewModel>(),
viewModelBuilder: () => locator<ProfileViewModel>(),
onViewModelReady: (viewModel) => viewModel.init(),
disposeViewModel: false,
builder: (context, model, child) {
Expand All @@ -34,18 +34,17 @@ class ProfileView extends StatelessWidget {
? const CircularLoadingIndicator()
: SafeArea(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 20).r,
padding: const EdgeInsets.symmetric(horizontal: 33).r,
child: Column(
children: [
const AppBarWidget(),
const ProfileImageWidget(),
const ProfileSectionText(title: 'Settings'),
16.verticalSpace,
const ProfileCard(),
16.verticalSpace,
const DarkModeTile(),
// 16.verticalSpace,
// model.localStorageService.read('userProfile') == "Explorer" || model.localStorageService.read('userProfile') == "Faculty"
// ? const SizedBox()
// : const Cerificatation(),
16.verticalSpace,
const ProfileSectionText(title: 'Others'),
16.verticalSpace,
const HelpSupportTile(),
16.verticalSpace,
Expand Down
Loading