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

Small spacing corrections #1016

Merged
merged 6 commits into from
Jul 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
16 changes: 5 additions & 11 deletions lib/features/ets/quick-link/quick_links_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,8 @@ class _QuickLinksViewState extends State<QuickLinksView>
child: Column(
children: [
Expanded(
child: Padding(
padding: const EdgeInsets.only(top: 8.0, left: 8.0, right: 8.0),
child: _buildReorderableGridView(
model, model.quickLinkList, _buildDeleteButton),
),
child: _buildReorderableGridView(
model, model.quickLinkList, _buildDeleteButton),
),
if (_editMode && model.deletedQuickLinks.isNotEmpty) ...[
const Divider(
Expand All @@ -73,11 +70,8 @@ class _QuickLinksViewState extends State<QuickLinksView>
endIndent: 10,
),
Expanded(
child: Padding(
padding: const EdgeInsets.only(top: 8.0, left: 8.0, right: 8.0),
child: _buildReorderableGridView(
model, model.deletedQuickLinks, _buildAddButton),
),
child: _buildReorderableGridView(
model, model.deletedQuickLinks, _buildAddButton),
),
],
],
Expand All @@ -100,7 +94,7 @@ class _QuickLinksViewState extends State<QuickLinksView>
}

return ReorderableGridView.count(
padding: EdgeInsets.zero,
padding: const EdgeInsets.all(8.0),
mainAxisSpacing: 2.0,
crossAxisSpacing: 2.0,
crossAxisCount: crossAxisCount,
Expand Down
162 changes: 84 additions & 78 deletions lib/features/ets/quick-link/widgets/security-info/security_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,88 +52,94 @@ class _SecurityViewState extends State<SecurityView> {
() => EagerGestureRecognizer()),
}),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
AppIntl.of(context)!.security_reach_security,
style: const TextStyle(
color: AppTheme.etsLightRed, fontSize: 24),
),
),
Card(
child: InkWell(
splashColor: Colors.red.withAlpha(50),
onTap: () => Utils.launchURL(
'tel:${AppIntl.of(context)!.security_emergency_number}',
AppIntl.of(context)!)
.catchError((error) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text(error.toString())));
}),
child: ListTile(
leading: const Icon(Icons.phone, size: 30),
title: Text(AppIntl.of(context)!.security_emergency_call),
subtitle:
Text(AppIntl.of(context)!.security_emergency_number),
),
),
),
Card(
elevation: 0,
color: Colors.transparent,
child: ListTile(
leading: const Icon(Icons.phone, size: 30),
title: Text(
AppIntl.of(context)!.security_emergency_intern_call),
subtitle: Text(
AppIntl.of(context)!.security_emergency_intern_number),
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
AppIntl.of(context)!.security_emergency_procedures,
style: const TextStyle(
color: AppTheme.etsLightRed, fontSize: 24),
),
joinSecurity(),
emergencyProcedures(model),
],
),
),
),
);

Widget joinSecurity() => Padding(
padding: const EdgeInsets.only(top: 8.0, left: 8.0, right: 8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
AppIntl.of(context)!.security_reach_security,
style: const TextStyle(color: AppTheme.etsLightRed, fontSize: 24),
),
Card(
child: InkWell(
borderRadius: const BorderRadius.all(Radius.circular(10)),
splashColor: Colors.red.withAlpha(50),
onTap: () => Utils.launchURL(
'tel:${AppIntl.of(context)!.security_emergency_number}',
AppIntl.of(context)!)
.catchError((error) {
ScaffoldMessenger.of(context)
.showSnackBar(SnackBar(content: Text(error.toString())));
}),
child: ListTile(
leading: const Icon(Icons.phone, size: 30),
title: Text(AppIntl.of(context)!.security_emergency_call),
subtitle:
Text(AppIntl.of(context)!.security_emergency_number),
),
SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: List.generate(
model.emergencyProcedureList.length,
(index) => Card(
child: InkWell(
splashColor: Colors.red.withAlpha(50),
onTap: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) => EmergencyView(
model.emergencyProcedureList[index].title,
model.emergencyProcedureList[index]
.detail))),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Padding(
padding: const EdgeInsets.only(
top: 16.0, bottom: 16.0, left: 16.0),
child: Text(
model.emergencyProcedureList[index].title,
style: const TextStyle(fontSize: 18),
),
),
const Icon(Icons.arrow_forward_ios),
],
),
),
),
),
Card(
elevation: 0,
color: Colors.transparent,
child: ListTile(
leading: const Icon(Icons.phone, size: 30),
title:
Text(AppIntl.of(context)!.security_emergency_intern_call),
subtitle:
Text(AppIntl.of(context)!.security_emergency_intern_number),
),
),
],
),
);

Widget emergencyProcedures(SecurityViewModel model) => SingleChildScrollView(
padding: const EdgeInsets.only(left: 8.0, right: 8.0, bottom: 24.0),
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
Text(
AppIntl.of(context)!.security_emergency_procedures,
style: const TextStyle(color: AppTheme.etsLightRed, fontSize: 24),
),
for (int i = 0; i < model.emergencyProcedureList.length; i++)
Card(
child: InkWell(
borderRadius: const BorderRadius.all(Radius.circular(10)),
splashColor: Colors.red.withAlpha(50),
onTap: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) => EmergencyView(
model.emergencyProcedureList[i].title,
model.emergencyProcedureList[i].detail))),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Padding(
padding: const EdgeInsets.only(
top: 16.0, bottom: 16.0, left: 16.0),
child: Text(
model.emergencyProcedureList[i].title,
style: const TextStyle(fontSize: 18),
),
),
),
const Padding(
padding: EdgeInsets.only(right: 16.0),
child: Icon(Icons.arrow_forward_ios),
),
],
),
],
),
),
),
),
]),
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ class _GradesDetailsViewState extends State<GradesDetailsView>
child: Padding(
padding: const EdgeInsets.only(bottom: 8.0),
child: SafeArea(
top: false,
bottom: false,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Expand All @@ -124,10 +126,9 @@ class _GradesDetailsViewState extends State<GradesDetailsView>
),
],
body: SafeArea(
child: Padding(
padding: const EdgeInsets.all(5.0),
child: _buildGradeEvaluations(model),
),
top: false,
bottom: false,
child: _buildGradeEvaluations(model),
),
),
),
Expand Down Expand Up @@ -255,6 +256,7 @@ class _GradesDetailsViewState extends State<GradesDetailsView>
isFirstEvaluation:
evaluation == model.course.summary?.evaluations.first,
),
const SizedBox(height: 24)
]),
],
),
Expand Down
2 changes: 2 additions & 0 deletions lib/features/student/student_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ class _StudentViewState extends State<StudentView> {
];
},
body: SafeArea(
top: false,
bottom: false,
child: TabBarView(
children: tabsView,
),
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: The 4th generation of ÉTSMobile, the main gateway between the Éco
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev

version: 4.47.0+1
version: 4.48.0+1

environment:
sdk: '>=3.3.0 <4.0.0'
Expand Down
Binary file modified test/ui/views/goldenFiles/gradesDetailsView_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/ui/views/goldenFiles/newsDetailsView_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/ui/views/goldenFiles/quicksLinksView_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.