From 0ab095d42fe72504d05ed8b2fa0ccd49d4a3ce84 Mon Sep 17 00:00:00 2001 From: Wsutton424 Date: Mon, 24 Apr 2023 21:05:28 -0400 Subject: [PATCH] pdf and quiz fixes, efficiency -adjusted pdf and quiz functionality -cleaned up code for efficiency --- .../PDF/How-To-Get-Around-The-Island.md | 28 ++++++++++++++++--- app/lib/data/user.dart | 2 +- app/lib/screens/EditProfile.dart | 10 +++---- app/lib/screens/SearchScreen.dart | 1 - app/lib/screens/SignUpScreen.dart | 26 ++++------------- app/lib/screens/loginPage.dart | 5 +--- app/lib/screens/pages/result_page.dart | 4 +-- 7 files changed, 38 insertions(+), 38 deletions(-) diff --git a/app/Assets/PDF/How-To-Get-Around-The-Island.md b/app/Assets/PDF/How-To-Get-Around-The-Island.md index 67d9501..90e5804 100644 --- a/app/Assets/PDF/How-To-Get-Around-The-Island.md +++ b/app/Assets/PDF/How-To-Get-Around-The-Island.md @@ -2,17 +2,37 @@ How to Get Around the Island ================================================== -Pohnpei is a tropical Micronesian paradise that lies far from the trodden tourist trail. One of the rainiest and most remote places on Earth, the jungle-clad speck of green is a Garden of Eden that tourism forgot. +Pohnpei is a relatively small island with few paved roads making transportation tricky. Throw in the fact that it’s almost always raining, and you have yourself a transportation nightmare. +But do not fear, as there are a surprising number of economic options for getting around the island. +1. +Rental car +- +This is available from the airport and is relatively cheap however gas on the island is very expensive, so this is not the cheapest way around. +2. +Walking + – +This is the option lots of people take as the small island is easy to navigate on foot. +3. +Taxi +– +This is the best option for money and convenience as the fare is relatively cheap to get around the island and they can easily be called any time. -But for avid explorers and lovers of off-beat destinations, Pohnpei offers a diverse array of things to see and do---both above and below sea level. From ancient ruins to pristine mangrove forests and from gushing waterfalls to remote atolls, the Micronesian island is a wonderland of undiscovered gems.  [Marshall Islands](https://www.erikastravels.com/travel-marshall-islands-majuro-arno-atoll/) THINGS TO DO IN POHNPEI MICRONESIA ---------------------------------- -The Federated States of Micronesia (referred to as the FSM or Micronesia for short) are a cluster of islands spread out over the vast Pacific Ocean. Pohnpei---Micronesia's largest island---is a lush tangle of twisting vines and verdant rainforest. For those who can brave its sopping climate and frequent torrential downpours, it is a hiker's wonderland and an explorer's dream. +The Micronesian islands are a cluster of islands spread out over the vast Pacific Ocean. They are officially known as the Federated States of Micronesia or shortened to FSM. + +- + +POHNPEI: +Pohnpei, Micronesia's largest island, holds its capital. Most of the citizens speak the native language of Pohnpeian, English or some combination of the two as American military presence on the island brought the language along with missionaries of various different religions. + +- + +There are many different things to do in Pohnpei such as exploring the lush rainforests, swimming and surfing in the clear pacific ocean or exploring the ancient ruins of Nan Madol. ![Jungle Scenery Micronesia](https://www.erikastravels.com/wp-content/uploads/2019/09/Emerald-Isle-Micronesia.jpg) -Despite being situated.......................... \ No newline at end of file diff --git a/app/lib/data/user.dart b/app/lib/data/user.dart index 1ec9776..bcff47d 100644 --- a/app/lib/data/user.dart +++ b/app/lib/data/user.dart @@ -1 +1 @@ -final username = 'tatiana'; +const username = 'tatiana'; diff --git a/app/lib/screens/EditProfile.dart b/app/lib/screens/EditProfile.dart index 5313bc1..22d4a7b 100644 --- a/app/lib/screens/EditProfile.dart +++ b/app/lib/screens/EditProfile.dart @@ -20,7 +20,7 @@ class _MyGridViewState extends State { Widget build(BuildContext context) { return GridView.builder( physics: const NeverScrollableScrollPhysics(), - padding: EdgeInsets.all(30), + padding: const EdgeInsets.all(30), shrinkWrap: false, itemCount: profileImages.length, gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( @@ -120,15 +120,15 @@ class _EditProfilePageState extends State { onPressed: () => showDialog( context: context, builder: (context) => AlertDialog( - title: Text('Delete Account Confirmation'), - content: Text( + title: const Text('Delete Account Confirmation'), + content: const Text( 'Are you sure you want to delete your account? All data will be lost.'), actions: [ ElevatedButton( onPressed: () { Navigator.pop(context); }, - child: Text('Cancel')), + child: const Text('Cancel')), ElevatedButton( style: const ButtonStyle( backgroundColor: @@ -142,7 +142,7 @@ class _EditProfilePageState extends State { const LoginPage())) }); }, - child: Text('Delete and Sign Out')) + child: const Text('Delete and Sign Out')) ], ), ), diff --git a/app/lib/screens/SearchScreen.dart b/app/lib/screens/SearchScreen.dart index bd318a5..b690642 100644 --- a/app/lib/screens/SearchScreen.dart +++ b/app/lib/screens/SearchScreen.dart @@ -3,7 +3,6 @@ import 'package:flutter/services.dart'; import 'package:search_page/search_page.dart'; import 'package:pohnpeian_language_app/theme/style.dart' as customStyle; import 'package:url_launcher_platform_interface/url_launcher_platform_interface.dart'; -import 'package:flutter_pdfview/flutter_pdfview.dart'; import 'package:flutter_markdown/flutter_markdown.dart'; class SearchItem implements Comparable { diff --git a/app/lib/screens/SignUpScreen.dart b/app/lib/screens/SignUpScreen.dart index 9639e68..1b4278d 100644 --- a/app/lib/screens/SignUpScreen.dart +++ b/app/lib/screens/SignUpScreen.dart @@ -9,17 +9,9 @@ class SignUpPage extends StatelessWidget { const SignUpPage({Key? key}) : super(key: key); static const String _title = "Welcome to Pweek"; - static const Color a1 = Color.fromRGBO(117, 178, 221, .5); - static const Color a2 = Color.fromRGBO(117, 178, 221, .75); - static const Color a3 = Color.fromRGBO(117, 178, 221, 1.0); - static const Color b1 = Color.fromRGBO(45, 211, 112, .5); - static const Color b2 = Color.fromRGBO(45, 211, 112, .75); + static const Color b3 = Color.fromRGBO(45, 211, 112, 1.0); - static const Color c1 = Color.fromRGBO(38, 77, 105, .5); - static const Color c2 = Color.fromRGBO(38, 77, 105, .75); - static const Color c3 = Color.fromRGBO(38, 77, 105, 1.0); - static const Color d = Color.fromRGBO(146, 148, 156, 1.0); - static const background = Color.fromARGB(219, 39, 183, 196); + @override Widget build(BuildContext context) { @@ -55,17 +47,9 @@ class _SignUpPage extends State { TextEditingController cpasswordController = TextEditingController(); TextEditingController emailController = TextEditingController(); - static const a1 = Color.fromRGBO(117, 178, 221, .5); - static const a2 = Color.fromRGBO(117, 178, 221, .75); - static const a3 = Color.fromRGBO(117, 178, 221, 1.0); - static const b1 = Color.fromRGBO(45, 211, 112, .5); - static const b2 = Color.fromRGBO(45, 211, 112, .75); + static const b3 = Color.fromRGBO(45, 211, 112, 1.0); - static const c1 = Color.fromRGBO(38, 77, 105, .5); - static const c2 = Color.fromRGBO(38, 77, 105, .75); - static const c3 = Color.fromRGBO(38, 77, 105, 1.0); - static const d = Color.fromRGBO(146, 148, 156, 1.0); - static const background = Color.fromARGB(219, 39, 183, 196); + // Create a new user with Email and password using text inside the // Email and password controllers @@ -205,7 +189,7 @@ class _SignUpPage extends State { style: ElevatedButton.styleFrom( backgroundColor: (b3), ), - child: Text('Sign Up!'), + child: const Text('Sign Up!'), onPressed: () { if (passwordController.text.length < 6) { // Toast if password is too short diff --git a/app/lib/screens/loginPage.dart b/app/lib/screens/loginPage.dart index d1b4b0f..810ad0d 100644 --- a/app/lib/screens/loginPage.dart +++ b/app/lib/screens/loginPage.dart @@ -71,11 +71,8 @@ class _LoginPage extends State { TextEditingController passwordController = TextEditingController(); //The login button color - static const Color a = Color.fromRGBO(45, 211, 112, 1.0); static const Color b = Color.fromRGBO(45, 211, 112, 1.0); - //Sign up button color - static const Color c = Color.fromRGBO(45, 211, 112, 1.0); - static const Color d = Color.fromRGBO(45, 211, 112, 1.0); + @override Widget build(BuildContext context) { diff --git a/app/lib/screens/pages/result_page.dart b/app/lib/screens/pages/result_page.dart index f6366df..99f730c 100644 --- a/app/lib/screens/pages/result_page.dart +++ b/app/lib/screens/pages/result_page.dart @@ -130,8 +130,8 @@ class _ResultPageState extends State { Text("Your score: $_correctAnswer / $_totalQuestion"), const SizedBox(height: 16.0), ElevatedButton( - child: const Text('Retry Quiz'), - onPressed: () { + child: const Text('Return to Menu'), + onPressed: () { NavigatorState navigator = Navigator.of(context); for (int i = 0; i < _totalQuestion; i++) { if (!navigator.canPop()) break;