rename frontend components to anyway

This commit is contained in:
Remy Moll 2024-07-30 22:49:28 +02:00
parent 889b6c2096
commit db82495f11
32 changed files with 121 additions and 69 deletions

View File

@ -42,7 +42,7 @@ if (secretPropertiesFile.exists()) {
android {
namespace "com.example.fast_network_navigation"
namespace "com.anydev.anyway"
compileSdk flutter.compileSdkVersion
ndkVersion flutter.ndkVersion
@ -61,7 +61,7 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.fast_network_navigation"
applicationId "com.example.anyway"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
// Minimum Android version for Google Maps SDK

View File

@ -3,7 +3,7 @@
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:label="fast_network_navigation"
android:label="anyway"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
<activity

View File

@ -1,4 +1,4 @@
package com.example.fast_network_navigation
package com.example.anyway
import io.flutter.embedding.android.FlutterActivity

View File

@ -13,7 +13,7 @@
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>fast_network_navigation</string>
<string>anyway</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>

View File

@ -0,0 +1,4 @@
const String APP_NAME = 'AnyWay';
const String API_URL_BASE = 'https://anyway.kluster.moll.re';

View File

@ -1,12 +1,15 @@
import 'package:fast_network_navigation/modules/trips_overview.dart';
import 'package:fast_network_navigation/pages/new_trip.dart';
import 'package:fast_network_navigation/pages/tutorial.dart';
import 'package:fast_network_navigation/structs/trip.dart';
import 'package:fast_network_navigation/utils/load_trips.dart';
import 'package:flutter/material.dart';
import 'package:fast_network_navigation/pages/overview.dart';
import 'package:fast_network_navigation/pages/profile.dart';
import 'package:anyway/constants.dart';
import 'package:anyway/structs/trip.dart';
import 'package:anyway/modules/trips_overview.dart';
import 'package:anyway/utils/load_trips.dart';
import 'package:anyway/pages/new_trip.dart';
import 'package:anyway/pages/tutorial.dart';
import 'package:anyway/pages/overview.dart';
import 'package:anyway/pages/profile.dart';
// BasePage is the scaffold that holds all other pages
// A side drawer is used to switch between pages
@ -43,7 +46,7 @@ class _BasePageState extends State<BasePage> {
final ThemeData theme = Theme.of(context);
return Scaffold(
appBar: AppBar(title: Text("City Nav")),
appBar: AppBar(title: Text(APP_NAME)),
body: Center(child: currentView),
drawer: Drawer(
child: Column(
@ -54,7 +57,7 @@ class _BasePageState extends State<BasePage> {
),
child: Center(
child: Text(
'City Nav',
APP_NAME,
style: TextStyle(
color: Colors.white,
fontSize: 24,

View File

@ -1,17 +1,17 @@
import 'package:flutter/material.dart';
import 'package:fast_network_navigation/layout.dart';
import 'package:anyway/constants.dart';
import 'package:anyway/layout.dart';
void main() => runApp(const App());
class App extends StatelessWidget {
const App({super.key});
static const appTitle = 'City Nav';
@override
Widget build(BuildContext context) {
return MaterialApp(
title: appTitle,
title: APP_NAME,
home: BasePage(mainScreen: "map"),
theme: ThemeData(useMaterial3: true, colorSchemeSeed: Colors.green),
);

View File

@ -1,4 +1,4 @@
import 'package:fast_network_navigation/structs/trip.dart';
import 'package:anyway/structs/trip.dart';
import 'package:flutter/material.dart';

View File

@ -1,4 +1,4 @@
import 'package:fast_network_navigation/structs/landmark.dart';
import 'package:anyway/structs/landmark.dart';
import 'package:flutter/material.dart';

View File

@ -1,9 +1,9 @@
import 'dart:collection';
import 'package:fast_network_navigation/modules/landmark_card.dart';
import 'package:fast_network_navigation/structs/landmark.dart';
import 'package:anyway/modules/landmark_card.dart';
import 'package:anyway/structs/landmark.dart';
import 'package:fast_network_navigation/structs/trip.dart';
import 'package:anyway/structs/trip.dart';
import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';
@ -71,8 +71,34 @@ class _LandmarksOverviewState extends State<LandmarksOverview> {
Widget landmarksWithSteps(LinkedList<Landmark> landmarks) {
List<Widget> children = [];
int lkey = 0;
for (Landmark landmark in landmarks) {
children.add(LandmarkCard(landmark));
children.add(
Dismissible(
key: ValueKey<int>(lkey),
child: LandmarkCard(landmark),
// onDismissed: (direction) {
// // Remove the item from the data source.
// setState(() {
// landmarks.remove(landmark);
// });
// // Then show a snackbar.
// ScaffoldMessenger.of(context)
// .showSnackBar(SnackBar(content: Text("${landmark.name} dismissed")));
// },
background: Container(color: Colors.red),
secondaryBackground: Container(
color: Colors.red,
child: Icon(
Icons.delete,
color: Colors.white,
),
padding: EdgeInsets.all(15),
alignment: Alignment.centerRight,
),
)
);
lkey++;
if (landmark.next != null) {
Widget step = stepBetweenLandmarks(landmark, landmark.next!);
children.add(step);

View File

@ -1,7 +1,7 @@
import 'dart:collection';
import 'package:fast_network_navigation/structs/landmark.dart';
import 'package:fast_network_navigation/structs/trip.dart';
import 'package:anyway/structs/landmark.dart';
import 'package:anyway/structs/trip.dart';
import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';

View File

@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:fast_network_navigation/layout.dart';
import 'package:fast_network_navigation/structs/trip.dart';
import 'package:anyway/layout.dart';
import 'package:anyway/structs/trip.dart';
class TripsOverview extends StatefulWidget {

View File

@ -1,11 +1,11 @@
import 'package:flutter/material.dart';
import 'package:sliding_up_panel/sliding_up_panel.dart';
import 'package:fast_network_navigation/structs/trip.dart';
import 'package:anyway/structs/trip.dart';
import 'package:fast_network_navigation/modules/landmarks_overview.dart';
import 'package:fast_network_navigation/modules/map.dart';
import 'package:fast_network_navigation/modules/greeter.dart';
import 'package:anyway/modules/landmarks_overview.dart';
import 'package:anyway/modules/map.dart';
import 'package:anyway/modules/greeter.dart';

View File

@ -1,4 +1,4 @@
import 'package:fast_network_navigation/structs/preferences.dart';
import 'package:anyway/structs/preferences.dart';
import 'package:flutter/material.dart';

View File

@ -1,4 +1,4 @@
// import "package:fast_network_navigation/structs/landmark.dart";
// import "package:anyway/structs/landmark.dart";
// class Linked<Landmark> {
// Landmark? head;

View File

@ -1,4 +1,4 @@
import "package:fast_network_navigation/structs/landmark.dart";
import "package:anyway/structs/landmark.dart";
class Route {

View File

@ -4,7 +4,7 @@
import 'dart:collection';
import 'dart:convert';
import 'package:fast_network_navigation/structs/landmark.dart';
import 'package:anyway/structs/landmark.dart';
import 'package:shared_preferences/shared_preferences.dart';
class Trip {

View File

@ -1,6 +1,8 @@
// import "package:fast_network_navigation/structs/landmark.dart";
// import 'package:http/http.dart' as http;
import "package:anyway/structs/landmark.dart";
import "package:anyway/structs/linked_landmarks.dart";
import 'package:dio/dio.dart';
final dio = Dio();
// Future<List<Landmark>> fetchLandmarks() async {
// // final response = await http

View File

@ -1,7 +1,7 @@
import 'dart:collection';
import 'package:fast_network_navigation/structs/trip.dart';
import 'package:fast_network_navigation/structs/landmark.dart';
import 'package:anyway/structs/trip.dart';
import 'package:anyway/structs/landmark.dart';
import 'package:shared_preferences/shared_preferences.dart';
Future<List<Trip>> loadTrips() async {

View File

@ -4,10 +4,10 @@ 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 "fast_network_navigation")
set(BINARY_NAME "anyway")
# The unique GTK application identifier for this application. See:
# https://wiki.gnome.org/HowDoI/ChooseApplicationID
set(APPLICATION_ID "com.example.fast_network_navigation")
set(APPLICATION_ID "com.example.anyway")
# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
# versions of CMake.

View File

@ -40,11 +40,11 @@ static void my_application_activate(GApplication* application) {
if (use_header_bar) {
GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new());
gtk_widget_show(GTK_WIDGET(header_bar));
gtk_header_bar_set_title(header_bar, "fast_network_navigation");
gtk_header_bar_set_title(header_bar, "anyway");
gtk_header_bar_set_show_close_button(header_bar, TRUE);
gtk_window_set_titlebar(window, GTK_WIDGET(header_bar));
} else {
gtk_window_set_title(window, "fast_network_navigation");
gtk_window_set_title(window, "anyway");
}
gtk_window_set_default_size(window, 1280, 720);

View File

@ -64,7 +64,7 @@
331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; };
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; };
33CC10ED2044A3C60003C045 /* fast_network_navigation.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "fast_network_navigation.app"; sourceTree = BUILT_PRODUCTS_DIR; };
33CC10ED2044A3C60003C045 /* anyway.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "anyway.app"; sourceTree = BUILT_PRODUCTS_DIR; };
33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = "<group>"; };
33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
@ -131,7 +131,7 @@
33CC10EE2044A3C60003C045 /* Products */ = {
isa = PBXGroup;
children = (
33CC10ED2044A3C60003C045 /* fast_network_navigation.app */,
33CC10ED2044A3C60003C045 /* anyway.app */,
331C80D5294CF71000263BE5 /* RunnerTests.xctest */,
);
name = Products;
@ -217,7 +217,7 @@
);
name = Runner;
productName = Runner;
productReference = 33CC10ED2044A3C60003C045 /* fast_network_navigation.app */;
productReference = 33CC10ED2044A3C60003C045 /* anyway.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
@ -388,7 +388,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.example.fastNetworkNavigation.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/fast_network_navigation.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/fast_network_navigation";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/anyway.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/anyway";
};
name = Debug;
};
@ -402,7 +402,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.example.fastNetworkNavigation.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/fast_network_navigation.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/fast_network_navigation";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/anyway.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/anyway";
};
name = Release;
};
@ -416,7 +416,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.example.fastNetworkNavigation.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/fast_network_navigation.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/fast_network_navigation";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/anyway.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/anyway";
};
name = Profile;
};

View File

@ -15,7 +15,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
BuildableName = "fast_network_navigation.app"
BuildableName = "anyway.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
@ -31,7 +31,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
BuildableName = "fast_network_navigation.app"
BuildableName = "anyway.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
@ -65,7 +65,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
BuildableName = "fast_network_navigation.app"
BuildableName = "anyway.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
@ -82,7 +82,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
BuildableName = "fast_network_navigation.app"
BuildableName = "anyway.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>

View File

@ -5,7 +5,7 @@
// 'flutter create' template.
// The application's name. By default this is also the title of the Flutter window.
PRODUCT_NAME = fast_network_navigation
PRODUCT_NAME = anyway
// The application's bundle identifier
PRODUCT_BUNDLE_IDENTIFIER = com.example.fastNetworkNavigation

View File

@ -57,6 +57,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.8"
dio:
dependency: "direct main"
description:
name: dio
sha256: e17f6b3097b8c51b72c74c9f071a605c47bcc8893839bd66732457a5ebe73714
url: "https://pub.dev"
source: hosted
version: "5.5.0+1"
dio_web_adapter:
dependency: transitive
description:
name: dio_web_adapter
sha256: "36c5b2d79eb17cdae41e974b7a8284fec631651d2a6f39a8a2ff22327e90aeac"
url: "https://pub.dev"
source: hosted
version: "1.0.1"
fake_async:
dependency: transitive
description:

View File

@ -1,5 +1,5 @@
name: "fast_network_navigation"
description: "An interactive city navigator."
name: "anyway"
description: "A customizable, agile city navigator for your trips."
# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
@ -39,6 +39,7 @@ dependencies:
google_maps_flutter: ^2.6.1
http: ^1.2.1
shared_preferences: ^2.2.3
dio: ^5.5.0+1
dev_dependencies:
flutter_test:

View File

@ -8,8 +8,8 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
// import 'package:fast_network_navigation/main.dart';
import 'package:fast_network_navigation/layout.dart';
// import 'package:anyway/main.dart';
import 'package:anyway/layout.dart';
void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {

View File

@ -24,13 +24,13 @@
<!-- iOS meta tags & icons -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="fast_network_navigation">
<meta name="apple-mobile-web-app-title" content="anyway">
<link rel="apple-touch-icon" href="icons/Icon-192.png">
<!-- Favicon -->
<link rel="icon" type="image/png" href="favicon.png"/>
<title>fast_network_navigation</title>
<title>anyway</title>
<link rel="manifest" href="manifest.json">
<script>

View File

@ -1,6 +1,6 @@
{
"name": "fast_network_navigation",
"short_name": "fast_network_navigation",
"name": "anyway",
"short_name": "anyway",
"start_url": ".",
"display": "standalone",
"background_color": "#0175C2",

View File

@ -1,10 +1,10 @@
# Project-level configuration.
cmake_minimum_required(VERSION 3.14)
project(fast_network_navigation LANGUAGES CXX)
project(anyway 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 "fast_network_navigation")
set(BINARY_NAME "anyway")
# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
# versions of CMake.

View File

@ -90,12 +90,12 @@ BEGIN
BLOCK "040904e4"
BEGIN
VALUE "CompanyName", "com.example" "\0"
VALUE "FileDescription", "fast_network_navigation" "\0"
VALUE "FileDescription", "anyway" "\0"
VALUE "FileVersion", VERSION_AS_STRING "\0"
VALUE "InternalName", "fast_network_navigation" "\0"
VALUE "InternalName", "anyway" "\0"
VALUE "LegalCopyright", "Copyright (C) 2024 com.example. All rights reserved." "\0"
VALUE "OriginalFilename", "fast_network_navigation.exe" "\0"
VALUE "ProductName", "fast_network_navigation" "\0"
VALUE "OriginalFilename", "anyway.exe" "\0"
VALUE "ProductName", "anyway" "\0"
VALUE "ProductVersion", VERSION_AS_STRING "\0"
END
END

View File

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