diff --git a/assets/image/homepage/Cream_Black.jpg b/assets/image/homepage/Cream_Black.jpg new file mode 100644 index 00000000..15bacfe1 Binary files /dev/null and b/assets/image/homepage/Cream_Black.jpg differ diff --git a/assets/image/homepage/Digitale_infomarkt_25_mei_2024.jpg b/assets/image/homepage/Digitale_infomarkt_25_mei_2024.jpg new file mode 100644 index 00000000..89f433a0 Binary files /dev/null and b/assets/image/homepage/Digitale_infomarkt_25_mei_2024.jpg differ diff --git a/assets/image/homepage/afscheid_bestuur_rotex.jpg b/assets/image/homepage/afscheid_bestuur_rotex.jpg new file mode 100644 index 00000000..0787a9fd Binary files /dev/null and b/assets/image/homepage/afscheid_bestuur_rotex.jpg differ diff --git a/assets/image/homepage/barbara_with_students.jpg b/assets/image/homepage/archive/barbara_with_students.jpg similarity index 100% rename from assets/image/homepage/barbara_with_students.jpg rename to assets/image/homepage/archive/barbara_with_students.jpg diff --git a/assets/image/homepage/digitale_informatie_ochtend_2024.jpg b/assets/image/homepage/archive/digitale_informatie_ochtend_2024.jpg similarity index 100% rename from assets/image/homepage/digitale_informatie_ochtend_2024.jpg rename to assets/image/homepage/archive/digitale_informatie_ochtend_2024.jpg diff --git a/assets/image/homepage/saying_goodby.jpg b/assets/image/homepage/archive/saying_goodby.jpg similarity index 100% rename from assets/image/homepage/saying_goodby.jpg rename to assets/image/homepage/archive/saying_goodby.jpg diff --git a/assets/image/homepage/saying_goodby_2.jpeg b/assets/image/homepage/archive/saying_goodby_2.jpeg similarity index 100% rename from assets/image/homepage/saying_goodby_2.jpeg rename to assets/image/homepage/archive/saying_goodby_2.jpeg diff --git a/assets/image/homepage/selectiedag_8_oktober.png b/assets/image/homepage/archive/selectiedag_8_oktober.png similarity index 100% rename from assets/image/homepage/selectiedag_8_oktober.png rename to assets/image/homepage/archive/selectiedag_8_oktober.png diff --git a/assets/image/homepage/shelterbox.jpg b/assets/image/homepage/archive/shelterbox.jpg similarity index 100% rename from assets/image/homepage/shelterbox.jpg rename to assets/image/homepage/archive/shelterbox.jpg diff --git a/assets/image/homepage/together.jpg b/assets/image/homepage/archive/together.jpg similarity index 100% rename from assets/image/homepage/together.jpg rename to assets/image/homepage/archive/together.jpg diff --git a/assets/image/homepage/PHOTO-2023-11-16-20-04-48.jpg b/assets/image/homepage/class_2024.jpg similarity index 100% rename from assets/image/homepage/PHOTO-2023-11-16-20-04-48.jpg rename to assets/image/homepage/class_2024.jpg diff --git a/assets/image/homepage/prebounds_in_action.jpg b/assets/image/homepage/prebounds_in_action.jpg new file mode 100644 index 00000000..e1cb3d2f Binary files /dev/null and b/assets/image/homepage/prebounds_in_action.jpg differ diff --git a/assets/website files/news.json b/assets/website files/news.json index b3ce92ae..cad6dcff 100644 --- a/assets/website files/news.json +++ b/assets/website files/news.json @@ -1,5 +1,13 @@ { "news": [ + { + "id": 9, + "images": "https://www.rotary.nl/yep/yep-app/tu4w6b3-6436ie5-63h0jf-9i639i4-t3mf67-uhdrs/images/news/nieuwsbrief-najaar-2023.png", + "pdf": "https://www.rotary.nl/yep/yep-app/tu4w6b3-6436ie5-63h0jf-9i639i4-t3mf67-uhdrs/news/nieuwsbrief-najaar-2023-def.pdf", + "title": "Nieuwsbrief Najaar 2023", + "description": "", + "isPdf": "yes" + }, { "id": 8, "images": "https://www.rotary.nl/yep/yep-app/tu4w6b3-6436ie5-63h0jf-9i639i4-t3mf67-uhdrs/images/news/nieuwsbrief-voorjaar-2023.png", diff --git a/lib/core/presentation/pages/inbounds_students_details_page.dart b/lib/core/presentation/pages/inbounds_students_details_page.dart index 85222f7c..d2eed3e5 100644 --- a/lib/core/presentation/pages/inbounds_students_details_page.dart +++ b/lib/core/presentation/pages/inbounds_students_details_page.dart @@ -36,7 +36,6 @@ class InboundsDetails extends StatelessWidget { leading: UniformBackButton(), title: Text( 'Student Profile', - textScaleFactor: 1.2, style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/core/presentation/pages/organization_contact_details_page.dart b/lib/core/presentation/pages/organization_contact_details_page.dart index e15e6d01..04eda870 100644 --- a/lib/core/presentation/pages/organization_contact_details_page.dart +++ b/lib/core/presentation/pages/organization_contact_details_page.dart @@ -41,7 +41,7 @@ class OrganizationDetails extends StatelessWidget { leading: UniformBackButton(), title: Text( 'Organization', - textScaleFactor: 1.4, + textScaler: TextScaler.linear(1.4), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/core/presentation/pages/pdf_viewer_share.dart b/lib/core/presentation/pages/pdf_viewer_share.dart index 8b2c29c6..dd897894 100644 --- a/lib/core/presentation/pages/pdf_viewer_share.dart +++ b/lib/core/presentation/pages/pdf_viewer_share.dart @@ -73,10 +73,9 @@ class _PDFPageWithShareState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - systemOverlayStyle: - MediaQuery.of(context).platformBrightness == Brightness.light - ? SystemUiOverlayStyle.dark - : SystemUiOverlayStyle.light, + systemOverlayStyle: SystemUiOverlayStyle( + statusBarBrightness: MediaQuery.of(context).platformBrightness, + ), backgroundColor: Colors.transparent, elevation: 0.0, leading: UniformBackButton(), diff --git a/lib/core/presentation/pages/rotex_contact_details_page.dart b/lib/core/presentation/pages/rotex_contact_details_page.dart index 11be9cd0..25a428a8 100644 --- a/lib/core/presentation/pages/rotex_contact_details_page.dart +++ b/lib/core/presentation/pages/rotex_contact_details_page.dart @@ -33,7 +33,7 @@ class RotexDetails extends StatelessWidget { leading: UniformBackButton(), title: Text( 'Rotex', - textScaleFactor: 1.4, + textScaler: TextScaler.linear(1.4), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/core/presentation/widgets/photo_gallery/gallery_view.dart b/lib/core/presentation/widgets/photo_gallery/gallery_view.dart index e1633540..c8015075 100644 --- a/lib/core/presentation/widgets/photo_gallery/gallery_view.dart +++ b/lib/core/presentation/widgets/photo_gallery/gallery_view.dart @@ -65,16 +65,15 @@ class _GalleryViewPageState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - systemOverlayStyle: - MediaQuery.of(context).platformBrightness == Brightness.light - ? SystemUiOverlayStyle.dark - : SystemUiOverlayStyle.light, + systemOverlayStyle: SystemUiOverlayStyle( + statusBarBrightness: MediaQuery.of(context).platformBrightness, + ), backgroundColor: Colors.transparent, elevation: 0.0, leading: UniformBackButton(), title: Text( 'Gallery View', - textScaleFactor: 1.2, + textScaler: TextScaler.linear(1.2), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), diff --git a/lib/features/about/presentation/pages/about_page.dart b/lib/features/about/presentation/pages/about_page.dart index 315ddb71..abc78c18 100644 --- a/lib/features/about/presentation/pages/about_page.dart +++ b/lib/features/about/presentation/pages/about_page.dart @@ -24,7 +24,7 @@ class _AboutPageState extends State { centerTitle: false, title: Text( 'About Us', - textScaleFactor: 1.7, + textScaler: TextScaler.linear(1.7), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/calendar/presentation/pages/events_page.dart b/lib/features/calendar/presentation/pages/events_page.dart index b78626e1..42580e8f 100644 --- a/lib/features/calendar/presentation/pages/events_page.dart +++ b/lib/features/calendar/presentation/pages/events_page.dart @@ -114,16 +114,15 @@ class _CalendarPageState extends State { print(kEvents.length); return Scaffold( appBar: AppBar( - systemOverlayStyle: - MediaQuery.of(context).platformBrightness == Brightness.light - ? SystemUiOverlayStyle.dark - : SystemUiOverlayStyle.light, + systemOverlayStyle: SystemUiOverlayStyle( + statusBarBrightness: MediaQuery.of(context).platformBrightness, + ), backgroundColor: Colors.transparent, elevation: 0.0, leading: UniformBackButton(), title: Text( 'Calendar', - textScaleFactor: 1.4, + textScaler: TextScaler.linear(1.4), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), diff --git a/lib/features/contact/presentation/pages/contact_page.dart b/lib/features/contact/presentation/pages/contact_page.dart index 02e9bbab..54c47528 100644 --- a/lib/features/contact/presentation/pages/contact_page.dart +++ b/lib/features/contact/presentation/pages/contact_page.dart @@ -30,16 +30,15 @@ class _ContactPageState extends State { length: 4, child: Scaffold( appBar: AppBar( - systemOverlayStyle: - MediaQuery.of(context).platformBrightness == Brightness.light - ? SystemUiOverlayStyle.dark - : SystemUiOverlayStyle.light, + systemOverlayStyle: SystemUiOverlayStyle( + statusBarBrightness: MediaQuery.of(context).platformBrightness, + ), backgroundColor: Colors.transparent, elevation: 0.0, centerTitle: false, title: Text( 'Contact List', - textScaleFactor: 1.7, + textScaler: TextScaler.linear(1.7), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), diff --git a/lib/features/emergency/presentation/pages/emergency_page.dart b/lib/features/emergency/presentation/pages/emergency_page.dart index 16597cae..7985f45d 100644 --- a/lib/features/emergency/presentation/pages/emergency_page.dart +++ b/lib/features/emergency/presentation/pages/emergency_page.dart @@ -17,16 +17,15 @@ class _EmergencyPageState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - systemOverlayStyle: - MediaQuery.of(context).platformBrightness == Brightness.light - ? SystemUiOverlayStyle.dark - : SystemUiOverlayStyle.light, + systemOverlayStyle: SystemUiOverlayStyle( + statusBarBrightness: MediaQuery.of(context).platformBrightness, + ), backgroundColor: Colors.transparent, elevation: 0.0, centerTitle: false, title: Text( 'Emergency', - textScaleFactor: 1.7, + textScaler: TextScaler.linear(1.7), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), diff --git a/lib/features/forRotaryClubs/presentation/pages/AlgemeneInformatie/algemeneInfo.dart b/lib/features/forRotaryClubs/presentation/pages/AlgemeneInformatie/algemeneInfo.dart index 5ceee413..5456b9f0 100644 --- a/lib/features/forRotaryClubs/presentation/pages/AlgemeneInformatie/algemeneInfo.dart +++ b/lib/features/forRotaryClubs/presentation/pages/AlgemeneInformatie/algemeneInfo.dart @@ -25,7 +25,7 @@ class _AlgemeneInfoPageState extends State { leading: UniformBackButton(), title: Text( 'Algemene Informatie', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/forRotaryClubs/presentation/pages/InfoCounselor/InfoCounselor.dart b/lib/features/forRotaryClubs/presentation/pages/InfoCounselor/InfoCounselor.dart index 481e9a09..65b6f4c9 100644 --- a/lib/features/forRotaryClubs/presentation/pages/InfoCounselor/InfoCounselor.dart +++ b/lib/features/forRotaryClubs/presentation/pages/InfoCounselor/InfoCounselor.dart @@ -7,7 +7,6 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart'; // 🌎 Project imports: import 'package:rotary_nl_rye/core/presentation/pages/pdf_viewer_share.dart'; -import 'package:rotary_nl_rye/core/presentation/widgets/show_alert_dialog.dart'; import 'package:rotary_nl_rye/core/prop.dart'; import 'package:rotary_nl_rye/features/uniform_widgets/back_button.dart'; @@ -17,146 +16,66 @@ class InfoCounselorPage extends StatefulWidget { } class _InfoCounselorPageState extends State { + final List> infoOptions = [ + { + 'title': 'Handboek Counselor', + 'icon': FontAwesomeIcons.handsHoldingChild, + 'page': PDFPageWithShare( + pdfUrl: + 'https://www.rotary.nl/yep/yep-app/tu4w6b3-6436ie5-63h0jf-9i639i4-t3mf67-uhdrs/rotary-club-info/2024/handboek-counselor-versie-2024-2025-def.pdf'), + }, + { + 'title': 'First Night Questions', + 'icon': FontAwesomeIcons.question, + 'page': PDFPageWithShare( + pdfUrl: + 'https://www.rotary.nl/yep/yep-app/tu4w6b3-6436ie5-63h0jf-9i639i4-t3mf67-uhdrs/rotary-club-info/questions-first-night-host-family.pdf'), + }, + { + 'title': 'Travel rules within and outside the Netherlands', + 'icon': FontAwesomeIcons.personWalkingLuggage, + 'page': PDFPageWithShare( + pdfUrl: + 'https://www.rotary.nl/yep/yep-app/tu4w6b3-6436ie5-63h0jf-9i639i4-t3mf67-uhdrs/rotary-club-info/2024/travel-rules-within-and-outside-the-netherlands-2024-2025.pdf'), + }, + // Add more options as needed + ]; + @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - systemOverlayStyle: - MediaQuery.of(context).platformBrightness == Brightness.light - ? SystemUiOverlayStyle.dark - : SystemUiOverlayStyle.light, + systemOverlayStyle: SystemUiOverlayStyle( + statusBarBrightness: MediaQuery.of(context).platformBrightness, + ), backgroundColor: Colors.transparent, elevation: 0.0, leading: UniformBackButton(), title: Text( 'Info Counselor', - textScaleFactor: 1.2, + textScaler: TextScaler.linear(1.2), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), - body: ListView( - shrinkWrap: true, - scrollDirection: Axis.vertical, - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Divider( - height: 15, - thickness: 2, - ), - buildInboundOptionRow( - context, - 'Draaiboek Counselor', - FontAwesomeIcons.handsHoldingChild, - PDFPageWithShare( - pdfUrl: - 'https://www.rotary.nl/yep/yep-app/tu4w6b3-6436ie5-63h0jf-9i639i4-t3mf67-uhdrs/rotary-club-info/2023/draaiboek-counselor-versie-2023.pdf', - ), - ), - Divider( - height: 15, - thickness: 2, - ), - - buildInboundOptionRow( - context, - 'First Night Questions', - FontAwesomeIcons.question, - PDFPageWithShare( - pdfUrl: - 'https://www.rotary.nl/yep/yep-app/tu4w6b3-6436ie5-63h0jf-9i639i4-t3mf67-uhdrs/rotary-club-info/questions-first-night-host-family.pdf', - ), - ), - Divider( - height: 15, - thickness: 2, - ), - - buildInboundOptionRow( - context, - 'Travel rules within and outside the Netherlands', - FontAwesomeIcons.personWalkingLuggage, - PDFPageWithShare( - pdfUrl: - 'https://www.rotary.nl/yep/yep-app/tu4w6b3-6436ie5-63h0jf-9i639i4-t3mf67-uhdrs/rotary-club-info/2023/travel-rules-within-and-outside-the-netherlands-2023-2024.pdf', - ), - ), - Divider( - height: 15, - thickness: 2, - ), - - // the end - SizedBox( - height: 20, + body: ListView.builder( + itemCount: infoOptions.length, + itemBuilder: (BuildContext context, int index) { + Map option = infoOptions[index]; + return Column( + children: [ + ListTile( + leading: FaIcon(option['icon'], color: Palette.lightIndigo), + title: Text(option['title'], + style: TextStyle(color: Palette.grey)), + onTap: () => Navigator.push(context, + MaterialPageRoute(builder: (context) => option['page'])), + trailing: Icon(Icons.arrow_forward_ios, color: Palette.grey), ), + Divider(height: 20, thickness: 2), ], - ) - ], - ), - ); - } - - GestureDetector buildInboundOptionRow( - BuildContext context, - String title, - IconData icon, - pushTo, - ) { - return GestureDetector( - child: Padding( - padding: EdgeInsets.only(top: 8.0, bottom: 8.0, left: 8.0), - child: ListTile( - leading: Padding( - padding: EdgeInsets.zero, - child: Container( - child: FaIcon( - icon, - color: Palette.lightIndigo, - size: 27, - ), - ), - ), - title: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - SizedBox( - width: Device.width - 130, - child: Text(title, - maxLines: 2, - overflow: TextOverflow.ellipsis, - softWrap: false, - style: TextStyle( - fontSize: 15, - color: Palette.grey, - fontWeight: FontWeight.w500, - )), - ), - Icon( - Icons.arrow_forward_ios, - color: Palette.grey, - ), - ], - ), - onTap: () { - if (pushTo != null) { - Navigator.push( - context, - MaterialPageRoute(builder: (context) => pushTo), - ); - } else { - String title = 'Comming soon'; - String message = 'This page is not yet ready'; - showMaterialDialog( - context, - title, - message, - null, - ); - } + ); }, ), - )); + ); } } diff --git a/lib/features/forRotaryClubs/presentation/pages/InfoGastgezin/InfoGastgezin.dart b/lib/features/forRotaryClubs/presentation/pages/InfoGastgezin/InfoGastgezin.dart index eac91cac..4061e386 100644 --- a/lib/features/forRotaryClubs/presentation/pages/InfoGastgezin/InfoGastgezin.dart +++ b/lib/features/forRotaryClubs/presentation/pages/InfoGastgezin/InfoGastgezin.dart @@ -7,7 +7,6 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart'; // 🌎 Project imports: import 'package:rotary_nl_rye/core/presentation/pages/pdf_viewer_share.dart'; -import 'package:rotary_nl_rye/core/presentation/widgets/show_alert_dialog.dart'; import 'package:rotary_nl_rye/core/prop.dart'; import 'package:rotary_nl_rye/features/uniform_widgets/back_button.dart'; @@ -17,146 +16,66 @@ class InfoGastgezinPage extends StatefulWidget { } class _InfoGastgezinPageState extends State { + final List> infoOptions = [ + { + 'title': 'Handboek Gastgezin', + 'icon': FontAwesomeIcons.peopleRoof, + 'page': PDFPageWithShare( + pdfUrl: + 'https://www.rotary.nl/yep/yep-app/tu4w6b3-6436ie5-63h0jf-9i639i4-t3mf67-uhdrs/rotary-club-info/2024/handboek-gastgezin-versie-2024-2025-def.pdf'), + }, + { + 'title': 'First Night Questions', + 'icon': FontAwesomeIcons.question, + 'page': PDFPageWithShare( + pdfUrl: + 'https://www.rotary.nl/yep/yep-app/tu4w6b3-6436ie5-63h0jf-9i639i4-t3mf67-uhdrs/rotary-club-info/questions-first-night-host-family.pdf'), + }, + { + 'title': 'Travel rules within and outside the Netherlands', + 'icon': FontAwesomeIcons.personWalkingLuggage, + 'page': PDFPageWithShare( + pdfUrl: + 'https://www.rotary.nl/yep/yep-app/tu4w6b3-6436ie5-63h0jf-9i639i4-t3mf67-uhdrs/rotary-club-info/2024/travel-rules-within-and-outside-the-netherlands-2024-2025.pdf'), + }, + // Add more options as needed + ]; + @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - systemOverlayStyle: - MediaQuery.of(context).platformBrightness == Brightness.light - ? SystemUiOverlayStyle.dark - : SystemUiOverlayStyle.light, + systemOverlayStyle: SystemUiOverlayStyle( + statusBarBrightness: MediaQuery.of(context).platformBrightness, + ), backgroundColor: Colors.transparent, elevation: 0.0, leading: UniformBackButton(), title: Text( 'Info Gastgezin', - textScaleFactor: 1.2, + textScaler: TextScaler.linear(1.2), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), - body: ListView( - shrinkWrap: true, - scrollDirection: Axis.vertical, - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Divider( - height: 15, - thickness: 2, - ), - buildInboundOptionRow( - context, - 'Draaiboek Gastgezin', - FontAwesomeIcons.peopleRoof, - PDFPageWithShare( - pdfUrl: - 'https://www.rotary.nl/yep/yep-app/tu4w6b3-6436ie5-63h0jf-9i639i4-t3mf67-uhdrs/rotary-club-info/2023/draaiboek-gastgezin-versie-2023.pdf', - ), - ), - Divider( - height: 15, - thickness: 2, - ), - - buildInboundOptionRow( - context, - 'First Night Questions', - FontAwesomeIcons.question, - PDFPageWithShare( - pdfUrl: - 'https://www.rotary.nl/yep/yep-app/tu4w6b3-6436ie5-63h0jf-9i639i4-t3mf67-uhdrs/rotary-club-info/questions-first-night-host-family.pdf', - ), - ), - Divider( - height: 15, - thickness: 2, - ), - - buildInboundOptionRow( - context, - 'Travel rules within and outside the Netherlands', - FontAwesomeIcons.personWalkingLuggage, - PDFPageWithShare( - pdfUrl: - 'https://www.rotary.nl/yep/yep-app/tu4w6b3-6436ie5-63h0jf-9i639i4-t3mf67-uhdrs/rotary-club-info/2023/travel-rules-within-and-outside-the-netherlands-2023-2024.pdf', - ), - ), - Divider( - height: 15, - thickness: 2, - ), - - // the end - SizedBox( - height: 20, + body: ListView.builder( + itemCount: infoOptions.length, + itemBuilder: (BuildContext context, int index) { + Map option = infoOptions[index]; + return Column( + children: [ + ListTile( + leading: FaIcon(option['icon'], color: Palette.lightIndigo), + title: Text(option['title'], + style: TextStyle(color: Palette.grey)), + onTap: () => Navigator.push(context, + MaterialPageRoute(builder: (context) => option['page'])), + trailing: Icon(Icons.arrow_forward_ios, color: Palette.grey), ), + Divider(height: 20, thickness: 2), ], - ) - ], - ), - ); - } - - GestureDetector buildInboundOptionRow( - BuildContext context, - String title, - IconData icon, - pushTo, - ) { - return GestureDetector( - child: Padding( - padding: EdgeInsets.only(top: 8.0, bottom: 8.0, left: 8.0), - child: ListTile( - leading: Padding( - padding: EdgeInsets.zero, - child: Container( - child: FaIcon( - icon, - color: Palette.lightIndigo, - size: 27, - ), - ), - ), - title: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - SizedBox( - width: Device.width - 130, - child: Text(title, - maxLines: 2, - overflow: TextOverflow.ellipsis, - softWrap: false, - style: TextStyle( - fontSize: 15, - color: Palette.grey, - fontWeight: FontWeight.w500, - )), - ), - Icon( - Icons.arrow_forward_ios, - color: Palette.grey, - ), - ], - ), - onTap: () { - if (pushTo != null) { - Navigator.push( - context, - MaterialPageRoute(builder: (context) => pushTo), - ); - } else { - String title = 'Comming soon'; - String message = 'This page is not yet ready'; - showMaterialDialog( - context, - title, - message, - null, - ); - } + ); }, ), - )); + ); } } diff --git a/lib/features/forRotaryClubs/presentation/pages/Jeugdcommissaris/jeugd_commissaris.dart b/lib/features/forRotaryClubs/presentation/pages/Jeugdcommissaris/jeugd_commissaris.dart index 95d16d3d..10e96559 100644 --- a/lib/features/forRotaryClubs/presentation/pages/Jeugdcommissaris/jeugd_commissaris.dart +++ b/lib/features/forRotaryClubs/presentation/pages/Jeugdcommissaris/jeugd_commissaris.dart @@ -7,7 +7,6 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart'; // 🌎 Project imports: import 'package:rotary_nl_rye/core/presentation/pages/pdf_viewer_share.dart'; -import 'package:rotary_nl_rye/core/presentation/widgets/show_alert_dialog.dart'; import 'package:rotary_nl_rye/core/prop.dart'; import 'package:rotary_nl_rye/features/uniform_widgets/back_button.dart'; @@ -19,223 +18,106 @@ class InfoForJeugdcommissarisPage extends StatefulWidget { class _InfoForJeugdcommissarisPageState extends State { + final List> infoOptions = [ + { + 'title': 'Handboek Jeugdcommissaris', + 'icon': FontAwesomeIcons.book, + 'page': PDFPageWithShare( + pdfUrl: + 'https://www.rotary.nl/yep/yep-app/tu4w6b3-6436ie5-63h0jf-9i639i4-t3mf67-uhdrs/rotary-club-info/2024/handboek-jeugdcommissaris-versie-2024-2025-def.pdf'), + }, + { + 'title': 'Document huisbezoek', + 'icon': FontAwesomeIcons.personWalkingLuggage, + 'page': PDFPageWithShare( + pdfUrl: + 'https://www.rotary.nl/yep/yep-app/tu4w6b3-6436ie5-63h0jf-9i639i4-t3mf67-uhdrs/rotary-club-info/2024/huisbezoek-gastgezinnen-24-25-def.pdf'), + }, + { + 'title': 'Verzamelformulier VOG gegevens', + 'icon': FontAwesomeIcons.passport, + 'page': PDFPageWithShare( + pdfUrl: + 'https://www.rotary.nl/yep/yep-app/tu4w6b3-6436ie5-63h0jf-9i639i4-t3mf67-uhdrs/rotary-club-info/formulier-aanlevering-vog-aanvragen-2022-2023.pdf'), + }, + { + 'title': 'Verklaring Jeugd Vrijwilliger (VJV)', + 'icon': FontAwesomeIcons.handsHoldingChild, + 'page': PDFPageWithShare( + pdfUrl: + 'https://www.rotary.nl/yep/yep-app/tu4w6b3-6436ie5-63h0jf-9i639i4-t3mf67-uhdrs/rotary-club-info/verklaring-jeugd-vrijwilliger-met-addendum-okt22-def.pdf'), + }, + { + 'title': 'Presentielijst DJC training', + 'icon': FontAwesomeIcons.euroSign, + 'page': PDFPageWithShare( + pdfUrl: + 'https://www.rotary.nl/yep/yep-app/tu4w6b3-6436ie5-63h0jf-9i639i4-t3mf67-uhdrs/rotary-club-info/2024/presentielijst-training-clubs-gastouders-24-25.pdf'), + }, + { + 'title': 'Schooldocument', + 'icon': FontAwesomeIcons.school, + 'page': PDFPageWithShare( + pdfUrl: + 'https://www.rotary.nl/yep/yep-app/tu4w6b3-6436ie5-63h0jf-9i639i4-t3mf67-uhdrs/rotary-club-info/rotary-exchange-voor-middelbare-scholen-2022-2023.pdf'), + }, + { + 'title': 'Actielijst voorbereiding komst Jaarkind', + 'icon': FontAwesomeIcons.clipboardList, + 'page': PDFPageWithShare( + pdfUrl: + 'https://www.rotary.nl/yep/yep-app/tu4w6b3-6436ie5-63h0jf-9i639i4-t3mf67-uhdrs/rotary-club-info/2023/actielijst-rotary-clubs-2023-2024-voorbereiding-ontvangst-inbound-student-def-1.pdf'), + }, + { + 'title': 'Rules and Information Inbounds', + 'icon': FontAwesomeIcons.scaleUnbalanced, + 'page': PDFPageWithShare( + pdfUrl: + 'https://www.rotary.nl/yep/yep-app/tu4w6b3-6436ie5-63h0jf-9i639i4-t3mf67-uhdrs/rotary-club-info/2024/24-25rules-and-information-for-inbound-exchange-students-to-the-netherlands.pdf'), + }, + { + 'title': 'Reis Regels', + 'icon': FontAwesomeIcons.personWalkingLuggage, + 'page': PDFPageWithShare( + pdfUrl: + 'https://www.rotary.nl/yep/yep-app/tu4w6b3-6436ie5-63h0jf-9i639i4-t3mf67-uhdrs/rotary-club-info/2024/travel-rules-within-and-outside-the-netherlands-2024-2025.pdf'), + }, + ]; + @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - systemOverlayStyle: - MediaQuery.of(context).platformBrightness == Brightness.light - ? SystemUiOverlayStyle.dark - : SystemUiOverlayStyle.light, + systemOverlayStyle: SystemUiOverlayStyle( + statusBarBrightness: MediaQuery.of(context).platformBrightness, + ), backgroundColor: Colors.transparent, - elevation: 0.0, + elevation: 0, leading: UniformBackButton(), - title: Text( - 'Info Jeugdcommissaris', - textScaleFactor: 1.0, - style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), - ), + title: Text('Info Jeugdcommissaris', + textScaler: TextScaler.linear(1), + style: + TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold)), ), - body: ListView( - shrinkWrap: true, - scrollDirection: Axis.vertical, - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Divider( - height: 15, - thickness: 2, - ), - buildInboundOptionRow( - context, - 'Draaiboek Jeugdcommissaris', - FontAwesomeIcons.book, - PDFPageWithShare( - pdfUrl: - 'https://www.rotary.nl/yep/yep-app/tu4w6b3-6436ie5-63h0jf-9i639i4-t3mf67-uhdrs/rotary-club-info/2023/draaiboek-jeugdcommissaris-versie-2023.pdf', - ), - ), - Divider( - height: 15, - thickness: 2, - ), - buildInboundOptionRow( - context, - 'Document huisbezoek', - FontAwesomeIcons.personWalkingLuggage, - PDFPageWithShare( - pdfUrl: - 'https://www.rotary.nl/yep/yep-app/tu4w6b3-6436ie5-63h0jf-9i639i4-t3mf67-uhdrs/rotary-club-info/2023/huisbezoek-gastgezinnen-23-24-def.pdf', - ), - ), - Divider( - height: 15, - thickness: 2, - ), - buildInboundOptionRow( - context, - 'Verzamelformulier VOG gegevens', - FontAwesomeIcons.passport, - PDFPageWithShare( - pdfUrl: - 'https://www.rotary.nl/yep/yep-app/tu4w6b3-6436ie5-63h0jf-9i639i4-t3mf67-uhdrs/rotary-club-info/formulier-aanlevering-vog-aanvragen-2022-2023.pdf', - ), - ), - Divider( - height: 15, - thickness: 2, - ), - buildInboundOptionRow( - context, - 'Verklaring Jeugd Vrijwilliger (VJV)', - FontAwesomeIcons.handsHoldingChild, - PDFPageWithShare( - pdfUrl: - 'https://www.rotary.nl/yep/yep-app/tu4w6b3-6436ie5-63h0jf-9i639i4-t3mf67-uhdrs/rotary-club-info/verklaring-jeugd-vrijwilliger-met-addendum-okt22-def.pdf', - ), - ), - Divider( - height: 15, - thickness: 2, - ), - buildInboundOptionRow( - context, - 'Presentielijst DJC training', - FontAwesomeIcons.euroSign, - PDFPageWithShare( - pdfUrl: - 'https://www.rotary.nl/yep/yep-app/tu4w6b3-6436ie5-63h0jf-9i639i4-t3mf67-uhdrs/rotary-club-info/2023/presentielijst-training-clubs-gastouders-2023-2024.pdf', - ), - ), - Divider( - height: 15, - thickness: 2, - ), - buildInboundOptionRow( - context, - 'Schooldocument', - FontAwesomeIcons.school, - PDFPageWithShare( - pdfUrl: - 'https://www.rotary.nl/yep/yep-app/tu4w6b3-6436ie5-63h0jf-9i639i4-t3mf67-uhdrs/rotary-club-info/rotary-exchange-voor-middelbare-scholen-2022-2023.pdf', - ), - ), - Divider( - height: 15, - thickness: 2, - ), - buildInboundOptionRow( - context, - 'Actielijst voorbereiding komst Jaarkind', - FontAwesomeIcons.clipboardList, - PDFPageWithShare( - pdfUrl: - 'https://www.rotary.nl/yep/yep-app/tu4w6b3-6436ie5-63h0jf-9i639i4-t3mf67-uhdrs/rotary-club-info/2023/actielijst-rotary-clubs-2023-2024-voorbereiding-ontvangst-inbound-student-def-1.pdf', - ), - ), - Divider( - height: 15, - thickness: 2, - ), - buildInboundOptionRow( - context, - 'Rules and Information Inbounds', - FontAwesomeIcons.scaleUnbalanced, - PDFPageWithShare( - pdfUrl: - 'https://www.rotary.nl/yep/yep-app/tu4w6b3-6436ie5-63h0jf-9i639i4-t3mf67-uhdrs/rotary-club-info/2023/rules-and-information-for-inbound-exchange-students-to-the-netherlands-2022-2023-def-2.pdf', - ), - ), - Divider( - height: 15, - thickness: 2, - ), - - buildInboundOptionRow( - context, - 'Reis Regels', - FontAwesomeIcons.personWalkingLuggage, - PDFPageWithShare( - pdfUrl: - 'https://www.rotary.nl/yep/yep-app/tu4w6b3-6436ie5-63h0jf-9i639i4-t3mf67-uhdrs/rotary-club-info/2023/travel-rules-within-and-outside-the-netherlands-2023-2024.pdf', - ), - ), - Divider( - height: 15, - thickness: 2, - ), - - // the end - SizedBox( - height: 20, - ), + body: ListView.builder( + itemCount: infoOptions.length, + itemBuilder: (context, index) { + final option = infoOptions[index]; + return Column( + children: [ + ListTile( + leading: FaIcon(option['icon'], color: Palette.lightIndigo), + title: Text(option['title'], + style: TextStyle(color: Palette.grey)), + onTap: () => Navigator.push(context, + MaterialPageRoute(builder: (context) => option['page'])), + trailing: Icon(Icons.arrow_forward_ios, color: Palette.grey), + ), + Divider(height: 20, thickness: 2), ], - ) - ], - ), - ); - } - - GestureDetector buildInboundOptionRow( - BuildContext context, - String title, - IconData icon, - pushTo, - ) { - return GestureDetector( - child: Padding( - padding: EdgeInsets.only(top: 8.0, bottom: 8.0, left: 8.0), - child: ListTile( - leading: Padding( - padding: EdgeInsets.zero, - child: Container( - child: FaIcon( - icon, - color: Palette.lightIndigo, - size: 27, - ), - ), - ), - title: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - SizedBox( - width: Device.width - 130, - child: Text(title, - maxLines: 2, - overflow: TextOverflow.ellipsis, - softWrap: false, - style: TextStyle( - fontSize: 15, - color: Palette.grey, - fontWeight: FontWeight.w500, - )), - ), - Icon( - Icons.arrow_forward_ios, - color: Palette.grey, - ), - ], - ), - onTap: () { - if (pushTo != null) { - Navigator.push( - context, - MaterialPageRoute(builder: (context) => pushTo), - ); - } else { - String title = 'Comming soon'; - String message = 'This page is not yet ready'; - showMaterialDialog( - context, - title, - message, - null, - ); - } + ); }, ), - )); + ); } } diff --git a/lib/features/forRotaryClubs/presentation/pages/belangrijkeDocumenten/important_documents.dart b/lib/features/forRotaryClubs/presentation/pages/belangrijkeDocumenten/important_documents.dart index 9d03a351..34181539 100644 --- a/lib/features/forRotaryClubs/presentation/pages/belangrijkeDocumenten/important_documents.dart +++ b/lib/features/forRotaryClubs/presentation/pages/belangrijkeDocumenten/important_documents.dart @@ -30,7 +30,7 @@ class _ImportantDocumentsPageState extends State { leading: UniformBackButton(), title: Text( 'voor Rotary Clubs', - textScaleFactor: 1.2, + textScaler: TextScaler.linear(1.2), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), @@ -45,16 +45,16 @@ class _ImportantDocumentsPageState extends State { height: 15, thickness: 2, ), - buildInboundOptionRow( - context, - 'MDJC noodprocedure', - FontAwesomeIcons.kitMedical, - null, - ), - Divider( - height: 15, - thickness: 2, - ), + // buildInboundOptionRow( + // context, + // 'MDJC noodprocedure', + // FontAwesomeIcons.kitMedical, + // null, + // ), + // Divider( + // height: 15, + // thickness: 2, + // ), buildInboundOptionRow( context, 'Code of Policies \'Regels en Interventies\'', diff --git a/lib/features/forRotaryClubs/presentation/pages/rotary_club_info_page.dart b/lib/features/forRotaryClubs/presentation/pages/rotary_club_info_page.dart index a6f78238..6842c9cb 100644 --- a/lib/features/forRotaryClubs/presentation/pages/rotary_club_info_page.dart +++ b/lib/features/forRotaryClubs/presentation/pages/rotary_club_info_page.dart @@ -7,7 +7,6 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart'; // 🌎 Project imports: // import 'package:rotary_nl_rye/core/presentation/pages/pdf_viewer_share.dart'; -import 'package:rotary_nl_rye/core/presentation/widgets/show_alert_dialog.dart'; import 'package:rotary_nl_rye/core/prop.dart'; import 'package:rotary_nl_rye/features/forRotaryClubs/presentation/pages/InfoCounselor/InfoCounselor.dart'; import 'package:rotary_nl_rye/features/forRotaryClubs/presentation/pages/InfoGastgezin/InfoGastgezin.dart'; @@ -31,157 +30,71 @@ class _ForRotaryClubsPageState extends State { ? SystemUiOverlayStyle.dark : SystemUiOverlayStyle.light, backgroundColor: Colors.transparent, - elevation: 0.0, + elevation: 0, leading: UniformBackButton(), - title: Text( - 'voor Rotary Clubs', - textScaleFactor: 1.2, - style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), - ), + title: Text('voor Rotary Clubs', + textScaler: TextScaler.linear(1.2), + style: + TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold)), ), - body: ListView( - shrinkWrap: true, - scrollDirection: Axis.vertical, - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: - const EdgeInsets.only(left: 20.0, right: 20.0, top: 20.0), - child: Text( - 'Wat leuk dat jullie als Rotary club van plan zijn om een jaarstudent te sponsoren en daarmee dus ook een jaar lang een kind binnen jullie club te ontvangen en te begeleiden. Misschien zijn jullie benaderd door een scholier van buiten jullie of mogelijk vanuit de wens van één van jullie clubleden.', - style: TextStyle(fontSize: 16.0), - ), - ), - SizedBox( - height: 20, - ), - Divider( - height: 15, - thickness: 2, - ), - buildInboundOptionRow( - context, - 'Algemene Informatie', - FontAwesomeIcons.info, - AlgemeneInfoPage(), - ), - Divider( - height: 15, - thickness: 2, - ), - buildInboundOptionRow( - context, - 'Info voor de Jeugdcommissaris', - FontAwesomeIcons.solidUser, - InfoForJeugdcommissarisPage(), - ), - Divider( - height: 15, - thickness: 2, - ), - buildInboundOptionRow( - context, - 'Info Gastgezin', - FontAwesomeIcons.peopleRoof, - InfoGastgezinPage(), - ), + body: ListView.builder( + itemCount: 5, + itemBuilder: (context, index) { + final List options = [ + OptionRowData('Algemene Informatie', FontAwesomeIcons.info, + AlgemeneInfoPage()), + OptionRowData('Info voor de Jeugdcommissaris', + FontAwesomeIcons.solidUser, InfoForJeugdcommissarisPage()), + OptionRowData('Info Gastgezin', FontAwesomeIcons.peopleRoof, + InfoGastgezinPage()), + OptionRowData('Info Counselor', FontAwesomeIcons.handsHoldingChild, + InfoCounselorPage()), + OptionRowData('Belangrijke Documenten', + FontAwesomeIcons.triangleExclamation, ImportantDocumentsPage()), + ]; - Divider( - height: 15, - thickness: 2, - ), - buildInboundOptionRow( - context, - 'Info Counselor', - FontAwesomeIcons.handsHoldingChild, - InfoCounselorPage(), - ), - Divider( - height: 15, - thickness: 2, - ), - buildInboundOptionRow( - context, - 'Belangrijke Documenten', - FontAwesomeIcons.triangleExclamation, - ImportantDocumentsPage(), - ), - Divider( - height: 15, - thickness: 2, - ), - // the end - SizedBox( - height: 20, - ), + return Column( + children: [ + if (index == 0) + Padding( + padding: + const EdgeInsets.only(left: 20.0, right: 20.0, top: 20.0), + child: Text( + 'Wat leuk dat jullie als Rotary club van plan zijn om een jaarstudent te sponsoren en daarmee dus ook een jaar lang een kind binnen jullie club te ontvangen en te begeleiden. Misschien zijn jullie benaderd door een scholier van buiten jullie of mogelijk vanuit de wens van één van jullie clubleden.', + style: TextStyle(fontSize: 16.0), + ), + ), + Divider(height: 20, thickness: 2), + buildInboundOptionRow(context, options[index]), ], - ) - ], + ); + }, ), ); } GestureDetector buildInboundOptionRow( - BuildContext context, - String title, - IconData icon, - pushTo, - ) { + BuildContext context, OptionRowData data) { return GestureDetector( - child: Padding( - padding: EdgeInsets.only(top: 8.0, bottom: 8.0, left: 8.0), + onTap: () => Navigator.push( + context, MaterialPageRoute(builder: (context) => data.pushTo)), child: ListTile( - leading: Padding( - padding: EdgeInsets.zero, - child: Container( - child: FaIcon( - icon, - color: Palette.lightIndigo, - size: 27, - ), - ), - ), - title: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - SizedBox( - width: Device.width - 130, - child: Text(title, - maxLines: 2, - overflow: TextOverflow.ellipsis, - softWrap: false, - style: TextStyle( - fontSize: 15, - color: Palette.grey, - fontWeight: FontWeight.w500, - )), - ), - Icon( - Icons.arrow_forward_ios, - color: Palette.grey, - ), - ], - ), - onTap: () { - if (pushTo != null) { - Navigator.push( - context, - MaterialPageRoute(builder: (context) => pushTo), - ); - } else { - String title = 'Comming soon'; - String message = 'This page is not yet ready'; - showMaterialDialog( - context, - title, - message, - null, - ); - } - }, + leading: FaIcon(data.icon, color: Palette.lightIndigo, size: 27), + title: Text(data.title, + style: TextStyle( + fontSize: 15, + color: Palette.grey, + fontWeight: FontWeight.w500)), + trailing: Icon(Icons.arrow_forward_ios, color: Palette.grey), ), - )); + ); } } + +class OptionRowData { + final String title; + final IconData icon; + final Widget pushTo; + + OptionRowData(this.title, this.icon, this.pushTo); +} diff --git a/lib/features/home/presentation/widgets/carousel_display.dart b/lib/features/home/presentation/widgets/carousel_display.dart index 44de4039..48d0555c 100644 --- a/lib/features/home/presentation/widgets/carousel_display.dart +++ b/lib/features/home/presentation/widgets/carousel_display.dart @@ -20,23 +20,17 @@ class _CarouselState extends State { List carousels = [ CarouselModel( - image: 'assets/image/homepage/digitale_informatie_ochtend_2024.jpg', - text: 'Digitale informatie ochtend'), + image: 'assets/image/homepage/Digitale_infomarkt_25_mei_2024.jpg', + text: null), CarouselModel( - image: 'assets/image/homepage/PHOTO-2023-11-16-20-04-48.jpg', - text: 'Class of 2024'), + image: 'assets/image/homepage/class_2024.jpg', text: 'Class of 2024'), CarouselModel( - image: 'assets/image/homepage/shelterbox.jpg', - text: 'Social actief zijn'), + image: 'assets/image/homepage/afscheid_bestuur_rotex.jpg', + text: 'Afscheid Rotex Bestuur'), + CarouselModel(image: 'assets/image/homepage/Cream_Black.jpg', text: null), CarouselModel( - image: 'assets/image/b70db74b-aebe-470d-8c47-306640be9a00.jpg', - text: 'Vergroten van je Horizon'), - CarouselModel( - image: 'assets/image/homepage/barbara_with_students.jpg', - text: 'Nieuwe vrienden maken'), - CarouselModel( - image: 'assets/image/homepage/saying_goodby_2.jpeg', - text: 'Jezelf nog beter leren kennen') + image: 'assets/image/homepage/prebounds_in_action.jpg', text: null), + CarouselModel(image: 'assets/image/homepage/Cream_Black.jpg', text: null) ]; List map(List list, Function handler) { @@ -69,45 +63,47 @@ class _CarouselState extends State { layout: SwiperLayout.DEFAULT, scale: 1, itemCount: carousels.length, - itemBuilder: (BuildContext context, index) { + itemBuilder: (BuildContext context, int index) { return Stack( alignment: Alignment.bottomLeft, - children: [ + children: [ Container( margin: EdgeInsets.symmetric(horizontal: 16), decoration: BoxDecoration( borderRadius: BorderRadius.circular(kBorderRadius), image: DecorationImage( - image: AssetImage( - carousels[index].image, - ), - fit: BoxFit.cover), + image: AssetImage(carousels[index].image), + fit: BoxFit.cover, + ), ), ), - Padding( - padding: - EdgeInsets.symmetric(horizontal: 28, vertical: 12), - child: ClipRRect( - borderRadius: BorderRadius.circular(kBorderRadius), - child: BackdropFilter( - filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10), - child: Container( - decoration: BoxDecoration( + if (carousels[index].text != null && + carousels[index].text!.isNotEmpty) + Padding( + padding: + EdgeInsets.symmetric(horizontal: 28, vertical: 12), + child: ClipRRect( + borderRadius: BorderRadius.circular(kBorderRadius), + child: BackdropFilter( + filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10), + child: Container( + decoration: BoxDecoration( borderRadius: BorderRadius.circular(kBorderRadius), - color: Colors.black38), - child: Padding( - padding: const EdgeInsets.symmetric( - horizontal: 20, vertical: 10), - child: Text( - carousels[index].text, - style: TextStyle(color: Colors.white), + color: Colors.black38, + ), + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 20, vertical: 10), + child: Text( + carousels[index].text!, + style: TextStyle(color: Colors.white), + ), ), ), ), ), ), - ), ], ); }, @@ -146,7 +142,8 @@ class _CarouselState extends State { } class CarouselModel { - final String image, text; + final String image; + final String? text; - CarouselModel({required this.image, required this.text}); + CarouselModel({required this.image, this.text}); } diff --git a/lib/features/inbound/presentation/pages/inbound_page.dart b/lib/features/inbound/presentation/pages/inbound_page.dart index 95493dae..89ed96f2 100644 --- a/lib/features/inbound/presentation/pages/inbound_page.dart +++ b/lib/features/inbound/presentation/pages/inbound_page.dart @@ -33,7 +33,7 @@ class _InboundPageState extends State { leading: UniformBackButton(), title: Text( 'Inbound', - textScaleFactor: 1.4, + textScaler: TextScaler.linear(1.4), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/inbound/presentation/pages/information/flight_and_arrival.dart b/lib/features/inbound/presentation/pages/information/flight_and_arrival.dart index 4b732162..8cc20d05 100644 --- a/lib/features/inbound/presentation/pages/information/flight_and_arrival.dart +++ b/lib/features/inbound/presentation/pages/information/flight_and_arrival.dart @@ -30,7 +30,7 @@ class _FlightAndArrivalPageState extends State { leading: UniformBackButton(), title: Text( 'Flight and Arrival', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/inbound/presentation/pages/information/insurance.dart b/lib/features/inbound/presentation/pages/information/insurance.dart index 83ec8d6e..60cba191 100644 --- a/lib/features/inbound/presentation/pages/information/insurance.dart +++ b/lib/features/inbound/presentation/pages/information/insurance.dart @@ -30,7 +30,7 @@ class _InsurancePageState extends State { leading: UniformBackButton(), title: Text( 'Travel', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/inbound/presentation/pages/information/language.dart b/lib/features/inbound/presentation/pages/information/language.dart index 4bbb0311..8b0e006f 100644 --- a/lib/features/inbound/presentation/pages/information/language.dart +++ b/lib/features/inbound/presentation/pages/information/language.dart @@ -30,7 +30,7 @@ class _LanguagePageState extends State { leading: UniformBackButton(), title: Text( 'Travel', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/inbound/presentation/pages/information/travel.dart b/lib/features/inbound/presentation/pages/information/travel.dart index 1acc66f9..c5e03b99 100644 --- a/lib/features/inbound/presentation/pages/information/travel.dart +++ b/lib/features/inbound/presentation/pages/information/travel.dart @@ -34,7 +34,7 @@ class _TravelPageState extends State { leading: UniformBackButton(), title: Text( 'Travel', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/inbound/presentation/pages/information/welcome_in_the_netherlands.dart b/lib/features/inbound/presentation/pages/information/welcome_in_the_netherlands.dart index a4c6d03b..82c5aaae 100644 --- a/lib/features/inbound/presentation/pages/information/welcome_in_the_netherlands.dart +++ b/lib/features/inbound/presentation/pages/information/welcome_in_the_netherlands.dart @@ -32,7 +32,7 @@ class _WelcomeInTheNetherlandsPageState leading: UniformBackButton(), title: Text( 'Welcome to the Netherlands!', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/inbound/presentation/pages/long_term/class_of/class_of.dart b/lib/features/inbound/presentation/pages/long_term/class_of/class_of.dart index c55f9fd9..d8f98e86 100644 --- a/lib/features/inbound/presentation/pages/long_term/class_of/class_of.dart +++ b/lib/features/inbound/presentation/pages/long_term/class_of/class_of.dart @@ -28,17 +28,16 @@ class _ClassOfPageInboundsState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - systemOverlayStyle: - MediaQuery.of(context).platformBrightness == Brightness.light - ? SystemUiOverlayStyle.dark - : SystemUiOverlayStyle.light, + systemOverlayStyle: SystemUiOverlayStyle( + statusBarBrightness: MediaQuery.of(context).platformBrightness, + ), backgroundColor: Colors.transparent, elevation: 0.0, // centerTitle: false, leading: UniformBackButton(), title: Text( 'Class Of 2023-24', - textScaleFactor: 1.2, + textScaler: TextScaler.linear(1.2), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), )), diff --git a/lib/features/inbound/presentation/pages/long_term/class_of/class_of_details_page.dart b/lib/features/inbound/presentation/pages/long_term/class_of/class_of_details_page.dart index 17cc970d..cbcda811 100644 --- a/lib/features/inbound/presentation/pages/long_term/class_of/class_of_details_page.dart +++ b/lib/features/inbound/presentation/pages/long_term/class_of/class_of_details_page.dart @@ -32,7 +32,7 @@ class ClassOfDetailsInbounds extends StatelessWidget { leading: UniformBackButton(), title: Text( 'Inbounds', - textScaleFactor: 1.4, + textScaler: TextScaler.linear(1.4), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/inbound/presentation/pages/long_term/information/flight_and_arrival.dart b/lib/features/inbound/presentation/pages/long_term/information/flight_and_arrival.dart index 4b732162..8cc20d05 100644 --- a/lib/features/inbound/presentation/pages/long_term/information/flight_and_arrival.dart +++ b/lib/features/inbound/presentation/pages/long_term/information/flight_and_arrival.dart @@ -30,7 +30,7 @@ class _FlightAndArrivalPageState extends State { leading: UniformBackButton(), title: Text( 'Flight and Arrival', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/inbound/presentation/pages/long_term/information/insurance.dart b/lib/features/inbound/presentation/pages/long_term/information/insurance.dart index 83ec8d6e..60cba191 100644 --- a/lib/features/inbound/presentation/pages/long_term/information/insurance.dart +++ b/lib/features/inbound/presentation/pages/long_term/information/insurance.dart @@ -30,7 +30,7 @@ class _InsurancePageState extends State { leading: UniformBackButton(), title: Text( 'Travel', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/inbound/presentation/pages/long_term/information/language.dart b/lib/features/inbound/presentation/pages/long_term/information/language.dart index 4bbb0311..8b0e006f 100644 --- a/lib/features/inbound/presentation/pages/long_term/information/language.dart +++ b/lib/features/inbound/presentation/pages/long_term/information/language.dart @@ -30,7 +30,7 @@ class _LanguagePageState extends State { leading: UniformBackButton(), title: Text( 'Travel', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/inbound/presentation/pages/long_term/information/travel.dart b/lib/features/inbound/presentation/pages/long_term/information/travel.dart index aa651db6..07e29889 100644 --- a/lib/features/inbound/presentation/pages/long_term/information/travel.dart +++ b/lib/features/inbound/presentation/pages/long_term/information/travel.dart @@ -30,7 +30,7 @@ class _TravelPageState extends State { leading: UniformBackButton(), title: Text( 'Travel', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/inbound/presentation/pages/long_term/information/welcome_in_the_netherlands.dart b/lib/features/inbound/presentation/pages/long_term/information/welcome_in_the_netherlands.dart index 3ca77095..df2f275d 100644 --- a/lib/features/inbound/presentation/pages/long_term/information/welcome_in_the_netherlands.dart +++ b/lib/features/inbound/presentation/pages/long_term/information/welcome_in_the_netherlands.dart @@ -32,7 +32,7 @@ class _WelcomeInTheNetherlandsPageState leading: UniformBackButton(), title: Text( 'Welcome to the Netherlands!', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/inbound/presentation/pages/long_term/long_term_inbound_page.dart b/lib/features/inbound/presentation/pages/long_term/long_term_inbound_page.dart index bd6560a7..e34ade54 100644 --- a/lib/features/inbound/presentation/pages/long_term/long_term_inbound_page.dart +++ b/lib/features/inbound/presentation/pages/long_term/long_term_inbound_page.dart @@ -37,7 +37,7 @@ class _LongTermExchangeInboundPageState leading: UniformBackButton(), title: Text( 'Long Term Inbound', - textScaleFactor: 1.2, + textScaler: TextScaler.linear(1.2), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/inbound/presentation/pages/short_term/camps_and_tours/camps_and_tours_inbound_page.dart b/lib/features/inbound/presentation/pages/short_term/camps_and_tours/camps_and_tours_inbound_page.dart index b5fd6fe5..70fe2163 100644 --- a/lib/features/inbound/presentation/pages/short_term/camps_and_tours/camps_and_tours_inbound_page.dart +++ b/lib/features/inbound/presentation/pages/short_term/camps_and_tours/camps_and_tours_inbound_page.dart @@ -29,7 +29,7 @@ class _CampsAndToursInboundPageState extends State { leading: UniformBackButton(), title: Text( 'Camps & Tours Inbound', - textScaleFactor: 1.2, + textScaler: TextScaler.linear(1.2), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/inbound/presentation/pages/short_term/camps_and_tours/information/flight_and_arrival.dart b/lib/features/inbound/presentation/pages/short_term/camps_and_tours/information/flight_and_arrival.dart index 4b732162..8cc20d05 100644 --- a/lib/features/inbound/presentation/pages/short_term/camps_and_tours/information/flight_and_arrival.dart +++ b/lib/features/inbound/presentation/pages/short_term/camps_and_tours/information/flight_and_arrival.dart @@ -30,7 +30,7 @@ class _FlightAndArrivalPageState extends State { leading: UniformBackButton(), title: Text( 'Flight and Arrival', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/inbound/presentation/pages/short_term/camps_and_tours/information/insurance.dart b/lib/features/inbound/presentation/pages/short_term/camps_and_tours/information/insurance.dart index 83ec8d6e..60cba191 100644 --- a/lib/features/inbound/presentation/pages/short_term/camps_and_tours/information/insurance.dart +++ b/lib/features/inbound/presentation/pages/short_term/camps_and_tours/information/insurance.dart @@ -30,7 +30,7 @@ class _InsurancePageState extends State { leading: UniformBackButton(), title: Text( 'Travel', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/inbound/presentation/pages/short_term/camps_and_tours/information/language.dart b/lib/features/inbound/presentation/pages/short_term/camps_and_tours/information/language.dart index 4bbb0311..8b0e006f 100644 --- a/lib/features/inbound/presentation/pages/short_term/camps_and_tours/information/language.dart +++ b/lib/features/inbound/presentation/pages/short_term/camps_and_tours/information/language.dart @@ -30,7 +30,7 @@ class _LanguagePageState extends State { leading: UniformBackButton(), title: Text( 'Travel', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/inbound/presentation/pages/short_term/camps_and_tours/information/travel.dart b/lib/features/inbound/presentation/pages/short_term/camps_and_tours/information/travel.dart index aa651db6..07e29889 100644 --- a/lib/features/inbound/presentation/pages/short_term/camps_and_tours/information/travel.dart +++ b/lib/features/inbound/presentation/pages/short_term/camps_and_tours/information/travel.dart @@ -30,7 +30,7 @@ class _TravelPageState extends State { leading: UniformBackButton(), title: Text( 'Travel', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/inbound/presentation/pages/short_term/camps_and_tours/information/welcome_in_the_netherlands.dart b/lib/features/inbound/presentation/pages/short_term/camps_and_tours/information/welcome_in_the_netherlands.dart index 3ca77095..df2f275d 100644 --- a/lib/features/inbound/presentation/pages/short_term/camps_and_tours/information/welcome_in_the_netherlands.dart +++ b/lib/features/inbound/presentation/pages/short_term/camps_and_tours/information/welcome_in_the_netherlands.dart @@ -32,7 +32,7 @@ class _WelcomeInTheNetherlandsPageState leading: UniformBackButton(), title: Text( 'Welcome to the Netherlands!', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/inbound/presentation/pages/short_term/family_to_family/family_to_family_inbound_page.dart b/lib/features/inbound/presentation/pages/short_term/family_to_family/family_to_family_inbound_page.dart index a43d2c88..0b458093 100644 --- a/lib/features/inbound/presentation/pages/short_term/family_to_family/family_to_family_inbound_page.dart +++ b/lib/features/inbound/presentation/pages/short_term/family_to_family/family_to_family_inbound_page.dart @@ -29,7 +29,7 @@ class _FamilyToFamilyInboundPageState extends State { leading: UniformBackButton(), title: Text( 'Family to Family Inbound', - textScaleFactor: 1.2, + textScaler: TextScaler.linear(1.2), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/inbound/presentation/pages/short_term/family_to_family/information/flight_and_arrival.dart b/lib/features/inbound/presentation/pages/short_term/family_to_family/information/flight_and_arrival.dart index 4b732162..8cc20d05 100644 --- a/lib/features/inbound/presentation/pages/short_term/family_to_family/information/flight_and_arrival.dart +++ b/lib/features/inbound/presentation/pages/short_term/family_to_family/information/flight_and_arrival.dart @@ -30,7 +30,7 @@ class _FlightAndArrivalPageState extends State { leading: UniformBackButton(), title: Text( 'Flight and Arrival', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/inbound/presentation/pages/short_term/family_to_family/information/insurance.dart b/lib/features/inbound/presentation/pages/short_term/family_to_family/information/insurance.dart index 83ec8d6e..60cba191 100644 --- a/lib/features/inbound/presentation/pages/short_term/family_to_family/information/insurance.dart +++ b/lib/features/inbound/presentation/pages/short_term/family_to_family/information/insurance.dart @@ -30,7 +30,7 @@ class _InsurancePageState extends State { leading: UniformBackButton(), title: Text( 'Travel', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/inbound/presentation/pages/short_term/family_to_family/information/language.dart b/lib/features/inbound/presentation/pages/short_term/family_to_family/information/language.dart index 4bbb0311..8b0e006f 100644 --- a/lib/features/inbound/presentation/pages/short_term/family_to_family/information/language.dart +++ b/lib/features/inbound/presentation/pages/short_term/family_to_family/information/language.dart @@ -30,7 +30,7 @@ class _LanguagePageState extends State { leading: UniformBackButton(), title: Text( 'Travel', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/inbound/presentation/pages/short_term/family_to_family/information/travel.dart b/lib/features/inbound/presentation/pages/short_term/family_to_family/information/travel.dart index aa651db6..07e29889 100644 --- a/lib/features/inbound/presentation/pages/short_term/family_to_family/information/travel.dart +++ b/lib/features/inbound/presentation/pages/short_term/family_to_family/information/travel.dart @@ -30,7 +30,7 @@ class _TravelPageState extends State { leading: UniformBackButton(), title: Text( 'Travel', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/inbound/presentation/pages/short_term/family_to_family/information/welcome_in_the_netherlands.dart b/lib/features/inbound/presentation/pages/short_term/family_to_family/information/welcome_in_the_netherlands.dart index 3ca77095..df2f275d 100644 --- a/lib/features/inbound/presentation/pages/short_term/family_to_family/information/welcome_in_the_netherlands.dart +++ b/lib/features/inbound/presentation/pages/short_term/family_to_family/information/welcome_in_the_netherlands.dart @@ -32,7 +32,7 @@ class _WelcomeInTheNetherlandsPageState leading: UniformBackButton(), title: Text( 'Welcome to the Netherlands!', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/inbound/presentation/pages/short_term/ngse/information/flight_and_arrival.dart b/lib/features/inbound/presentation/pages/short_term/ngse/information/flight_and_arrival.dart index 4b732162..8cc20d05 100644 --- a/lib/features/inbound/presentation/pages/short_term/ngse/information/flight_and_arrival.dart +++ b/lib/features/inbound/presentation/pages/short_term/ngse/information/flight_and_arrival.dart @@ -30,7 +30,7 @@ class _FlightAndArrivalPageState extends State { leading: UniformBackButton(), title: Text( 'Flight and Arrival', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/inbound/presentation/pages/short_term/ngse/information/insurance.dart b/lib/features/inbound/presentation/pages/short_term/ngse/information/insurance.dart index 83ec8d6e..60cba191 100644 --- a/lib/features/inbound/presentation/pages/short_term/ngse/information/insurance.dart +++ b/lib/features/inbound/presentation/pages/short_term/ngse/information/insurance.dart @@ -30,7 +30,7 @@ class _InsurancePageState extends State { leading: UniformBackButton(), title: Text( 'Travel', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/inbound/presentation/pages/short_term/ngse/information/language.dart b/lib/features/inbound/presentation/pages/short_term/ngse/information/language.dart index 4bbb0311..8b0e006f 100644 --- a/lib/features/inbound/presentation/pages/short_term/ngse/information/language.dart +++ b/lib/features/inbound/presentation/pages/short_term/ngse/information/language.dart @@ -30,7 +30,7 @@ class _LanguagePageState extends State { leading: UniformBackButton(), title: Text( 'Travel', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/inbound/presentation/pages/short_term/ngse/information/travel.dart b/lib/features/inbound/presentation/pages/short_term/ngse/information/travel.dart index aa651db6..07e29889 100644 --- a/lib/features/inbound/presentation/pages/short_term/ngse/information/travel.dart +++ b/lib/features/inbound/presentation/pages/short_term/ngse/information/travel.dart @@ -30,7 +30,7 @@ class _TravelPageState extends State { leading: UniformBackButton(), title: Text( 'Travel', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/inbound/presentation/pages/short_term/ngse/information/welcome_in_the_netherlands.dart b/lib/features/inbound/presentation/pages/short_term/ngse/information/welcome_in_the_netherlands.dart index 3ca77095..df2f275d 100644 --- a/lib/features/inbound/presentation/pages/short_term/ngse/information/welcome_in_the_netherlands.dart +++ b/lib/features/inbound/presentation/pages/short_term/ngse/information/welcome_in_the_netherlands.dart @@ -32,7 +32,7 @@ class _WelcomeInTheNetherlandsPageState leading: UniformBackButton(), title: Text( 'Welcome to the Netherlands!', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/inbound/presentation/pages/short_term/ngse/ngse_inbound_page.dart b/lib/features/inbound/presentation/pages/short_term/ngse/ngse_inbound_page.dart index f34c5c54..95a8d3f8 100644 --- a/lib/features/inbound/presentation/pages/short_term/ngse/ngse_inbound_page.dart +++ b/lib/features/inbound/presentation/pages/short_term/ngse/ngse_inbound_page.dart @@ -28,7 +28,7 @@ class _NGSEInboundPageState extends State { leading: UniformBackButton(), title: Text( 'NGSE Inbound', - textScaleFactor: 1.2, + textScaler: TextScaler.linear(1.2), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/news/presentation/pages/news_page.dart b/lib/features/news/presentation/pages/news_page.dart index 61722841..187b8ddb 100644 --- a/lib/features/news/presentation/pages/news_page.dart +++ b/lib/features/news/presentation/pages/news_page.dart @@ -24,7 +24,7 @@ class NewsPage extends StatefulWidget { } class _NewsPageState extends State { - final _newsBloc = NewsBloc(); + final NewsBloc _newsBloc = NewsBloc(); //_NewsPageState({required News news}) : _news = news; //final News _news; // List _stories = []; @@ -64,19 +64,15 @@ class _NewsPageState extends State { // } @override - initState() { + void initState() { super.initState(); _newsBloc.getNewsData(); _removeBadge(); - - // fetchDataFromApi(); } - void _removeBadge() async { - SharedPreferences prefs = await SharedPreferences.getInstance(); - setState(() { - prefs.setInt('newsBadge', 0); - }); + Future _removeBadge() async { + final prefs = await SharedPreferences.getInstance(); + await prefs.setInt('newsBadge', 0); } @override @@ -88,232 +84,155 @@ class _NewsPageState extends State { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar( - systemOverlayStyle: - MediaQuery.of(context).platformBrightness == Brightness.light - ? SystemUiOverlayStyle.dark - : SystemUiOverlayStyle.light, - backgroundColor: Colors.transparent, - elevation: 0.0, - leading: UniformBackButton(), - title: Text( - 'News', - textScaleFactor: 1.4, + appBar: AppBar( + systemOverlayStyle: + MediaQuery.of(context).platformBrightness == Brightness.light + ? SystemUiOverlayStyle.dark + : SystemUiOverlayStyle.light, + backgroundColor: Colors.transparent, + elevation: 0.0, + leading: UniformBackButton(), + title: Text('News', + textScaler: TextScaler.linear(1.2), style: - TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), - ), + TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold)), + ), + body: SingleChildScrollView( + padding: const EdgeInsets.symmetric(horizontal: 15), + child: Column( + children: [ + _buildHeaderStreamBuilder(), + const SizedBox(height: 10), + const Divider(thickness: 2), + _buildNewsStreamBuilder(), + ], ), - body: SingleChildScrollView( - child: Padding( - padding: EdgeInsets.only(left: 15, right: 15), - child: ListView( - shrinkWrap: true, - physics: const NeverScrollableScrollPhysics(), - children: [ - Container( - width: MediaQuery.of(context).size.width, - height: 170, - child: StreamBuilder( - stream: _newsBloc.header, - builder: (context, snapshot) { - if (snapshot.hasError) { - print(snapshot.error.toString()); - return Center( - child: Text(snapshot.error.toString()), - ); - } else if (snapshot.hasData) { - return - - // CachedNetworkImageRotary( - // imageUrl: snapshot.data!); - // Image.network( - // snapshot.data!, - // fit: BoxFit.cover, - // ); + ), + ); + } - CachedNetworkImage( - height: 55, - width: 55, - imageUrl: snapshot.data!, - //"https://www.rotary.nl/yep/yep-app/tu4w6b3-6436ie5-63h0jf-9i639i4-t3mf67-uhdrs/images/Informatiedag_Informatiemarkt_2021.png", - imageBuilder: (context, imageProvider) => - Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(8), - image: DecorationImage( - image: imageProvider, - fit: BoxFit.cover), - ), - ), - placeholder: (context, url) => - Center(child: CircularProgressIndicator()), - errorWidget: (context, url, error) => - Icon(Icons.error), - ); - } else { - return Center( - child: CircularProgressIndicator(), - ); - } - }), - ), - SizedBox( - height: 10, - ), - Divider( - thickness: 2, - ), - Container( - height: MediaQuery.of(context).size.height * 0.64, - child: StreamBuilder>( - stream: _newsBloc.news, - builder: (context, snapshot) { - if (snapshot.hasError) { - print(snapshot.error.toString()); - return Center( - child: Text(snapshot.error.toString()), - ); - } else if (snapshot.hasData) { - // print( - // 'snapshot has data ${snapshot.data.toString()}'); - return ListView.builder( - padding: EdgeInsets.only(top: 10, bottom: 30), - itemCount: snapshot.data!.length, - itemBuilder: (BuildContext context, int index) { - return GestureDetector( - onTap: () => { - snapshot.data![index].isPdf - ? Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - PDFPage( - pdfUrl: snapshot - .data![ - index] - .pdf!, - data: snapshot - .data![ - index])), - ) - : Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - NonPDFPage( - data: snapshot - .data![index], - ))), - }, + Widget _buildHeaderStreamBuilder() { + return StreamBuilder( + stream: _newsBloc.header, + builder: (context, snapshot) { + if (snapshot.hasData) { + return CachedNetworkImage( + height: 170, + width: double.infinity, + imageUrl: snapshot.data!, + imageBuilder: (context, imageProvider) => Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8), + image: DecorationImage(image: imageProvider, fit: BoxFit.cover), + ), + ), + placeholder: (context, url) => + const Center(child: CircularProgressIndicator()), + errorWidget: (context, url, error) => const Icon(Icons.error), + ); + } else if (snapshot.hasError) { + return Center(child: Text(snapshot.error.toString())); + } + return const Center(child: CircularProgressIndicator()); + }, + ); + } -//TODO not everything is a pdf news post. if the post contains text it needs to push to a different page where the text can be displayed. + Widget _buildNewsStreamBuilder() { + return StreamBuilder>( + stream: _newsBloc.news, + builder: (context, snapshot) { + if (snapshot.hasData) { + return SizedBox( + height: MediaQuery.of(context).size.height * 0.64, + child: ListView.separated( + // Use ListView.separated for easy spacing + itemCount: snapshot.data!.length, + itemBuilder: (context, index) => GestureDetector( + onTap: () => _handleNewsTap(context, snapshot.data![index]), + child: NewsCard(news: snapshot.data![index]), + ), + separatorBuilder: (context, index) => + SizedBox(height: 10), // Spacing between items + ), + ); + } else if (snapshot.hasError) { + return Center(child: Text(snapshot.error.toString())); + } + return const Center(child: CircularProgressIndicator()); + }, + ); + } - child: Container( - padding: EdgeInsets.only(bottom: 10), - child: TravelCard( - image: snapshot.data![index].images, - title: snapshot.data![index].title, - description: - snapshot.data![index].description, - ), - )); - }, - ); - } else { - return Center( - child: CircularProgressIndicator(), - ); - } - }), - ) - ])), - )); + void _handleNewsTap(BuildContext context, News news) { + if (news.isPdf) { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => PDFPage(pdfUrl: news.pdf!, data: news))); + } else { + Navigator.push(context, + MaterialPageRoute(builder: (context) => NonPDFPage(data: news))); + } } } -class TravelCard extends StatelessWidget { - final String title, description, image; +class NewsCard extends StatelessWidget { + final News news; - TravelCard( - {required this.title, required this.description, required this.image}); + const NewsCard({Key? key, required this.news}) : super(key: key); @override Widget build(BuildContext context) { return Container( decoration: BoxDecoration( - color: Palette.themeShadeColor, - borderRadius: BorderRadius.all(Radius.circular(14))), - child: SizedBox( - height: null, - child: Container( - child: Row( - children: [ - Container( - width: MediaQuery.of(context).size.width * 0.4, - height: 120, - child: CachedNetworkImage( - imageUrl: image, - imageBuilder: (context, imageProvider) => Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(14), - image: DecorationImage( - image: imageProvider, fit: BoxFit.contain), - ), - ), - placeholder: (context, url) => - Center(child: CircularProgressIndicator()), - errorWidget: (context, url, error) => Icon(Icons.error), + color: Palette.themeShadeColor, + borderRadius: const BorderRadius.all(Radius.circular(14)), + ), + child: Row( + children: [ + CachedNetworkImage( + width: MediaQuery.of(context).size.width * 0.4, + height: 120, + imageUrl: news.images, + imageBuilder: (context, imageProvider) => Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(14), + image: + DecorationImage(image: imageProvider, fit: BoxFit.contain), + ), + ), + placeholder: (context, url) => + const Center(child: CircularProgressIndicator()), + errorWidget: (context, url, error) => const Icon(Icons.error), + ), + Expanded( + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 10), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + news.title, + maxLines: 2, + overflow: TextOverflow.ellipsis, + style: TextStyle( + color: Palette.indigo, fontWeight: FontWeight.bold), + ), + const SizedBox(height: 5), + Text( + news.description, + maxLines: 4, + overflow: TextOverflow.ellipsis, + style: TextStyle(color: Palette.grey), ), - ), - // SizedBox( - // height: 120, - // child: ClipRRect( - // borderRadius: new BorderRadius.circular(14.0), - // child: Image.asset(image), - // )), - SizedBox( - height: null, - child: Container( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - padding: EdgeInsets.only(left: 10, top: 12), - child: SizedBox( - width: MediaQuery.of(context).size.width * 0.47, - child: Text(title, - textScaleFactor: 1.2, - maxLines: 2, - overflow: TextOverflow.ellipsis, - softWrap: false, - style: TextStyle( - color: Palette.indigo, - fontWeight: FontWeight.bold, - )), - ), - ), - SizedBox( - height: 5, - ), - Container( - padding: EdgeInsets.only(left: 10, top: 4), - child: SizedBox( - width: MediaQuery.of(context).size.width * 0.47, - child: Text(description, - textScaleFactor: 0.7, - maxLines: 4, - overflow: TextOverflow.ellipsis, - softWrap: false, - style: TextStyle(color: Palette.grey)), - ), - ) - ], - )), - ), - ], + ], + ), ), - )), + ), + ], + ), ); } } diff --git a/lib/features/news/presentation/pages/non_pdf_news.dart b/lib/features/news/presentation/pages/non_pdf_news.dart index 64a2691b..9474652a 100644 --- a/lib/features/news/presentation/pages/non_pdf_news.dart +++ b/lib/features/news/presentation/pages/non_pdf_news.dart @@ -77,10 +77,9 @@ class _NonPDFPageState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - systemOverlayStyle: - MediaQuery.of(context).platformBrightness == Brightness.light - ? SystemUiOverlayStyle.dark - : SystemUiOverlayStyle.light, + systemOverlayStyle: SystemUiOverlayStyle( + statusBarBrightness: MediaQuery.of(context).platformBrightness, + ), backgroundColor: Colors.transparent, elevation: 0.0, leading: UniformBackButton(), @@ -158,7 +157,7 @@ class _NonPDFPageState extends State { ], title: Text( widget.data.title, - textScaleFactor: 1.4, + textScaler: TextScaler.linear(1.4), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), diff --git a/lib/features/news/presentation/widgets/pdf_viewer.dart b/lib/features/news/presentation/widgets/pdf_viewer.dart index ba18d2b2..7ffc0fc6 100644 --- a/lib/features/news/presentation/widgets/pdf_viewer.dart +++ b/lib/features/news/presentation/widgets/pdf_viewer.dart @@ -83,10 +83,9 @@ class _PDFPageState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - systemOverlayStyle: - MediaQuery.of(context).platformBrightness == Brightness.light - ? SystemUiOverlayStyle.dark - : SystemUiOverlayStyle.light, + systemOverlayStyle: SystemUiOverlayStyle( + statusBarBrightness: MediaQuery.of(context).platformBrightness, + ), backgroundColor: Colors.transparent, elevation: 0.0, leading: UniformBackButton(), diff --git a/lib/features/outbound/presentation/pages/long_term/class_of/class_of.dart b/lib/features/outbound/presentation/pages/long_term/class_of/class_of.dart index 950c2682..495d53f3 100644 --- a/lib/features/outbound/presentation/pages/long_term/class_of/class_of.dart +++ b/lib/features/outbound/presentation/pages/long_term/class_of/class_of.dart @@ -28,17 +28,16 @@ class _ClassOfPageState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - systemOverlayStyle: - MediaQuery.of(context).platformBrightness == Brightness.light - ? SystemUiOverlayStyle.dark - : SystemUiOverlayStyle.light, + systemOverlayStyle: SystemUiOverlayStyle( + statusBarBrightness: MediaQuery.of(context).platformBrightness, + ), backgroundColor: Colors.transparent, elevation: 0.0, // centerTitle: false, leading: UniformBackButton(), title: Text( 'Class Of 2023-24', - textScaleFactor: 1.2, + textScaler: TextScaler.linear(1.2), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), )), diff --git a/lib/features/outbound/presentation/pages/long_term/class_of/class_of_details_page.dart b/lib/features/outbound/presentation/pages/long_term/class_of/class_of_details_page.dart index d514c848..5f83f246 100644 --- a/lib/features/outbound/presentation/pages/long_term/class_of/class_of_details_page.dart +++ b/lib/features/outbound/presentation/pages/long_term/class_of/class_of_details_page.dart @@ -32,7 +32,7 @@ class ClassOfDetails extends StatelessWidget { leading: UniformBackButton(), title: Text( 'Outbounds', - textScaleFactor: 1.4, + textScaler: TextScaler.linear(1.4), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/outbound/presentation/pages/long_term/information/comply_with.dart b/lib/features/outbound/presentation/pages/long_term/information/comply_with.dart index cabb31bb..fb1c4de9 100644 --- a/lib/features/outbound/presentation/pages/long_term/information/comply_with.dart +++ b/lib/features/outbound/presentation/pages/long_term/information/comply_with.dart @@ -30,7 +30,7 @@ class _ComplyWithPageState extends State { leading: UniformBackButton(), title: Text( 'Waar moet ik aan voldoen?', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/outbound/presentation/pages/long_term/information/how_to_sign_up.dart b/lib/features/outbound/presentation/pages/long_term/information/how_to_sign_up.dart index 5533766e..46dfe4d9 100644 --- a/lib/features/outbound/presentation/pages/long_term/information/how_to_sign_up.dart +++ b/lib/features/outbound/presentation/pages/long_term/information/how_to_sign_up.dart @@ -35,7 +35,7 @@ class _HowToSignUpPageState extends State { leading: UniformBackButton(), title: Text( 'Hoe schrijf ik mezelf in', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/outbound/presentation/pages/long_term/information/selection_day.dart b/lib/features/outbound/presentation/pages/long_term/information/selection_day.dart index 8f86db50..d9b52a5b 100644 --- a/lib/features/outbound/presentation/pages/long_term/information/selection_day.dart +++ b/lib/features/outbound/presentation/pages/long_term/information/selection_day.dart @@ -30,7 +30,7 @@ class _SelectionDayPageState extends State { leading: UniformBackButton(), title: Text( 'Selectie dag', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/outbound/presentation/pages/long_term/information/selection_weekend.dart b/lib/features/outbound/presentation/pages/long_term/information/selection_weekend.dart index 083e4f46..904dba43 100644 --- a/lib/features/outbound/presentation/pages/long_term/information/selection_weekend.dart +++ b/lib/features/outbound/presentation/pages/long_term/information/selection_weekend.dart @@ -30,7 +30,7 @@ class _SelectionWeekendPageState extends State { leading: UniformBackButton(), title: Text( 'Selectie weekend', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/outbound/presentation/pages/long_term/information/top_3_countries.dart b/lib/features/outbound/presentation/pages/long_term/information/top_3_countries.dart index 08e7bb9b..5a633f5a 100644 --- a/lib/features/outbound/presentation/pages/long_term/information/top_3_countries.dart +++ b/lib/features/outbound/presentation/pages/long_term/information/top_3_countries.dart @@ -32,7 +32,7 @@ class _Top3CountriesPageState extends State { leading: UniformBackButton(), title: Text( 'Goede top 3 van landen', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/outbound/presentation/pages/long_term/long_term_outbound_page.dart b/lib/features/outbound/presentation/pages/long_term/long_term_outbound_page.dart index 2f108914..ad1aa6f6 100644 --- a/lib/features/outbound/presentation/pages/long_term/long_term_outbound_page.dart +++ b/lib/features/outbound/presentation/pages/long_term/long_term_outbound_page.dart @@ -37,7 +37,7 @@ class _LongTermExchangeOutboundPageState leading: UniformBackButton(), title: Text( 'Long Term Outbound', - textScaleFactor: 1.2, + textScaler: TextScaler.linear(1.2), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/outbound/presentation/pages/outbound_page.dart b/lib/features/outbound/presentation/pages/outbound_page.dart index 815af0f0..e69ff15a 100644 --- a/lib/features/outbound/presentation/pages/outbound_page.dart +++ b/lib/features/outbound/presentation/pages/outbound_page.dart @@ -33,7 +33,7 @@ class _OutboundPageState extends State { leading: UniformBackButton(), title: Text( 'Outbound', - textScaleFactor: 1.4, + textScaler: TextScaler.linear(1.4), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/outbound/presentation/pages/short_term/camps_and_tours/camps_and_tours_outbound_page.dart b/lib/features/outbound/presentation/pages/short_term/camps_and_tours/camps_and_tours_outbound_page.dart index e09226a9..1a49c064 100644 --- a/lib/features/outbound/presentation/pages/short_term/camps_and_tours/camps_and_tours_outbound_page.dart +++ b/lib/features/outbound/presentation/pages/short_term/camps_and_tours/camps_and_tours_outbound_page.dart @@ -33,7 +33,7 @@ class _CampsAndToursOutboundPageState extends State { leading: UniformBackButton(), title: Text( 'Camps & Tours', - textScaleFactor: 1.2, + textScaler: TextScaler.linear(1.2), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/outbound/presentation/pages/short_term/camps_and_tours/information/comply_with.dart b/lib/features/outbound/presentation/pages/short_term/camps_and_tours/information/comply_with.dart index a461b5f2..58660469 100644 --- a/lib/features/outbound/presentation/pages/short_term/camps_and_tours/information/comply_with.dart +++ b/lib/features/outbound/presentation/pages/short_term/camps_and_tours/information/comply_with.dart @@ -30,7 +30,7 @@ class _ComplyWithPageState extends State { leading: UniformBackButton(), title: Text( 'Voor wie?', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/outbound/presentation/pages/short_term/camps_and_tours/information/how_to_sign_up.dart b/lib/features/outbound/presentation/pages/short_term/camps_and_tours/information/how_to_sign_up.dart index 563c4f88..579fe92c 100644 --- a/lib/features/outbound/presentation/pages/short_term/camps_and_tours/information/how_to_sign_up.dart +++ b/lib/features/outbound/presentation/pages/short_term/camps_and_tours/information/how_to_sign_up.dart @@ -35,7 +35,7 @@ class _HowToSignUpPageState extends State { leading: UniformBackButton(), title: Text( 'Hoe schrijf ik mezelf in', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/outbound/presentation/pages/short_term/camps_and_tours/information/which_countries.dart b/lib/features/outbound/presentation/pages/short_term/camps_and_tours/information/which_countries.dart index 37ea5313..314636c3 100644 --- a/lib/features/outbound/presentation/pages/short_term/camps_and_tours/information/which_countries.dart +++ b/lib/features/outbound/presentation/pages/short_term/camps_and_tours/information/which_countries.dart @@ -34,7 +34,7 @@ class _WhichCountriesPageState extends State { leading: UniformBackButton(), title: Text( 'Met welke landen?', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/outbound/presentation/pages/short_term/camps_and_tours/widgets/loadCsv.dart b/lib/features/outbound/presentation/pages/short_term/camps_and_tours/widgets/loadCsv.dart index 5a8bce0d..b15c1be6 100644 --- a/lib/features/outbound/presentation/pages/short_term/camps_and_tours/widgets/loadCsv.dart +++ b/lib/features/outbound/presentation/pages/short_term/camps_and_tours/widgets/loadCsv.dart @@ -3,17 +3,14 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart' show SystemUiOverlayStyle; // 📦 Package imports: -import 'package:badges/badges.dart' as badges; import 'package:csv/csv.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:http/http.dart' as http; -import 'package:skeletons/skeletons.dart'; // 🌎 Project imports: import 'package:rotary_nl_rye/core/prop.dart'; import 'package:rotary_nl_rye/features/outbound/presentation/pages/short_term/camps_and_tours/widgets/pdf_viewer.dart'; -import 'package:rotary_nl_rye/features/uniform_widgets/back_button.dart'; class LoadCsv extends StatefulWidget { @override @@ -21,118 +18,75 @@ class LoadCsv extends StatefulWidget { } class _LoadCsvState extends State { - List> _data = []; + late Future>> _futureData; - Future?> getData() async { + @override + void initState() { + super.initState(); + _futureData = getData(); + } + + Future>> getData() async { final response = await http.get( Uri.parse( 'https://www.rotary.nl/yep/yep-app/tu4w6b3-6436ie5-63h0jf-9i639i4-t3mf67-uhdrs/outbounds/camps-and-tours/zomerkampen.csv'), headers: {'Content-Type': 'application/json', 'Charset': 'utf-8'}); - try { - if (response.statusCode == 200) { - List> _listData = CsvToListConverter( - eol: '\r\n', - fieldDelimiter: ';', - ).convert(response.body); - - setState(() { - _data = _listData; - }); - - return _listData; - } else { - // ignore: null_check_always_fails - return null!; - } - } catch (e) { - // ignore: null_check_always_fails - return null; + if (response.statusCode == 200) { + return CsvToListConverter(eol: '\r\n', fieldDelimiter: ';') + .convert(response.body); + } else { + throw Exception('Failed to load CSV data'); } } @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar( - systemOverlayStyle: - MediaQuery.of(context).platformBrightness == Brightness.light - ? SystemUiOverlayStyle.dark - : SystemUiOverlayStyle.light, - backgroundColor: Colors.transparent, - elevation: 0.0, - leading: UniformBackButton(), - title: Text( - 'Camps & Tours List', - textScaleFactor: 1.2, - style: - TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), - ), + appBar: AppBar( + systemOverlayStyle: SystemUiOverlayStyle.light.copyWith( + statusBarColor: Colors.transparent, // iOS + statusBarBrightness: Brightness.light, // Android ), - body: Padding( - padding: EdgeInsets.only(left: 15, right: 15), - child: FutureBuilder?>( - future: getData(), // async work - builder: - (BuildContext context, AsyncSnapshot?> snapshot) { - if (snapshot.connectionState == ConnectionState.done) { - return SkeletonListView(); - } else { - if (snapshot.hasData) { - // return Center(child: new Text('${snapshot.data}')); // snapshot.data :- get your object which is pass from your downloadData() function - return ListView.builder( - padding: EdgeInsets.only(top: 10, bottom: 30), - itemCount: _data.length, - itemBuilder: (_, index) { - if (index == 0) { - // return the header - return SizedBox.shrink(); - } - return GestureDetector( - onTap: () { - print('title: ' + - snapshot.data![index][2].toString()); - - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => PDFPageViewer( - title: snapshot.data![index][2] - .toString(), - pdfURL: snapshot.data![index][9] - .toString(), - )), - ); - }, - child: Container( - padding: EdgeInsets.only(bottom: 10), - child: TravelCard( - startDate: snapshot.data![index][0].toString(), - endDate: snapshot.data![index][1].toString(), - title: snapshot.data![index][2].toString(), - hostCountryCode: - snapshot.data![index][3].toString(), - hostCountry: - snapshot.data![index][4].toString(), - hostDistrict: - snapshot.data![index][5].toString(), - ageMin: snapshot.data![index][6].toString(), - ageMax: snapshot.data![index][7].toString(), - contribution: - snapshot.data![index][8].toString(), - invitation: snapshot.data![index][9].toString(), - full: snapshot.data![index][10].toString(), - ), - )); - }, - ); - } else if (snapshot.hasError) { - return Text('${snapshot.error}'); - } - // By default show a loading spinner. - return SkeletonListView(); - } - }), - )); + backgroundColor: Colors.transparent, + elevation: 0.0, + title: Text('Camps & Tours List', + textScaler: TextScaler.linear(1.2), + style: + TextStyle(color: Colors.indigo, fontWeight: FontWeight.bold)), + ), + body: FutureBuilder>>( + future: _futureData, + builder: (context, snapshot) { + if (snapshot.connectionState == ConnectionState.waiting) { + return CircularProgressIndicator(); // Placeholder widget like a loading spinner + } else if (snapshot.hasError) { + return Text('Error: ${snapshot.error}'); + } else if (snapshot.hasData) { + return ListView.builder( + itemCount: snapshot.data!.length, + itemBuilder: (context, index) { + if (index == 0) return SizedBox.shrink(); // Skip header + return TravelCard( + startDate: snapshot.data![index][0].toString(), + endDate: snapshot.data![index][1].toString(), + title: snapshot.data![index][2].toString(), + hostCountryCode: snapshot.data![index][3].toString(), + hostCountry: snapshot.data![index][4].toString(), + hostDistrict: snapshot.data![index][5].toString(), + ageMin: snapshot.data![index][6].toString(), + ageMax: snapshot.data![index][7].toString(), + contribution: snapshot.data![index][8].toString(), + invitation: snapshot.data![index][9].toString(), + full: snapshot.data![index][10].toString(), + ); + }, + ); + } else { + return SizedBox.shrink(); // Fallback placeholder + } + }, + ), + ); } } @@ -149,7 +103,7 @@ class TravelCard extends StatelessWidget { invitation, full; - TravelCard({ + const TravelCard({ required this.startDate, required this.endDate, required this.title, @@ -165,398 +119,173 @@ class TravelCard extends StatelessWidget { @override Widget build(BuildContext context) { - return Container( - decoration: BoxDecoration( + List hostCountries = hostCountry.split('/'); + List hostCountryCodes = hostCountryCode.split('/'); + + return GestureDetector( + onTap: () { + print('Tapped on: $title'); + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => PDFPageViewer( + title: title, + pdfURL: invitation, + ), + ), + ); + }, + child: Card( + elevation: 4.0, + margin: const EdgeInsets.all(8.0), color: Palette.themeShadeColor, - borderRadius: BorderRadius.all(Radius.circular(14))), - child: SizedBox( - height: null, - child: Container( + shape: + RoundedRectangleBorder(borderRadius: BorderRadius.circular(14)), + child: Padding( + padding: const EdgeInsets.all(16.0), child: Column( - children: [ - SizedBox( - child: Container( - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - full.isNotEmpty - ? Container( - padding: EdgeInsets.only(left: 12, top: 6), - child: badges.Badge( - badgeAnimation: badges.BadgeAnimation.fade( - toAnimate: false), - badgeStyle: badges.BadgeStyle( - shape: badges.BadgeShape.square, - badgeColor: Colors.red, - borderRadius: BorderRadius.circular(8), - elevation: 0, - ), - badgeContent: Text('VOL', - style: TextStyle(color: Colors.white)), - ), - ) - : SizedBox.shrink(), - Container( - padding: EdgeInsets.only(left: 10, top: 10), - child: SizedBox( - width: MediaQuery.of(context).size.width * 0.70, - child: Text(title, - textScaleFactor: 1.1, - maxLines: 2, - overflow: TextOverflow.ellipsis, - softWrap: false, - style: TextStyle( - color: Palette.indigo, - fontWeight: FontWeight.bold, - )), - ), - ), - ], - )), - ), - SizedBox( - child: Container( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - hostCountryCode.contains('/') - ? Column(children: [ - Container( - padding: EdgeInsets.only(top: 10), - child: Row( - children: [ - Container( - padding: EdgeInsets.only(left: 20), - child: Row( - children: [ - FaIcon( - FontAwesomeIcons.solidFlag, - color: Palette.lightIndigo, - size: 20, - ), - Container( - margin: EdgeInsets.only(left: 12), - child: Text( - 'Host Country:', - textScaleFactor: 1.2, - style: TextStyle( - color: Palette.indigo, - fontWeight: FontWeight.bold, - ), - ), - ) - ], - ), - ), - Container( - padding: EdgeInsets.only(left: 30), - child: Row( - children: [ - SvgPicture.asset( - "assets/icons/flags/${hostCountryCode.split('/')[0]}.svg", - height: 20, - width: 50, - fit: BoxFit.contain, - ), - Container( - margin: EdgeInsets.only(left: 10), - child: Text( - hostCountry.split('/')[0], - textScaleFactor: 1.2, - style: TextStyle( - color: Palette.indigo, - // fontWeight: FontWeight.bold, - ), - ), - ), - ], - ), - ) - ], - ), - ), - Container( - padding: EdgeInsets.only(top: 10), - child: Row( - children: [ - Container( - padding: EdgeInsets.only(left: 184), - child: Row( - children: [ - Container( - margin: EdgeInsets.only( - left: 5, right: 5), - child: Text( - '/ ', - textScaleFactor: 1.2, - style: TextStyle( - color: Palette.indigo, - // fontWeight: FontWeight.bold, - ), - ), - ), - SvgPicture.asset( - "assets/icons/flags/${hostCountryCode.split('/')[1]}.svg", - height: 20, - width: 50, - fit: BoxFit.contain, - ), - Container( - margin: EdgeInsets.only(left: 10), - child: Text( - hostCountry.split('/')[1], - textScaleFactor: 1.2, - style: TextStyle( - color: Palette.indigo, - // fontWeight: FontWeight.bold, - ), - ), - ), - ], - ), - ) - ], - ), - ) - ]) - : Container( - padding: EdgeInsets.only(top: 10), - child: Row( - children: [ - Container( - padding: EdgeInsets.only(left: 20), - child: Row( - children: [ - FaIcon( - FontAwesomeIcons.solidFlag, - color: Palette.lightIndigo, - size: 20, - ), - Container( - margin: EdgeInsets.only(left: 12), - child: Text( - 'Host Country:', - textScaleFactor: 1.2, - style: TextStyle( - color: Palette.indigo, - fontWeight: FontWeight.bold, - ), - ), - ) - ], - ), - ), - Container( - padding: EdgeInsets.only(left: 30), - child: Row( - children: [ - SvgPicture.asset( - 'assets/icons/flags/$hostCountryCode.svg', - height: 20, - width: 50, - fit: BoxFit.contain, - ), - Container( - margin: EdgeInsets.only(left: 10), - child: Text( - hostCountry, - textScaleFactor: 1.2, - style: TextStyle( - color: Palette.indigo, - // fontWeight: FontWeight.bold, - ), - ), - ) - ], - ), - ), - ], - ), - ), - Container( - padding: EdgeInsets.only(top: 10), - child: Row( - children: [ - Container( - padding: EdgeInsets.only(left: 20), - child: Row( - children: [ - FaIcon( - FontAwesomeIcons.thumbtack, - color: Palette.lightIndigo, - size: 20, - ), - Container( - margin: EdgeInsets.only(left: 17), - child: Text( - 'Host District:', - textScaleFactor: 1.2, - style: TextStyle( - color: Palette.indigo, - fontWeight: FontWeight.bold, - ), - ), - ) - ], - ), - ), - hostDistrict.contains('/') - ? Container( - margin: EdgeInsets.only(left: 37), - child: Text( - hostDistrict.split('/')[0] + - ' / ' + - hostDistrict.split('/')[1], - textScaleFactor: 1.2, - style: TextStyle( - color: Palette.indigo, - // fontWeight: FontWeight.bold, - ), - ), - ) - : Container( - margin: EdgeInsets.only(left: 37), - child: Text( - hostDistrict, - textScaleFactor: 1.2, - style: TextStyle( - color: Palette.indigo, - // fontWeight: FontWeight.bold, - ), - ), - ) - ], - ), - ), + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + if (full.isNotEmpty) // Check if 'full' is not empty Container( - padding: EdgeInsets.only(top: 10), - child: Row( - children: [ - Container( - padding: EdgeInsets.only(left: 19), - child: Row( - children: [ - FaIcon( - FontAwesomeIcons.cakeCandles, - color: Palette.lightIndigo, - size: 20, - ), - Container( - margin: EdgeInsets.only(left: 16), - child: Text( - 'Min - Max:', - textScaleFactor: 1.2, - style: TextStyle( - color: Palette.indigo, - fontWeight: FontWeight.bold, - ), - ), - ) - ], - ), - ), - Container( - margin: EdgeInsets.only(left: 61), - child: Text( - ageMin + ' - ' + ageMax + ' Years', - textScaleFactor: 1.2, - style: TextStyle( - color: Palette.indigo, - // fontWeight: FontWeight.bold, - ), - ), - ) - ], + padding: const EdgeInsets.symmetric( + horizontal: 6.0, vertical: 2.0), + margin: const EdgeInsets.only( + right: + 8.0), // Add some space between the "FULL" label and the title + decoration: BoxDecoration( + color: Colors.red, + borderRadius: BorderRadius.circular(14), ), - ), - Container( - padding: EdgeInsets.only(top: 10), - child: Row( - children: [ - Container( - padding: EdgeInsets.only(left: 20), - child: Row( - children: [ - FaIcon( - FontAwesomeIcons.euroSign, - color: Palette.lightIndigo, - size: 20, - ), - Container( - margin: EdgeInsets.only(left: 20), - child: Text( - 'Contribution:', - textScaleFactor: 1.2, - style: TextStyle( - color: Palette.indigo, - fontWeight: FontWeight.bold, - ), - ), - ) - ], - ), - ), - Container( - margin: EdgeInsets.only(left: 37), - child: Text( - contribution, - textScaleFactor: 1.2, - style: TextStyle( - color: Palette.indigo, - // fontWeight: FontWeight.bold, - ), - ), - ) - ], + child: Text( + 'FULL', + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 12), ), ), - Container( - padding: EdgeInsets.only(top: 10), - child: Row( - children: [ - Container( - padding: EdgeInsets.only(left: 20), - child: Row( - children: [ - FaIcon( - FontAwesomeIcons.calendarDays, - color: Palette.lightIndigo, - size: 20, - ), - Container( - margin: EdgeInsets.only(left: 14), - child: Text( - 'Date:', - textScaleFactor: 1.2, - style: TextStyle( - color: Palette.indigo, - fontWeight: FontWeight.bold, - ), - ), - ) - ], - ), - ), - Container( - margin: EdgeInsets.only(left: 30), - child: Text( - startDate + ' - ' + endDate, - textScaleFactor: 1.2, - style: TextStyle( - color: Palette.indigo, - // fontWeight: FontWeight.bold, - ), - ), - ) - ], + Expanded( + // Use Expanded to ensure the title can take up the remaining space + child: Text( + title, + style: TextStyle( + color: Palette.indigo, + fontWeight: FontWeight.bold, + fontSize: 20, ), ), - ], - )), + ), + ], ), + + // if (full.isNotEmpty) + // Align( + // alignment: Alignment.topRight, + // child: Container( + // padding: const EdgeInsets.all(6.0), + // decoration: BoxDecoration( + // color: Colors.red, + // borderRadius: BorderRadius.circular(14), + // ), + // child: Text( + // 'FULL', + // style: TextStyle( + // color: Colors.white, fontWeight: FontWeight.bold), + // ), + // ), + // ), + // Text( + // title, + // style: TextStyle( + // color: Palette.indigo, + // fontWeight: FontWeight.bold, + // fontSize: 20, + // ), + // ), + SizedBox(height: 10), + buildInfoRow( + context, 'Host Country: ', hostCountries, hostCountryCodes), + SizedBox(height: 10), + buildSimpleInfoRow('Host District: ', hostDistrict, + FontAwesomeIcons.locationDot), + SizedBox(height: 10), + buildSimpleInfoRow('Age Range: ', '$ageMin - $ageMax years', + FontAwesomeIcons.cakeCandles), + SizedBox(height: 10), + buildSimpleInfoRow( + 'Contribution: ', contribution, FontAwesomeIcons.euroSign), + SizedBox(height: 10), + buildSimpleInfoRow('Date: ', '$startDate - $endDate', + FontAwesomeIcons.calendarDays), ], ), - )), + ), + )); + } + + Widget buildInfoRow(BuildContext context, String label, List values, + List codes) { + return Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Icon(FontAwesomeIcons.solidFlag, size: 16, color: Palette.lightIndigo), + SizedBox(width: 8), + Expanded( + child: Text(label, + style: TextStyle( + color: Palette.indigo, fontWeight: FontWeight.bold)), + ), + Expanded( + child: Row( + mainAxisAlignment: + MainAxisAlignment.end, // Aligns the flags to the right + children: [ + for (int i = 0; i < codes.length; i++) + Row( + children: [ + if (i > 0) ...[ + // Adds a separator if there's more than one flag + SizedBox(width: 10), + Text('/', + style: TextStyle( + color: Palette.indigo, + fontWeight: FontWeight.bold)), + SizedBox(width: 10), + ], + SvgPicture.asset( + 'assets/icons/flags/${codes[i]}.svg', + width: 30, + height: 20, + ), + SizedBox(width: 5), + Text(values[i], style: TextStyle(color: Palette.indigo)), + ], + ), + ], + ), + ), + ], + ); + } + + Widget buildSimpleInfoRow(String label, String value, IconData icon) { + return Row( + children: [ + Icon(icon, size: 16, color: Palette.lightIndigo), + SizedBox(width: 8), + Text(label, + style: + TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold)), + Expanded( + child: Text(value, + textAlign: TextAlign.end, + style: TextStyle(color: Palette.indigo)), + ), + ], ); } } diff --git a/lib/features/outbound/presentation/pages/short_term/camps_and_tours/widgets/pdf_viewer.dart b/lib/features/outbound/presentation/pages/short_term/camps_and_tours/widgets/pdf_viewer.dart index a4beac9d..38218f13 100644 --- a/lib/features/outbound/presentation/pages/short_term/camps_and_tours/widgets/pdf_viewer.dart +++ b/lib/features/outbound/presentation/pages/short_term/camps_and_tours/widgets/pdf_viewer.dart @@ -66,10 +66,9 @@ class _PDFPageViewerState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - systemOverlayStyle: - MediaQuery.of(context).platformBrightness == Brightness.light - ? SystemUiOverlayStyle.dark - : SystemUiOverlayStyle.light, + systemOverlayStyle: SystemUiOverlayStyle( + statusBarBrightness: MediaQuery.of(context).platformBrightness, + ), backgroundColor: Colors.transparent, elevation: 0.0, leading: UniformBackButton(), @@ -92,7 +91,7 @@ class _PDFPageViewerState extends State { ], title: Text( widget.title, - textScaleFactor: 1.0, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), diff --git a/lib/features/outbound/presentation/pages/short_term/family_to_family/family_to_family_outbound_page.dart b/lib/features/outbound/presentation/pages/short_term/family_to_family/family_to_family_outbound_page.dart index f79fd615..025f8a19 100644 --- a/lib/features/outbound/presentation/pages/short_term/family_to_family/family_to_family_outbound_page.dart +++ b/lib/features/outbound/presentation/pages/short_term/family_to_family/family_to_family_outbound_page.dart @@ -33,7 +33,7 @@ class _FamilyToFamilyOutboundPageState leading: UniformBackButton(), title: Text( 'Family to Family', - textScaleFactor: 1.2, + textScaler: TextScaler.linear(1.2), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/outbound/presentation/pages/short_term/family_to_family/information/comply_with.dart b/lib/features/outbound/presentation/pages/short_term/family_to_family/information/comply_with.dart index bead841b..f5279f60 100644 --- a/lib/features/outbound/presentation/pages/short_term/family_to_family/information/comply_with.dart +++ b/lib/features/outbound/presentation/pages/short_term/family_to_family/information/comply_with.dart @@ -30,7 +30,7 @@ class _ComplyWithPageState extends State { leading: UniformBackButton(), title: Text( 'Waar moet ik aan voldoen?', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/outbound/presentation/pages/short_term/family_to_family/information/countries_preference.dart b/lib/features/outbound/presentation/pages/short_term/family_to_family/information/countries_preference.dart index aa7bd437..a8a67221 100644 --- a/lib/features/outbound/presentation/pages/short_term/family_to_family/information/countries_preference.dart +++ b/lib/features/outbound/presentation/pages/short_term/family_to_family/information/countries_preference.dart @@ -31,7 +31,7 @@ class _CountriesPreferencePageState extends State { leading: UniformBackButton(), title: Text( 'Landenvoorkeur', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/outbound/presentation/pages/short_term/family_to_family/information/how_to_sign_up.dart b/lib/features/outbound/presentation/pages/short_term/family_to_family/information/how_to_sign_up.dart index aca2a9d9..d8f855a0 100644 --- a/lib/features/outbound/presentation/pages/short_term/family_to_family/information/how_to_sign_up.dart +++ b/lib/features/outbound/presentation/pages/short_term/family_to_family/information/how_to_sign_up.dart @@ -35,7 +35,7 @@ class _HowToSignUpPageState extends State { leading: UniformBackButton(), title: Text( 'Hoe schrijf ik mezelf in', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/outbound/presentation/pages/short_term/ngse/information/comply_with.dart b/lib/features/outbound/presentation/pages/short_term/ngse/information/comply_with.dart index 0f9017b7..521224ad 100644 --- a/lib/features/outbound/presentation/pages/short_term/ngse/information/comply_with.dart +++ b/lib/features/outbound/presentation/pages/short_term/ngse/information/comply_with.dart @@ -30,7 +30,7 @@ class _ComplyWithPageState extends State { leading: UniformBackButton(), title: Text( 'Waar moet ik aan voldoen?', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/outbound/presentation/pages/short_term/ngse/information/how_to_sign_up.dart b/lib/features/outbound/presentation/pages/short_term/ngse/information/how_to_sign_up.dart index e832d93a..d9004ae5 100644 --- a/lib/features/outbound/presentation/pages/short_term/ngse/information/how_to_sign_up.dart +++ b/lib/features/outbound/presentation/pages/short_term/ngse/information/how_to_sign_up.dart @@ -34,7 +34,7 @@ class _HowToSignUpPageState extends State { leading: UniformBackButton(), title: Text( 'Hoe schrijf ik mezelf in', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/outbound/presentation/pages/short_term/ngse/information/selection_day.dart b/lib/features/outbound/presentation/pages/short_term/ngse/information/selection_day.dart index 5aaee168..9d6b5f90 100644 --- a/lib/features/outbound/presentation/pages/short_term/ngse/information/selection_day.dart +++ b/lib/features/outbound/presentation/pages/short_term/ngse/information/selection_day.dart @@ -30,7 +30,7 @@ class _SelectionDayPageState extends State { leading: UniformBackButton(), title: Text( 'Selectie dag', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/outbound/presentation/pages/short_term/ngse/information/selection_weekend.dart b/lib/features/outbound/presentation/pages/short_term/ngse/information/selection_weekend.dart index eb9c9ea1..588fd4aa 100644 --- a/lib/features/outbound/presentation/pages/short_term/ngse/information/selection_weekend.dart +++ b/lib/features/outbound/presentation/pages/short_term/ngse/information/selection_weekend.dart @@ -30,7 +30,7 @@ class _SelectionWeekendPageState extends State { leading: UniformBackButton(), title: Text( 'Selectie weekend', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/outbound/presentation/pages/short_term/ngse/information/top_3_countries.dart b/lib/features/outbound/presentation/pages/short_term/ngse/information/top_3_countries.dart index 67d4a901..8a1e5aa5 100644 --- a/lib/features/outbound/presentation/pages/short_term/ngse/information/top_3_countries.dart +++ b/lib/features/outbound/presentation/pages/short_term/ngse/information/top_3_countries.dart @@ -32,7 +32,7 @@ class _Top3CountriesPageState extends State { leading: UniformBackButton(), title: Text( 'Goede top 3 van landen', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/outbound/presentation/pages/short_term/ngse/ngse_outbound_page.dart b/lib/features/outbound/presentation/pages/short_term/ngse/ngse_outbound_page.dart index ad974f8c..8d1fbe0a 100644 --- a/lib/features/outbound/presentation/pages/short_term/ngse/ngse_outbound_page.dart +++ b/lib/features/outbound/presentation/pages/short_term/ngse/ngse_outbound_page.dart @@ -29,7 +29,7 @@ class _NGSEOutboundPageState extends State { leading: UniformBackButton(), title: Text( 'NGSE', - textScaleFactor: 1.2, + textScaler: TextScaler.linear(1.2), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/programs/presentation/pages/information/camps_tours.dart b/lib/features/programs/presentation/pages/information/camps_tours.dart index 7c163b00..9dab22d7 100644 --- a/lib/features/programs/presentation/pages/information/camps_tours.dart +++ b/lib/features/programs/presentation/pages/information/camps_tours.dart @@ -140,7 +140,7 @@ class _CampsAndToursProgramPageState extends State { leading: UniformBackButton(), title: Text( 'Camps & Tours', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), @@ -237,7 +237,8 @@ class _CampsAndToursProgramPageState extends State { 0.8, child: Text( localimages1[index].text, - textScaleFactor: 1, + textScaler: + TextScaler.linear(1), maxLines: 100, overflow: TextOverflow.ellipsis, softWrap: false, @@ -358,7 +359,8 @@ class _CampsAndToursProgramPageState extends State { 0.8, child: Text( localimages2[index].text, - textScaleFactor: 1, + textScaler: + TextScaler.linear(1), maxLines: 100, overflow: TextOverflow.ellipsis, softWrap: false, @@ -470,7 +472,8 @@ class _CampsAndToursProgramPageState extends State { 0.8, child: Text( localimages3[index].text, - textScaleFactor: 1, + textScaler: + TextScaler.linear(1), maxLines: 100, overflow: TextOverflow.ellipsis, softWrap: false, @@ -714,7 +717,7 @@ class _CampsAndToursProgramPageState extends State { Padding( padding: const EdgeInsets.only(top: 10.0), child: Text( - 'De kosten voor aanmelding zijn € 100.-. * (kosten kunnen per jaar verschillen) \n\nDe aanmelding staat open tot mei. \n\nNaast het inschrijfgeld moet men rekening houden met de volgende kosten:', + 'de kosten voor aanmelding zijn 100,-- ex BTW (121 euro incl. BTW) (kosten kunnen per jaar verschillen) \n\nDe aanmelding staat open tot mei. \n\nNaast het inschrijfgeld moet men rekening houden met de volgende kosten:', style: TextStyle(fontSize: 14.0), ), ), diff --git a/lib/features/programs/presentation/pages/information/family_to_family.dart b/lib/features/programs/presentation/pages/information/family_to_family.dart index edfceca9..116dc581 100644 --- a/lib/features/programs/presentation/pages/information/family_to_family.dart +++ b/lib/features/programs/presentation/pages/information/family_to_family.dart @@ -193,7 +193,7 @@ class _FamilyToFamilyProgramPageState extends State { leading: UniformBackButton(), title: Text( 'Family To Family', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), @@ -293,7 +293,8 @@ class _FamilyToFamilyProgramPageState extends State { 0.8, child: Text( localimages1[index].text, - textScaleFactor: 1, + textScaler: + TextScaler.linear(1), maxLines: 100, overflow: TextOverflow.ellipsis, softWrap: false, @@ -418,7 +419,8 @@ class _FamilyToFamilyProgramPageState extends State { 0.8, child: Text( localimages2[index].text, - textScaleFactor: 1, + textScaler: + TextScaler.linear(1), maxLines: 100, overflow: TextOverflow.ellipsis, softWrap: false, @@ -530,7 +532,8 @@ class _FamilyToFamilyProgramPageState extends State { 0.8, child: Text( localimages3[index].text, - textScaleFactor: 1, + textScaler: + TextScaler.linear(1), maxLines: 100, overflow: TextOverflow.ellipsis, softWrap: false, @@ -659,7 +662,7 @@ class _FamilyToFamilyProgramPageState extends State { Padding( padding: const EdgeInsets.only(top: 10.0), child: Text( - 'De kosten zijn: €150 euro excl. verzekering, ticket, zakgeld en ziektekosten.', + 'De kosten zijn €150 euro ex BTW (€181,50 incl. BTW) maar excl. verzekering, ticket, zakgeld en ziektekosten.', style: TextStyle(fontSize: 14.0), ), ), diff --git a/lib/features/programs/presentation/pages/information/long_term_exchange.dart b/lib/features/programs/presentation/pages/information/long_term_exchange.dart index a4d13120..4a15bc1d 100644 --- a/lib/features/programs/presentation/pages/information/long_term_exchange.dart +++ b/lib/features/programs/presentation/pages/information/long_term_exchange.dart @@ -38,7 +38,7 @@ class _LongTermExchangeProgramPageState leading: UniformBackButton(), title: Text( 'Long Term Exchange Program', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), @@ -258,7 +258,7 @@ class _LongTermExchangeProgramPageState Padding( padding: const EdgeInsets.only(top: 10.0), child: Text( - 'De kosten voor de jongere bedragen vanaf € 2.400,-- incl. zakgeld exclusief ticket en andere onkosten.', + 'De kosten voor de jongere bedragen vanaf € 2.400,-- Exclusief BTW. zakgeld exclusief ticket en andere onkosten.', style: TextStyle(fontSize: 14.0), ), ), diff --git a/lib/features/programs/presentation/pages/information/ngse.dart b/lib/features/programs/presentation/pages/information/ngse.dart index ca318aed..f6fc50f3 100644 --- a/lib/features/programs/presentation/pages/information/ngse.dart +++ b/lib/features/programs/presentation/pages/information/ngse.dart @@ -25,7 +25,7 @@ class _NGSEProgramPageState extends State { leading: UniformBackButton(), title: Text( 'NGSE', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), @@ -99,7 +99,7 @@ class _NGSEProgramPageState extends State { Padding( padding: const EdgeInsets.only(top: 10.0), child: Text( - 'Bij inschrijving betaalt de kandidaat aan NGSE € 50,00. Wanneer de kandidaat daadwerkelijk wordt uitgezonden komen daar nog bemiddelingskosten bij. Die worden ingeschat op circa € 300,00.', + 'bij inschrijving betaalt de kandidaat aan NGSE €150,00 ex BTW (€181,50 incl. BTW) inschrijfkosten.', style: TextStyle(fontSize: 14.0), ), ), diff --git a/lib/features/programs/presentation/pages/program_page.dart b/lib/features/programs/presentation/pages/program_page.dart index d173051c..2734a553 100644 --- a/lib/features/programs/presentation/pages/program_page.dart +++ b/lib/features/programs/presentation/pages/program_page.dart @@ -37,7 +37,7 @@ class _ProgramPageState extends State { leading: UniformBackButton(), title: Text( 'Programs', - textScaleFactor: 1.7, + textScaler: TextScaler.linear(1.7), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/programs/presentation/pages/promo/podcast_page.dart b/lib/features/programs/presentation/pages/promo/podcast_page.dart index c0fabf0f..d9d2887e 100644 --- a/lib/features/programs/presentation/pages/promo/podcast_page.dart +++ b/lib/features/programs/presentation/pages/promo/podcast_page.dart @@ -47,7 +47,7 @@ class _PodcastPageState extends State { leading: UniformBackButton(), title: Text( 'Promo Podcast', - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/programs/presentation/pages/promo/video_page.dart b/lib/features/programs/presentation/pages/promo/video_page.dart index e41004d0..b2114177 100644 --- a/lib/features/programs/presentation/pages/promo/video_page.dart +++ b/lib/features/programs/presentation/pages/promo/video_page.dart @@ -31,7 +31,7 @@ class _VideoPageState extends State { leading: UniformBackButton(), title: Text( "Promo Video's", - textScaleFactor: 1, + textScaler: TextScaler.linear(1), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/settings/presentation/pages/contributors_page.dart b/lib/features/settings/presentation/pages/contributors_page.dart index cf14091c..68d11f5c 100644 --- a/lib/features/settings/presentation/pages/contributors_page.dart +++ b/lib/features/settings/presentation/pages/contributors_page.dart @@ -20,16 +20,15 @@ class _ContributorsPageState extends State { { return Scaffold( appBar: AppBar( - systemOverlayStyle: - MediaQuery.of(context).platformBrightness == Brightness.light - ? SystemUiOverlayStyle.dark - : SystemUiOverlayStyle.light, + systemOverlayStyle: SystemUiOverlayStyle( + statusBarBrightness: MediaQuery.of(context).platformBrightness, + ), backgroundColor: Colors.transparent, elevation: 0.0, leading: UniformBackButton(), title: Text( 'Contributors', - textScaleFactor: 1.4, + textScaler: TextScaler.linear(1.4), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), diff --git a/lib/features/settings/presentation/pages/settings_page.dart b/lib/features/settings/presentation/pages/settings_page.dart index 6b50d60f..8435dd29 100644 --- a/lib/features/settings/presentation/pages/settings_page.dart +++ b/lib/features/settings/presentation/pages/settings_page.dart @@ -85,7 +85,7 @@ class _SettingsPageState extends State { centerTitle: false, title: Text( DemoLocalizations.of(context)!.trans('settingsTitle'), - textScaleFactor: 1.7, + textScaler: TextScaler.linear(1.7), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), actions: [ diff --git a/lib/features/settings/presentation/pages/social.dart b/lib/features/settings/presentation/pages/social.dart index 74d524c5..cb6599d3 100644 --- a/lib/features/settings/presentation/pages/social.dart +++ b/lib/features/settings/presentation/pages/social.dart @@ -36,7 +36,7 @@ class _SocialPageState extends State { leading: UniformBackButton(), title: Text( 'Socials', - textScaleFactor: 1.4, + textScaler: TextScaler.linear(1.4), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/stories/presentation/pages/countries_page.dart b/lib/features/stories/presentation/pages/countries_page.dart index 6d6e03a7..c393961f 100644 --- a/lib/features/stories/presentation/pages/countries_page.dart +++ b/lib/features/stories/presentation/pages/countries_page.dart @@ -52,7 +52,7 @@ class _CountriesPageState extends State { leading: UniformBackButton(), title: Text( 'Countries', - textScaleFactor: 1.4, + textScaler: TextScaler.linear(1.4), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/lib/features/stories/presentation/pages/exchange_students_List.dart b/lib/features/stories/presentation/pages/exchange_students_List.dart index b7b81f10..010045e3 100644 --- a/lib/features/stories/presentation/pages/exchange_students_List.dart +++ b/lib/features/stories/presentation/pages/exchange_students_List.dart @@ -39,7 +39,7 @@ class ExchangeStudentsPage extends StatelessWidget { leading: UniformBackButton(), title: Text( country.name, - textScaleFactor: 1.5, + textScaler: TextScaler.linear(1.5), style: TextStyle( color: Palette.indigo, fontWeight: FontWeight.bold, diff --git a/lib/features/stories/presentation/pages/student_details.dart b/lib/features/stories/presentation/pages/student_details.dart index cba35426..782bd5e1 100644 --- a/lib/features/stories/presentation/pages/student_details.dart +++ b/lib/features/stories/presentation/pages/student_details.dart @@ -51,7 +51,7 @@ class _StoriesDisplayState extends State { leading: UniformBackButton(), title: Text( 'Rebounds', - textScaleFactor: 1.4, + textScaler: TextScaler.linear(1.4), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ), ), diff --git a/pubspec.yaml b/pubspec.yaml index ee2b6548..d206ece3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,7 +15,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 7.2.0+92 +version: 8.0.0+93 # authors: # - Ruben Talstra diff --git a/test/faq/presentation/pages/question_page.dart b/test/faq/presentation/pages/question_page.dart index 208d31fd..7538bb3b 100644 --- a/test/faq/presentation/pages/question_page.dart +++ b/test/faq/presentation/pages/question_page.dart @@ -16,16 +16,15 @@ class _QuestionPageState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - systemOverlayStyle: - MediaQuery.of(context).platformBrightness == Brightness.light - ? SystemUiOverlayStyle.dark - : SystemUiOverlayStyle.light, + systemOverlayStyle: SystemUiOverlayStyle( + statusBarBrightness: MediaQuery.of(context).platformBrightness, + ), backgroundColor: Colors.transparent, elevation: 0.0, centerTitle: false, title: Text( DemoLocalizations.of(context)!.trans('questionTitle'), - textScaleFactor: 1.7, + textScaler: TextScaler.linear(1.7), style: TextStyle(color: Palette.indigo, fontWeight: FontWeight.bold), ),