From d39a000fb75681c6ebdd2207bf4bb9380af2babd Mon Sep 17 00:00:00 2001 From: Supermjork Date: Sat, 30 Dec 2023 22:38:44 +0200 Subject: [PATCH] Changed App Name, and button splash in input --- android/app/src/main/AndroidManifest.xml | 2 +- ios/Runner/Info.plist | 4 +-- lib/input_data.dart | 28 ++++++++++++++++++++- linux/CMakeLists.txt | 2 +- macos/Runner/Configs/AppInfo.xcconfig | 2 +- pubspec.lock | 32 +++++++++++++++++++++--- pubspec.yaml | 2 +- web/index.html | 2 +- windows/runner/main.cpp | 2 +- 9 files changed, 63 insertions(+), 13 deletions(-) diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index cff34e9..eef684c 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,7 +1,7 @@ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleDisplayName - Witl + WITL CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -13,7 +13,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleName - witl + WITL CFBundlePackageType APPL CFBundleShortVersionString diff --git a/lib/input_data.dart b/lib/input_data.dart index 24f7949..e5bb40f 100644 --- a/lib/input_data.dart +++ b/lib/input_data.dart @@ -24,7 +24,8 @@ class _InputDataState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: const Text("Data Input"), + // Naming the screen + title: const Text("Arrivals Input"), ), body: Column( mainAxisAlignment: MainAxisAlignment.center, @@ -33,42 +34,53 @@ class _InputDataState extends State { const SizedBox(height: 15), + // Prompt Row const Row( mainAxisAlignment: MainAxisAlignment.center, children: [ Text("Line:"), + SizedBox(width: 35), + Text("Colour:"), + SizedBox(width: 25), ], ), + // Checkbox Row Row( mainAxisAlignment: MainAxisAlignment.center, children: [ DropdownButton( value: selectedLine, + items: [1, 2].map((int value) { return DropdownMenuItem( value: value, child: Text(value.toString()), ); }).toList(), + onChanged: (int? newLine) { setState(() { selectedLine = newLine ?? 1; // Set a default value if newLine is null }); }, ), + const SizedBox(width: 30), + DropdownButton( value: selectedColor, + items: ['Blue', 'Yellow'].map((String value) { return DropdownMenuItem( value: value, child: Text(value), ); }).toList(), + onChanged: (String? newCol) { setState(() { selectedColor = newCol ?? 'Blue'; // Set a default value if newCol is null @@ -82,6 +94,7 @@ class _InputDataState extends State { const Row( mainAxisAlignment: MainAxisAlignment.center, + children: [ Text("Direction:"), SizedBox(width: 20), @@ -90,15 +103,18 @@ class _InputDataState extends State { Row( mainAxisAlignment: MainAxisAlignment.center, + children: [ DropdownButton( value: selectedDirection, + items: ['Raml', 'Victoria'].map((String value) { return DropdownMenuItem( value: value, child: Text(value), ); }).toList(), + onChanged: (String? newEnd) { setState(() { selectedDirection = newEnd ?? 'Victoria'; // Set a default value if newLine is null @@ -111,6 +127,10 @@ class _InputDataState extends State { const SizedBox(height: 30), InkWell( + hoverDuration: const Duration(milliseconds: 450), + hoverColor: (selectedColor == "Blue") ? Colors.blue[500] : Colors.yellow[700], + borderRadius: BorderRadius.circular(30), + splashColor: (selectedColor == "Blue") ? Colors.blue[800] : Colors.yellow[700], onTap: () { // Grab Data from Dropdowns selectedColor; // @@ -141,6 +161,7 @@ class _InputDataState extends State { //prompting of submission showAlertDialog(context, selectedLine, selectedColor, selectedDirection, userFormattedString); }, + child: Container( padding: const EdgeInsets.all(20.0), child: const Text("Submit Arrival"), @@ -157,6 +178,7 @@ class _InputDataState extends State { (route) => false ); }, + child: Container( padding: const EdgeInsets.all(20.0), child: const Text("Homescreen")), @@ -172,6 +194,7 @@ class _InputDataState extends State { (route) => false ); }, + child: Container( padding: const EdgeInsets.all(20.0), child: const Text("Fetch Data")), @@ -184,6 +207,9 @@ class _InputDataState extends State { showAlertDialog(BuildContext context, int chosenLine, String chosenColour, String chosenDir, String submissionDate) { + // Delay (I want the splash to show) + //Future.delayed(const Duration(milliseconds: 200)); + // set up the button Widget okButton = TextButton( child: const Text("Pogchamp"), diff --git a/linux/CMakeLists.txt b/linux/CMakeLists.txt index 32b5de3..6f7dad9 100644 --- a/linux/CMakeLists.txt +++ b/linux/CMakeLists.txt @@ -4,7 +4,7 @@ project(runner LANGUAGES CXX) # The name of the executable created for the application. Change this to change # the on-disk name of your application. -set(BINARY_NAME "witl") +set(BINARY_NAME "WITL") # The unique GTK application identifier for this application. See: # https://wiki.gnome.org/HowDoI/ChooseApplicationID set(APPLICATION_ID "com.example.witl") diff --git a/macos/Runner/Configs/AppInfo.xcconfig b/macos/Runner/Configs/AppInfo.xcconfig index a9f5c93..2f3455d 100644 --- a/macos/Runner/Configs/AppInfo.xcconfig +++ b/macos/Runner/Configs/AppInfo.xcconfig @@ -5,7 +5,7 @@ // 'flutter create' template. // The application's name. By default this is also the title of the Flutter window. -PRODUCT_NAME = witl +PRODUCT_NAME = WITL // The application's bundle identifier PRODUCT_BUNDLE_IDENTIFIER = com.example.witl diff --git a/pubspec.lock b/pubspec.lock index 859d9da..13b4991 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -41,6 +41,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.0" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff + url: "https://pub.dev" + source: hosted + version: "2.0.3" + cli_util: + dependency: transitive + description: + name: cli_util + sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19 + url: "https://pub.dev" + source: hosted + version: "0.4.1" clock: dependency: transitive description: @@ -98,10 +114,10 @@ packages: dependency: "direct dev" description: name: flutter_launcher_icons - sha256: "559c600f056e7c704bd843723c21e01b5fba47e8824bd02422165bcc02a5de1d" + sha256: "526faf84284b86a4cb36d20a5e45147747b7563d921373d4ee0559c54fcdbcea" url: "https://pub.dev" source: hosted - version: "0.9.3" + version: "0.13.1" flutter_lints: dependency: "direct dev" description: @@ -135,10 +151,10 @@ packages: dependency: transitive description: name: image - sha256: "8e9d133755c3e84c73288363e6343157c383a0c6c56fc51afcc5d4d7180306d6" + sha256: "028f61960d56f26414eb616b48b04eb37d700cbe477b7fb09bf1d7ce57fd9271" url: "https://pub.dev" source: hosted - version: "3.3.0" + version: "4.1.3" intl: dependency: "direct main" description: @@ -155,6 +171,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.6.7" + json_annotation: + dependency: transitive + description: + name: json_annotation + sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 + url: "https://pub.dev" + source: hosted + version: "4.8.1" lints: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 7da9d0e..82fcca2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -42,7 +42,7 @@ dev_dependencies: flutter_test: sdk: flutter - flutter_launcher_icons: "^0.9.3" + flutter_launcher_icons: ^0.13.1 # The "flutter_lints" package below contains a set of recommended lints to # encourage good coding practices. The lint set provided by the package is diff --git a/web/index.html b/web/index.html index f2e2877..15db7f4 100644 --- a/web/index.html +++ b/web/index.html @@ -29,7 +29,7 @@ - witl + WITL