diff --git a/lib/features/ets/quick-link/quick_links_view.dart b/lib/features/ets/quick-link/quick_links_view.dart index 3d2c9ee90..f691a531d 100644 --- a/lib/features/ets/quick-link/quick_links_view.dart +++ b/lib/features/ets/quick-link/quick_links_view.dart @@ -60,11 +60,8 @@ class _QuickLinksViewState extends State 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( @@ -73,11 +70,8 @@ class _QuickLinksViewState extends State 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), ), ], ], @@ -100,7 +94,7 @@ class _QuickLinksViewState extends State } return ReorderableGridView.count( - padding: EdgeInsets.zero, + padding: const EdgeInsets.all(8.0), mainAxisSpacing: 2.0, crossAxisSpacing: 2.0, crossAxisCount: crossAxisCount, diff --git a/lib/features/ets/quick-link/widgets/security-info/security_view.dart b/lib/features/ets/quick-link/widgets/security-info/security_view.dart index 09a41cdd0..3565cf87d 100644 --- a/lib/features/ets/quick-link/widgets/security-info/security_view.dart +++ b/lib/features/ets/quick-link/widgets/security-info/security_view.dart @@ -52,88 +52,94 @@ class _SecurityViewState extends State { () => 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), + ), + ], ), - ], + ), ), - ), - ), + ]), ); } diff --git a/lib/features/student/grades/grade_details/grade_details_view.dart b/lib/features/student/grades/grade_details/grade_details_view.dart index 37ed4d83a..bd583bd77 100644 --- a/lib/features/student/grades/grade_details/grade_details_view.dart +++ b/lib/features/student/grades/grade_details/grade_details_view.dart @@ -103,6 +103,8 @@ class _GradesDetailsViewState extends State child: Padding( padding: const EdgeInsets.only(bottom: 8.0), child: SafeArea( + top: false, + bottom: false, child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -124,10 +126,9 @@ class _GradesDetailsViewState extends State ), ], body: SafeArea( - child: Padding( - padding: const EdgeInsets.all(5.0), - child: _buildGradeEvaluations(model), - ), + top: false, + bottom: false, + child: _buildGradeEvaluations(model), ), ), ), @@ -255,6 +256,7 @@ class _GradesDetailsViewState extends State isFirstEvaluation: evaluation == model.course.summary?.evaluations.first, ), + const SizedBox(height: 24) ]), ], ), diff --git a/lib/features/student/student_view.dart b/lib/features/student/student_view.dart index 5e250d657..8c8d1b185 100644 --- a/lib/features/student/student_view.dart +++ b/lib/features/student/student_view.dart @@ -66,6 +66,8 @@ class _StudentViewState extends State { ]; }, body: SafeArea( + top: false, + bottom: false, child: TabBarView( children: tabsView, ), diff --git a/pubspec.yaml b/pubspec.yaml index ce539af67..0ec67fcaa 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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' diff --git a/test/ui/views/goldenFiles/gradesDetailsView_1.png b/test/ui/views/goldenFiles/gradesDetailsView_1.png index cf73c8e49..ee554320b 100644 Binary files a/test/ui/views/goldenFiles/gradesDetailsView_1.png and b/test/ui/views/goldenFiles/gradesDetailsView_1.png differ diff --git a/test/ui/views/goldenFiles/gradesDetailsView_evaluation_not_completed.png b/test/ui/views/goldenFiles/gradesDetailsView_evaluation_not_completed.png index 1941b8006..282a20b53 100644 Binary files a/test/ui/views/goldenFiles/gradesDetailsView_evaluation_not_completed.png and b/test/ui/views/goldenFiles/gradesDetailsView_evaluation_not_completed.png differ diff --git a/test/ui/views/goldenFiles/newsDetailsView_1.png b/test/ui/views/goldenFiles/newsDetailsView_1.png index 23a260b9a..ed356455a 100644 Binary files a/test/ui/views/goldenFiles/newsDetailsView_1.png and b/test/ui/views/goldenFiles/newsDetailsView_1.png differ diff --git a/test/ui/views/goldenFiles/quicksLinksView_1.png b/test/ui/views/goldenFiles/quicksLinksView_1.png index 8a026ee63..75283b5dd 100644 Binary files a/test/ui/views/goldenFiles/quicksLinksView_1.png and b/test/ui/views/goldenFiles/quicksLinksView_1.png differ