-
Notifications
You must be signed in to change notification settings - Fork 814
feat: added About Us screen #2693
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
Conversation
Reviewer's GuideIntroduces a new About Us screen as a StatefulWidget, registers its route, populates it with resources from constants and external packages (url_launcher, font_awesome_flutter, package_info_plus), and updates navigation to include this screen. Sequence Diagram for Navigating to About Us ScreensequenceDiagram
title Sequence Diagram for Navigating to About Us Screen
actor User
Participant NavDrawer as Navigation Drawer
Participant Navigator
Participant AboutUsScreen as About Us Screen
User->>NavDrawer: Taps "About Us" item
alt If AboutUsScreen is already on top and current route
NavDrawer->>Navigator: popUntil(context, ModalRoute.withName('/aboutUs'))
else Else
NavDrawer->>Navigator: pushNamedAndRemoveUntil(context, "/aboutUs", (route) => route.isFirst)
end
Navigator->>AboutUsScreen: Creates and displays instance
AboutUsScreen-->>User: Shows screen content with information and links
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Build successful. APKs to test: https://github.com/fossasia/pslab-android/actions/runs/15115297615/artifacts/3152366741 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Vidhijain20 Looks amazing ! Thank you very much !
@CloudyPadmal Looks nice, isn't it ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are few places with repetitive code.
Try,
final List<Map<String, dynamic>> contactItems = [
{'icon': const Icon(Icons.mail), 'title': connectWithUs[1], 'url': 'mailto:$mail'},
{'icon': const Icon(Icons.link), 'title': connectWithUs[2], 'url': website},
{'icon': const Icon(FontAwesomeIcons.github, size: 20), 'title': connectWithUs[3], 'url': github},
{'icon': const Icon(Icons.facebook_sharp), 'title': connectWithUs[4], 'url': facebook},
{'icon': const Icon(FontAwesomeIcons.xTwitter, size: 20), 'title': connectWithUs[5], 'url': x},
{'icon': const Icon(FontAwesomeIcons.youtube, size: 20), 'title': connectWithUs[6], 'url': youtube},
{'icon': const Icon(Icons.person), 'title': connectWithUs[7], 'url': developers},
];
Create a widget
Widget buildContactList(List<Map<String, dynamic>> items) {
return ListView.separated(
physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemCount: items.length,
separatorBuilder: (_, __) => const Divider(thickness: 0.5, height: 1),
itemBuilder: (context, index) {
final item = items[index];
return ListTile(
leading: item['icon'] as Icon,
title: Text(
item['title'],
style: const TextStyle(fontSize: 14),
),
onTap: () async {
final uri = Uri.parse(item['url']);
if (await canLaunchUrl(uri)) {
await launchUrl(uri);
} else {
debugPrint('Could not launch ${item['url']}');
}
},
);
},
);
}
Use buildContactList(contactItems)
in the Scaffold.
Head branch was pushed to by a user without write access
@CloudyPadmal Thank you very much for your comments. I’ve done the required changes and improved the layout a bit more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can create this widget in the about_us_screen.dart
as we are not going to reuse this anywhere else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CloudyPadmal Sure, I’ll move the widget to the screen itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CloudyPadmal Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done!
Adds the About Us screen.
Screenshots / Recordings
about_us_screen.mp4
Checklist:
strings.xml
,dimens.xml
andcolors.xml
without hard coding any value.strings.xml
,dimens.xml
orcolors.xml
.Summary by Sourcery
Introduce an About Us screen showcasing project information and interactive contact/social links, integrate it into the app’s routing and navigation drawer, and consolidate related constants and dependencies
New Features:
Enhancements:
Build: