Changed App Name, and button splash in input

This commit is contained in:
2023-12-30 22:38:44 +02:00
parent 75e21261dc
commit d39a000fb7
9 changed files with 63 additions and 13 deletions

View File

@@ -1,7 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> <manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET"/>
<application <application
android:label="witl" android:label="WITL"
android:name="${applicationName}" android:name="${applicationName}"
android:icon="@mipmap/ic_launcher"> android:icon="@mipmap/ic_launcher">
<activity <activity

View File

@@ -5,7 +5,7 @@
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string> <string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key> <key>CFBundleDisplayName</key>
<string>Witl</string> <string>WITL</string>
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string> <string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
@@ -13,7 +13,7 @@
<key>CFBundleInfoDictionaryVersion</key> <key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string> <string>6.0</string>
<key>CFBundleName</key> <key>CFBundleName</key>
<string>witl</string> <string>WITL</string>
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>

View File

@@ -24,7 +24,8 @@ class _InputDataState extends State<InputData> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
title: const Text("Data Input"), // Naming the screen
title: const Text("Arrivals Input"),
), ),
body: Column( body: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
@@ -33,42 +34,53 @@ class _InputDataState extends State<InputData> {
const SizedBox(height: 15), const SizedBox(height: 15),
// Prompt Row
const Row( const Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Text("Line:"), Text("Line:"),
SizedBox(width: 35), SizedBox(width: 35),
Text("Colour:"), Text("Colour:"),
SizedBox(width: 25), SizedBox(width: 25),
], ],
), ),
// Checkbox Row
Row( Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
DropdownButton<int>( DropdownButton<int>(
value: selectedLine, value: selectedLine,
items: <int>[1, 2].map((int value) { items: <int>[1, 2].map((int value) {
return DropdownMenuItem<int>( return DropdownMenuItem<int>(
value: value, value: value,
child: Text(value.toString()), child: Text(value.toString()),
); );
}).toList(), }).toList(),
onChanged: (int? newLine) { onChanged: (int? newLine) {
setState(() { setState(() {
selectedLine = newLine ?? 1; // Set a default value if newLine is null selectedLine = newLine ?? 1; // Set a default value if newLine is null
}); });
}, },
), ),
const SizedBox(width: 30), const SizedBox(width: 30),
DropdownButton<String>( DropdownButton<String>(
value: selectedColor, value: selectedColor,
items: <String>['Blue', 'Yellow'].map((String value) { items: <String>['Blue', 'Yellow'].map((String value) {
return DropdownMenuItem<String>( return DropdownMenuItem<String>(
value: value, value: value,
child: Text(value), child: Text(value),
); );
}).toList(), }).toList(),
onChanged: (String? newCol) { onChanged: (String? newCol) {
setState(() { setState(() {
selectedColor = newCol ?? 'Blue'; // Set a default value if newCol is null selectedColor = newCol ?? 'Blue'; // Set a default value if newCol is null
@@ -82,6 +94,7 @@ class _InputDataState extends State<InputData> {
const Row( const Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Text("Direction:"), Text("Direction:"),
SizedBox(width: 20), SizedBox(width: 20),
@@ -90,15 +103,18 @@ class _InputDataState extends State<InputData> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
DropdownButton<String>( DropdownButton<String>(
value: selectedDirection, value: selectedDirection,
items: <String>['Raml', 'Victoria'].map((String value) { items: <String>['Raml', 'Victoria'].map((String value) {
return DropdownMenuItem<String>( return DropdownMenuItem<String>(
value: value, value: value,
child: Text(value), child: Text(value),
); );
}).toList(), }).toList(),
onChanged: (String? newEnd) { onChanged: (String? newEnd) {
setState(() { setState(() {
selectedDirection = newEnd ?? 'Victoria'; // Set a default value if newLine is null selectedDirection = newEnd ?? 'Victoria'; // Set a default value if newLine is null
@@ -111,6 +127,10 @@ class _InputDataState extends State<InputData> {
const SizedBox(height: 30), const SizedBox(height: 30),
InkWell( 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: () { onTap: () {
// Grab Data from Dropdowns // Grab Data from Dropdowns
selectedColor; // selectedColor; //
@@ -141,6 +161,7 @@ class _InputDataState extends State<InputData> {
//prompting of submission //prompting of submission
showAlertDialog(context, selectedLine, selectedColor, selectedDirection, userFormattedString); showAlertDialog(context, selectedLine, selectedColor, selectedDirection, userFormattedString);
}, },
child: Container( child: Container(
padding: const EdgeInsets.all(20.0), padding: const EdgeInsets.all(20.0),
child: const Text("Submit Arrival"), child: const Text("Submit Arrival"),
@@ -157,6 +178,7 @@ class _InputDataState extends State<InputData> {
(route) => false (route) => false
); );
}, },
child: Container( child: Container(
padding: const EdgeInsets.all(20.0), padding: const EdgeInsets.all(20.0),
child: const Text("Homescreen")), child: const Text("Homescreen")),
@@ -172,6 +194,7 @@ class _InputDataState extends State<InputData> {
(route) => false (route) => false
); );
}, },
child: Container( child: Container(
padding: const EdgeInsets.all(20.0), padding: const EdgeInsets.all(20.0),
child: const Text("Fetch Data")), child: const Text("Fetch Data")),
@@ -184,6 +207,9 @@ class _InputDataState extends State<InputData> {
showAlertDialog(BuildContext context, int chosenLine, String chosenColour, String chosenDir, String submissionDate) { 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 // set up the button
Widget okButton = TextButton( Widget okButton = TextButton(
child: const Text("Pogchamp"), child: const Text("Pogchamp"),

View File

@@ -4,7 +4,7 @@ project(runner LANGUAGES CXX)
# The name of the executable created for the application. Change this to change # The name of the executable created for the application. Change this to change
# the on-disk name of your application. # the on-disk name of your application.
set(BINARY_NAME "witl") set(BINARY_NAME "WITL")
# The unique GTK application identifier for this application. See: # The unique GTK application identifier for this application. See:
# https://wiki.gnome.org/HowDoI/ChooseApplicationID # https://wiki.gnome.org/HowDoI/ChooseApplicationID
set(APPLICATION_ID "com.example.witl") set(APPLICATION_ID "com.example.witl")

View File

@@ -5,7 +5,7 @@
// 'flutter create' template. // 'flutter create' template.
// The application's name. By default this is also the title of the Flutter window. // 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 // The application's bundle identifier
PRODUCT_BUNDLE_IDENTIFIER = com.example.witl PRODUCT_BUNDLE_IDENTIFIER = com.example.witl

View File

@@ -41,6 +41,22 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.3.0" 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: clock:
dependency: transitive dependency: transitive
description: description:
@@ -98,10 +114,10 @@ packages:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: flutter_launcher_icons name: flutter_launcher_icons
sha256: "559c600f056e7c704bd843723c21e01b5fba47e8824bd02422165bcc02a5de1d" sha256: "526faf84284b86a4cb36d20a5e45147747b7563d921373d4ee0559c54fcdbcea"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.9.3" version: "0.13.1"
flutter_lints: flutter_lints:
dependency: "direct dev" dependency: "direct dev"
description: description:
@@ -135,10 +151,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: image name: image
sha256: "8e9d133755c3e84c73288363e6343157c383a0c6c56fc51afcc5d4d7180306d6" sha256: "028f61960d56f26414eb616b48b04eb37d700cbe477b7fb09bf1d7ce57fd9271"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.3.0" version: "4.1.3"
intl: intl:
dependency: "direct main" dependency: "direct main"
description: description:
@@ -155,6 +171,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.6.7" 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: lints:
dependency: transitive dependency: transitive
description: description:

View File

@@ -42,7 +42,7 @@ dev_dependencies:
flutter_test: flutter_test:
sdk: flutter 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 # The "flutter_lints" package below contains a set of recommended lints to
# encourage good coding practices. The lint set provided by the package is # encourage good coding practices. The lint set provided by the package is

View File

@@ -29,7 +29,7 @@
<!-- Favicon --> <!-- Favicon -->
<link rel="icon" type="image/png" href="favicon.png"/> <link rel="icon" type="image/png" href="favicon.png"/>
<title>witl</title> <title>WITL</title>
<link rel="manifest" href="manifest.json"> <link rel="manifest" href="manifest.json">
<script> <script>

View File

@@ -27,7 +27,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
FlutterWindow window(project); FlutterWindow window(project);
Win32Window::Point origin(10, 10); Win32Window::Point origin(10, 10);
Win32Window::Size size(1280, 720); Win32Window::Size size(1280, 720);
if (!window.Create(L"witl", origin, size)) { if (!window.Create(L"WITL", origin, size)) {
return EXIT_FAILURE; return EXIT_FAILURE;
} }
window.SetQuitOnClose(true); window.SetQuitOnClose(true);