Skip to content

Commit

Permalink
chore: beautifies Code
Browse files Browse the repository at this point in the history
  • Loading branch information
am-casper committed Jan 2, 2024
1 parent e3de526 commit 1bd2df5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
3 changes: 2 additions & 1 deletion lib/presentation/hostel_change/hostel_change_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ class HostelChangeScreen extends StatelessWidget {
backgroundColor: Colors.green,
),
);
context.router.pushAndPopUntil(const ProfileRoute(), predicate: ModalRoute.withName(ProfileRoute.name));
context.router.pushAndPopUntil(const ProfileRoute(),
predicate: ModalRoute.withName(ProfileRoute.name));
}
if (state is HostelChangeInitial && state.error != null) {
ScaffoldMessenger.of(context).showSnackBar(
Expand Down
11 changes: 4 additions & 7 deletions lib/presentation/profile/profile_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ class ProfileScreen extends StatelessWidget {
BlocBuilder<ProfilePageBloc, ProfilePageState>(
builder: (context, state) {
if (state is ProfilePageFetchedState) {

return Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expand Down Expand Up @@ -98,16 +97,14 @@ class ProfileScreen extends StatelessWidget {
10.toVerticalSizedBox,
if (state.hostelChangeStatus['detail'] !=
null ||
(state.hostelChangeStatus[
'is_approved'] !=
(state.hostelChangeStatus['is_approved'] !=
null &&
state.hostelChangeStatus[
'is_approved']))
state
.hostelChangeStatus['is_approved']))
ProfileTextButton(
title: 'Request for Hostel Change',
onPressed: () {
context.router
.push(HostelChangeRoute());
context.router.push(HostelChangeRoute());
},
horizontalPadding: 50,
width: 248,
Expand Down

0 comments on commit 1bd2df5

Please sign in to comment.