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

Added about us in profile screen #31

Merged
merged 2 commits into from
Jan 15, 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
11 changes: 10 additions & 1 deletion noticeboard/lib/bloc/profile_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ class ProfileBloc {
feedbackHandler();
} else if (event == ProfileEvents.notificationSettingsEvent) {
notificationSettingsHandler();
} else if (event == ProfileEvents.aboutUsEvent) {
aboutUsHandler();
}
});
}
Expand All @@ -49,7 +51,7 @@ class ProfileBloc {
const String playStoreurl =
'https://play.google.com/store/apps/details?id=com.img.noticeboard&hl=en_US&gl=IN';
const String iosUrl =
"https://www.apple.com/in/app-store/"; // TODO: Change to actual app url on app store
"https://apps.apple.com/in/app/channel-i-noticeboard/id6443708603";

late String url;

Expand All @@ -76,6 +78,13 @@ class ProfileBloc {
}
}

void aboutUsHandler() async {
const url = "https://channeli.in/maintainer_site/";
if (await canLaunchUrl(Uri.parse(url))) {
await launchUrl(Uri.parse(url), mode: LaunchMode.inAppWebView);
}
}

void disposeStreams() {
_eventController.close();
}
Expand Down
3 changes: 2 additions & 1 deletion noticeboard/lib/enum/profile_enum.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ enum ProfileEvents {
logoutEvent,
bookmarksEvent,
feedbackEvent,
notificationSettingsEvent
notificationSettingsEvent,
aboutUsEvent
}
2 changes: 2 additions & 0 deletions noticeboard/lib/screens/profile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ class _ProfileState extends State<Profile> {
'Notification settings',
ProfileEvents.notificationSettingsEvent),
sizedBox(20.0),
buildMenuItem(aboutUsIcon, "About us", ProfileEvents.aboutUsEvent),
sizedBox(20.0),
buildMenuItem(logoutIcon, 'Logout', ProfileEvents.logoutEvent)
],
),
Expand Down
4 changes: 4 additions & 0 deletions noticeboard/lib/styles/profile_constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ Icon logoutIcon = Icon(
Icons.exit_to_app,
color: globalBlue,
);
Icon aboutUsIcon = Icon(
Icons.person_search_sharp,
color: globalBlue,
);

Container divider(double width) {
return Container(
Expand Down
Loading