diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index cff34e9..b4dc8c2 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,9 +1,9 @@ + android:icon="@mipmap/launcher_icon"> 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/app_settings.dart b/lib/app_settings.dart new file mode 100644 index 0000000..245bdab --- /dev/null +++ b/lib/app_settings.dart @@ -0,0 +1,50 @@ +import 'package:flutter/material.dart'; +import 'package:witl/main.dart'; + +class Settings extends StatefulWidget { + const Settings({super.key}); + + @override + State createState() => _Settings(); +} + +class _Settings extends State { + late String selectedTheme = 'System Default'; // Default app theme + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text("Settings"), + ), + + body: ListView( + children:[ + // List of Tiles in the Settings Screen + // Starting with App Theme + ListTile( + title: const Text("App Theme"), + subtitle: const Text("Sets the theme of the app between: Dark, Light, System Default."), + // User Selection + trailing: DropdownButton ( + value: selectedTheme, + items: ["Light", "Dark", "System Default"].map((String value) { + return DropdownMenuItem( + value: value, + child: Text(value), + ); + }).toList(), + // Updating Selection + onChanged: (String? updatedTheme) { + setState(() { + selectedTheme = updatedTheme ?? selectedTheme; + MyApp.of(context).changeTheme(selectedTheme); + }); + }, + ), + ) + ], + ) + ); + } +} \ No newline at end of file diff --git a/lib/arrival.dart b/lib/arrival.dart index 1c3278c..ba949d3 100644 --- a/lib/arrival.dart +++ b/lib/arrival.dart @@ -13,9 +13,18 @@ class Arrival { factory Arrival.fromJson(Map json) { return Arrival( + // Key value + // : json[''] as + // Arrival Time timeOfDay: json['time_of_day'] as String, + + // Day 1 -> 7 !! Starting from Monday !! weekDay: json['week_day'] as int, + + // Line 1 or 2 tramLine: json['tram_line'] as int, + + // True -> Raml, False -> Victoria direction: json['direction'] as bool, ); } diff --git a/lib/arrival_fetch.dart b/lib/arrival_fetch.dart index e7bd392..2262d83 100644 --- a/lib/arrival_fetch.dart +++ b/lib/arrival_fetch.dart @@ -6,18 +6,16 @@ import 'package:witl/arrival.dart'; Future> fetchArrivals() async { try { + // Grabbing http reponse final response = await http.get(Uri.parse('http://141.144.238.26:48502/arrivals/all')); if (response.statusCode == 200) { - // List data = jsonDecode(response.body); - // List arrivals = List.from(data.map((dynamic arrivalJson) { - // return Arrival.fromJson(arrivalJson); - // })); + // Some JSON fuckery xd Iterable I = json.decode(response.body); List arrivals = List.from(I.map((model)=>Arrival.fromJson(model))); return arrivals.reversed.toList(); } else { - throw Exception('Failed to load Arrival'); + throw Exception('Failed to load Arrivals list'); } } catch (error) { throw Exception('Failed to fetch data: $error'); diff --git a/lib/arrival_post.dart b/lib/arrival_post.dart index eb5c6b7..cdd3cbe 100644 --- a/lib/arrival_post.dart +++ b/lib/arrival_post.dart @@ -4,22 +4,33 @@ import 'package:http/http.dart' as http; import 'package:witl/arrival.dart'; Future insertArrival(String date, int weekday, int line, bool direction) async { - final response = await http.post( - Uri.parse('http://141.144.238.26:48502/arrivals/insert'), - headers: { - 'Content-Type': 'application/json; charset=UTF-8', - }, - body: jsonEncode( { - 'time_of_day': date, - 'week_day': weekday, - 'tram_line': line, - 'direction': direction, - }) - ); + final client = http.Client(); - if (response.statusCode == 201) { - return Arrival.fromJson(jsonDecode(response.body) as Map); - } else { - throw Exception('Insertion Failure.'); + try { + // POST response as JSON + final response = await client.post( + Uri.parse('http://141.144.238.26:48502/arrivals/insert'), + headers: { + // Headers used + 'Content-Type': 'application/json; charset=UTF-8', + }, + // Encoding a singular json entry + body: jsonEncode( { + 'time_of_day': date, + 'week_day': weekday, + 'tram_line': line, + 'direction': direction, + }) + ).timeout(const Duration(seconds: 10)); + + if (response.statusCode == 201) { + return Arrival.fromJson(jsonDecode(response.body) as Map); + } else { + throw Exception('Insertion Failure.'); + } + } catch (error) { + throw Exception("Error Posting: $error"); + } finally { + client.close(); } } \ No newline at end of file diff --git a/lib/fetcher.dart b/lib/fetcher.dart index 5d8d651..723d518 100644 --- a/lib/fetcher.dart +++ b/lib/fetcher.dart @@ -16,8 +16,9 @@ class _FetchAPIState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: const Text("Fetching API"), + title: const Text("Fetched Arrivals"), actions: [ + // Refresh fetched list IconButton( onPressed: () { setState(() { @@ -26,10 +27,12 @@ class _FetchAPIState extends State { }, icon: const Icon(Icons.refresh_sharp), ), - const SizedBox(width: 30,), ], ), + // RefreshIndicator is used so that user can pull down + // in order to update instead of pressing the refresh button body: RefreshIndicator( + // Method to Use no argument parenthesis onRefresh: _refreshData, child: Column( mainAxisAlignment: MainAxisAlignment.start, @@ -40,17 +43,40 @@ class _FetchAPIState extends State { future: fetchedArrivals, builder: (context, snapshot) { if (snapshot.connectionState == ConnectionState.waiting) { - return const CircularProgressIndicator(); + return Center( + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + height: MediaQuery. of(context). size. height / 2, + width: MediaQuery. of(context). size. width / 3, + + child: const CircularProgressIndicator(), + ), + ], + ), + ], + ), + ); } else if (snapshot.hasError) { return Text('Failed to fetch data.\nError: ${snapshot.error}'); } else { return ListView.builder( + // List items to display itemCount: snapshot.data!.length, + // Building them itemBuilder: (context, index) { return ListTile( + // Really should be more informative about what's displayed title: Text("Arrival Time: ${snapshot.data![index].timeOfDay}"), titleAlignment: ListTileTitleAlignment.center, subtitle: Text("Week Day: ${weekNumToString(snapshot.data![index].weekDay)}"), + onTap: () => { + showArrivalInfo(context, snapshot.data![index]) + }, ); }, ); @@ -59,10 +85,16 @@ class _FetchAPIState extends State { ), ), ), + const SizedBox(height: 30,), + InkWell( + // Navigating Home onTap: () { - Navigator.pushNamedAndRemoveUntil(context, '/', (route) => false); + Navigator.pushNamedAndRemoveUntil( + context, + '/home', + (route) => false); }, child: Container( padding: const EdgeInsets.all(20.0), @@ -78,6 +110,7 @@ class _FetchAPIState extends State { Future _refreshData() async { setState(() { + // Refresh arrivals list by invoking the fetch method fetchedArrivals = fetchArrivals(); }); } @@ -89,6 +122,33 @@ class _FetchAPIState extends State { } } +showArrivalInfo(BuildContext context, Arrival data) { + // set up the button + Widget okButton = TextButton( + child: const Text("Back"), + onPressed: () { + Navigator.pop(context); + }, + ); + + // set up the AlertDialog + AlertDialog alert = AlertDialog( + title: const Text("Selected Arrival Info"), + content: Text("Tram Colour: JSON DOESN'T HAVE COLOUR\n\nChosen Line: ${lineShift(data.tramLine)}\n\nDirection: ${directionParse(data.direction)}\n\nSubmitted On: ${data.timeOfDay} (Needs to include date)"), + actions: [ + okButton, + ], + ); + + // show the dialogue + showDialog( + context: context, + builder: (BuildContext context) { + return alert; + }, + ); +} + String weekNumToString(int weekday) { switch (weekday) { case 1: @@ -107,5 +167,25 @@ String weekNumToString(int weekday) { return "Sunday"; } - throw "AAAAAAAAA"; + throw "Week Day Parse Error"; } + +String directionParse(bool direction) { + switch (direction) { + case true: + return "Raml"; + case false: + return "Victoria"; + } +} + +int lineShift(int line) { + switch (line) { + case 3: + return 1; + case 4: + return 2; + default: + return line; + } +} \ No newline at end of file diff --git a/lib/home_screen.dart b/lib/home_screen.dart index d01fa8c..3bc1c70 100644 --- a/lib/home_screen.dart +++ b/lib/home_screen.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:witl/fetcher.dart'; import 'package:witl/input_data.dart'; +import 'package:witl/app_settings.dart'; class HomeScreen extends StatelessWidget { const HomeScreen({super.key}); @@ -12,12 +13,44 @@ class HomeScreen extends StatelessWidget { title: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Image.asset('assets/images/choo.png', - fit: BoxFit.contain, - height: 64, + // Hamburbur menu + IconButton( + onPressed: () { + + }, + icon: const Icon(Icons.menu_sharp) ), - const SizedBox(width: 10,), + + // Space + // const SizedBox(width: 30,), + + // Our Amazing Logo + // Image.asset('assets/images/choo.png', + // fit: BoxFit.contain, + // height: 64, + // ), + + // Spacing + // const SizedBox(width: 10,), + + const Expanded(child: SizedBox()), + + // App Title const Text("WITL"), + + // Fill out the area blankly + // So that the icon can be shoved far right + const Expanded(child: SizedBox(),), + + // Navigate to Settings + IconButton( + onPressed: () { + Navigator.push( + context, + MaterialPageRoute(builder: (context) => const Settings()) + ); + }, + icon: const Icon(Icons.settings)), ] ), ), @@ -27,12 +60,15 @@ class HomeScreen extends StatelessWidget { const Row( mainAxisAlignment: MainAxisAlignment.center, children:[ + // Our Motto (?) Text("We may not be able to tell you why.\nBut surely are able to predict when."), ], ), + // Spacing const SizedBox(height: 80), + // To the fetching screen InkWell( onTap:() { Navigator.push( @@ -48,6 +84,7 @@ class HomeScreen extends StatelessWidget { const SizedBox(height: 30), + // To Data Input InkWell( onTap:() { Navigator.push( diff --git a/lib/input_data.dart b/lib/input_data.dart index 24f7949..4a0667b 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,18 +103,21 @@ 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 + selectedDirection = newEnd ?? selectedDirection; // 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; // @@ -139,8 +159,9 @@ class _InputDataState extends State { insertArrival('${now.hour}:${now.minute}:${now.second}', now.weekday, selectedLine, payloadDirection); //prompting of submission - showAlertDialog(context, selectedLine, selectedColor, selectedDirection, userFormattedString); + showSubmissionSuccess(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")), @@ -182,7 +205,10 @@ class _InputDataState extends State { } } -showAlertDialog(BuildContext context, int chosenLine, String chosenColour, String chosenDir, String submissionDate) { +showSubmissionSuccess(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( @@ -190,7 +216,7 @@ showAlertDialog(BuildContext context, int chosenLine, String chosenColour, Strin onPressed: () { Navigator.pushNamedAndRemoveUntil( context, - '/', + '/home', (route) => false); }, ); diff --git a/lib/main.dart b/lib/main.dart index e87baf2..54429ea 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,36 +1,86 @@ import 'package:flutter/material.dart'; +import 'package:witl/app_settings.dart'; import 'package:witl/fetcher.dart'; import 'package:witl/home_screen.dart'; import 'package:witl/input_data.dart'; void main() => runApp(const MyApp()); -class MyApp extends StatelessWidget { +class MyApp extends StatefulWidget { const MyApp({super.key}); + @override + State createState() => MyAppState(); + + static MyAppState of(BuildContext context) => + context.findAncestorStateOfType()!; +} + +class MyAppState extends State { + ThemeMode _theme = ThemeMode.system; + @override Widget build(BuildContext context) { return MaterialApp( - title: "Entry Point", + title: "WITL App", theme: ThemeData( primarySwatch: Colors.blue, + primaryColor: Colors.white, + brightness: Brightness.light, + dividerColor: Colors.white54, + scaffoldBackgroundColor: Colors.white, ), + darkTheme: ThemeData( + primarySwatch: Colors.blue, + primaryColor: Colors.black, + brightness: Brightness.dark, + dividerColor: Colors.white38, + scaffoldBackgroundColor: const Color(0xFF131313), + ), + + themeMode: _theme, + // Navigashun with Routes // Base "Home" Route - initialRoute: '/', + initialRoute: '/home', // Possible Routes routes: { + // Login (Eventually) + //'/login': (context) => const LogIn(), + + // Signup (Also eventually xd) + //'/login/signup': (context) => const SignUp(), + // Homescreen - '/': (context) => const HomeScreen(), + '/home': (context) => const HomeScreen(), // Fetching API Data '/fetch': (context) => const FetchAPI(), // User Input '/input': (context) => const InputData(), + + // Settings + '/settings': (context) => const Settings(), }, ); } + + void changeTheme(String newTheme) { + setState(() { + switch(newTheme) { + case "Light": + _theme = ThemeMode.light; + break; + case "Dark": + _theme = ThemeMode.dark; + break; + case "System Default": + _theme = ThemeMode.system; + break; + } + }); + } } 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/Assets.xcassets/AppIcon.appiconset/Contents.json b/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json index a2ec33f..96d3fee 100644 --- a/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,68 +1,68 @@ { - "images" : [ - { - "size" : "16x16", - "idiom" : "mac", - "filename" : "app_icon_16.png", - "scale" : "1x" + "info": { + "version": 1, + "author": "xcode" }, - { - "size" : "16x16", - "idiom" : "mac", - "filename" : "app_icon_32.png", - "scale" : "2x" - }, - { - "size" : "32x32", - "idiom" : "mac", - "filename" : "app_icon_32.png", - "scale" : "1x" - }, - { - "size" : "32x32", - "idiom" : "mac", - "filename" : "app_icon_64.png", - "scale" : "2x" - }, - { - "size" : "128x128", - "idiom" : "mac", - "filename" : "app_icon_128.png", - "scale" : "1x" - }, - { - "size" : "128x128", - "idiom" : "mac", - "filename" : "app_icon_256.png", - "scale" : "2x" - }, - { - "size" : "256x256", - "idiom" : "mac", - "filename" : "app_icon_256.png", - "scale" : "1x" - }, - { - "size" : "256x256", - "idiom" : "mac", - "filename" : "app_icon_512.png", - "scale" : "2x" - }, - { - "size" : "512x512", - "idiom" : "mac", - "filename" : "app_icon_512.png", - "scale" : "1x" - }, - { - "size" : "512x512", - "idiom" : "mac", - "filename" : "app_icon_1024.png", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} + "images": [ + { + "size": "16x16", + "idiom": "mac", + "filename": "app_icon_16.png", + "scale": "1x" + }, + { + "size": "16x16", + "idiom": "mac", + "filename": "app_icon_32.png", + "scale": "2x" + }, + { + "size": "32x32", + "idiom": "mac", + "filename": "app_icon_32.png", + "scale": "1x" + }, + { + "size": "32x32", + "idiom": "mac", + "filename": "app_icon_64.png", + "scale": "2x" + }, + { + "size": "128x128", + "idiom": "mac", + "filename": "app_icon_128.png", + "scale": "1x" + }, + { + "size": "128x128", + "idiom": "mac", + "filename": "app_icon_256.png", + "scale": "2x" + }, + { + "size": "256x256", + "idiom": "mac", + "filename": "app_icon_256.png", + "scale": "1x" + }, + { + "size": "256x256", + "idiom": "mac", + "filename": "app_icon_512.png", + "scale": "2x" + }, + { + "size": "512x512", + "idiom": "mac", + "filename": "app_icon_512.png", + "scale": "1x" + }, + { + "size": "512x512", + "idiom": "mac", + "filename": "app_icon_1024.png", + "scale": "2x" + } + ] +} \ No newline at end of file diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png index 82b6f9d..35e4944 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png index 13b35eb..01a51be 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png index 0a3f5fa..fb2591a 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png index bdb5722..facd0e5 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png index f083318..8d42c29 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png index 326c0e7..0ddc2de 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png index 2f1632c..dfd838e 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png differ 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..feeee13 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 @@ -51,10 +51,23 @@ dev_dependencies: # rules and activating additional ones. flutter_lints: ^3.0.1 -flutter_icons: - image_path: "assets/images/choo.png" - android: true +flutter_launcher_icons: + android: "launcher_icon" ios: true + image_path: "assets/images/choo.png" + min_sdk_android: 21 # android min sdk min:16, default 21 + web: + generate: true + image_path: "assets/images/choo.png" + background_color: "#FFFFFF" + theme_color: "#FFFFFF" + windows: + generate: true + image_path: "assets/images/choo.png" + icon_size: 48 # min:48, max:256, default: 48 + macos: + generate: true + image_path: "assets/images/choo.png" # For information on the generic Dart part of this file, see the diff --git a/web/favicon.png b/web/favicon.png index 8aaa46a..fb2591a 100644 Binary files a/web/favicon.png and b/web/favicon.png differ diff --git a/web/icons/Icon-192.png b/web/icons/Icon-192.png index b749bfe..0becd2e 100644 Binary files a/web/icons/Icon-192.png and b/web/icons/Icon-192.png differ diff --git a/web/icons/Icon-512.png b/web/icons/Icon-512.png index 88cfd48..0ddc2de 100644 Binary files a/web/icons/Icon-512.png and b/web/icons/Icon-512.png differ diff --git a/web/icons/Icon-maskable-192.png b/web/icons/Icon-maskable-192.png index eb9b4d7..0becd2e 100644 Binary files a/web/icons/Icon-maskable-192.png and b/web/icons/Icon-maskable-192.png differ diff --git a/web/icons/Icon-maskable-512.png b/web/icons/Icon-maskable-512.png index d69c566..0ddc2de 100644 Binary files a/web/icons/Icon-maskable-512.png and b/web/icons/Icon-maskable-512.png differ 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