Skip to content

Commit

Permalink
v1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Lowa committed May 31, 2024
1 parent 89c83c4 commit 4a65900
Show file tree
Hide file tree
Showing 31 changed files with 580 additions and 396 deletions.
Binary file modified assets/fonts/NavikaIcons.ttf
Binary file not shown.
3 changes: 2 additions & 1 deletion l10n.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
arb-dir: lib/l10n
template-arb-file: app_fr.arb
output-localization-file: app_localizations.dart
output-localization-file: app_localizations.dart
untranslated-messages-file: out.txt
11 changes: 7 additions & 4 deletions lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
"saved_route": "Saved route, details are now available even offline.",
"where_to_board": "Where to board?",
"routes": "Routes",
"your_favorites": "Your favourites",
"no_saved_routes": "No saved routes.",
"go": "Go",
"edit_route": "Edit route",
Expand Down Expand Up @@ -158,6 +159,7 @@
"your_position": "Your position",
"where_are_we_departing_from": "Where are we departing from?",
"where_are_we_going": "Where are we going?",
"home_search": "Where are we going? Find an address, a station...",
"undefined_address_or_label": "Undefined address or label",
"home": "Home",
"nearby": "Nearby",
Expand Down Expand Up @@ -232,6 +234,8 @@
"new_departure_station": "New departure station",
"exceptional_terminus": "Exceptional terminus",
"exceptional_terminus_short": "Exceptional term.",
"modified_train": "Service modified",
"modified_train_short": "Modified",
"timetable_sheet": "Timetable sheet",
"today": "Today",
"tomorrow": "Tomorrow",
Expand All @@ -240,7 +244,6 @@
"search": "Search",
"search_line": "Search for a line",
"recent": "Recent",
"search_location_on_map": "Search for a location on the map",
"server_not_responding": "Server not responding",
"avoid_line": "Avoid a line?",
"avoid": "Avoid",
Expand All @@ -255,8 +258,8 @@
"traffic": "Traffic",
"add_stop_to_favorites": "Add a stop to your favorites to access your timetables faster.",
"favorite_deletion_error": "Error occurred while deleting the favorite.",

"line_details": "Line details",
"no_work_scheduled": "No work planned at this date",
"choose_display_mode": "Set your preferred display mode."
"no_work_planned": "No work planned at this date",
"choose_display_mode": "Set your preferred display mode.",
"added": "Added"
}
7 changes: 3 additions & 4 deletions lib/l10n/app_fr.arb
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
"saved_route": "Itinéraire enregistré, les détails sont désormais disponibles même hors connexion.",
"where_to_board": "Où monter ?",
"routes": "Itinéraires",
"your_favorites": "Vos favoris",
"no_saved_routes": "Aucun itinéraire enregistré.",
"go": "Y aller",
"edit_route": "Modifier un trajet",
Expand Down Expand Up @@ -159,6 +160,7 @@
"your_position": "Votre position",
"where_are_we_departing_from": "D’où partons-nous ?",
"where_are_we_going": "Où allons-nous ?",
"home_search": "Où allons-nous ? Rechercher une adresse, une station...",
"undefined_address_or_label": "Adresse ou libellé non défini",
"home": "Maison",
"nearby": "À proximité",
Expand Down Expand Up @@ -232,7 +234,7 @@
"new_departure_station": "Nouvelle gare de départ",
"exceptional_terminus": "Terminus exceptionnel",
"exceptional_terminus_short": "Terminus ex.",
"modified_train": "Désserte modifié",
"modified_train": "Desserte modifié",
"modified_train_short": "Modifié",
"timetable_sheet": "Fiche horaire",
"today": "Aujourd’hui",
Expand All @@ -242,7 +244,6 @@
"search": "Rechercher",
"search_line": "Rechercher une ligne",
"recent": "Récents",
"search_location_on_map": "Rechercher un lieu sur la carte",
"server_not_responding": "Le serveur n’a pas répondu",
"avoid_line": "Éviter une ligne ?",
"avoid": "Éviter une ligne",
Expand All @@ -257,10 +258,8 @@
"traffic": "Trafic",
"add_stop_to_favorites": "Ajoutez un arrêt à vos favoris pour accéder à vos horaires plus rapidement.",
"favorite_deletion_error": "Erreur lors de la suppression du favori.",

"line_details": "Détails de la ligne",
"no_work_planned": "Aucun travaux prévu à cette date",
"choose_display_mode": "Définissez le mode d’affichage que vous préférez.",

"added": "Supplémentaire"
}
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ Future _initializeFirebase() async {
);

if (kDebugMode) {
print({'INFO_', 'User granted permission: ${settings.authorizationStatus}'});
print(['INFO_', settings.authorizationStatus]);
}

FirebaseMessaging.onMessage.listen((RemoteMessage message) async {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';

// 📦 Package imports:
import 'package:geolocator/geolocator.dart';
import 'package:here_sdk/core.dart';
import 'package:http/http.dart' as http;
import 'package:geolocator/geolocator.dart';

// 🌎 Project imports:
import 'package:navika/src/data/app.dart' as app;
Expand Down
7 changes: 3 additions & 4 deletions lib/src/app.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// 🎯 Dart imports:
import 'dart:io';
import 'dart:math';

// 🐦 Flutter imports:
Expand Down Expand Up @@ -160,9 +159,9 @@ class _NavikaAppState extends State<NavikaApp> {
elevation: 0,
margin: const EdgeInsets.all(0) ,
),
appBarTheme: AppBarTheme(
surfaceTintColor: Platform.isIOS ? const Color(0xFFFFFFFF) : primaryContainer
),
// appBarTheme: AppBarTheme(
// surfaceTintColor: Platform.isIOS ? const Color(0xFFFFFFFF) : primaryContainer
// ),
tabBarTheme: const TabBarTheme(
unselectedLabelColor: Color(0xff919191),
),
Expand Down
6 changes: 3 additions & 3 deletions lib/src/controller/here_map_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';

// 📦 Package imports:
import 'package:geolocator/geolocator.dart';
import 'package:here_sdk/core.dart';
import 'package:here_sdk/mapview.dart';
import 'package:geolocator/geolocator.dart';

// 🌎 Project imports:
import 'package:navika/src/data/global.dart' as globals;
Expand Down Expand Up @@ -52,8 +52,8 @@ class HereController {

if (zoomAuto) {
double distanceToEarthInMeters = 1000;
if (position.accuracy! > 0) {
distanceToEarthInMeters = (position.accuracy! * 2) + 1000;
if (position.accuracy > 0) {
distanceToEarthInMeters = (position.accuracy * 2) + 1000;
}
MapMeasure mapMeasureZoom = MapMeasure(MapMeasureKind.distance, distanceToEarthInMeters);
_hereMapController.camera.lookAtPointWithMeasure(GeoCoordinates(position.latitude ?? 0, position.longitude ?? 0), mapMeasureZoom);
Expand Down
2 changes: 1 addition & 1 deletion lib/src/data/global.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ library my_prj.globals;
import 'package:flutter/material.dart';

// 📦 Package imports:
import 'package:here_sdk/mapview.dart';
import 'package:geolocator/geolocator.dart';
import 'package:here_sdk/mapview.dart';
import 'package:sliding_up_panel/sliding_up_panel.dart';

// 🌎 Project imports:
Expand Down
4 changes: 2 additions & 2 deletions lib/src/data/lines.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
class LinesInfo {
List lines = [];

void setLines(List _lines) {
lines = _lines;
void setLines(List list) {
lines = list;
}

void reset(){
Expand Down
42 changes: 28 additions & 14 deletions lib/src/icons/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -1020,20 +1020,6 @@
"navi"
]
},
{
"uid": "f0dc655a7331f379eb9c9da7a64a4c0d",
"css": "navi-1",
"code": 59464,
"src": "custom_icons",
"selected": true,
"svg": {
"path": "M427.5 87.5C92.7 151.4-34.6 555.7 204.8 795.2 408.9 999.2 752.7 940.7 877.5 680.7 1023.2 377.2 755.9 24.8 427.5 87.5M556.9 152.5C793.4 194.4 921.4 450.4 811.4 661.8 667.4 938.5 260.5 903.1 164.8 605.5 85.7 359.4 303.6 107.7 556.9 152.5M589.8 315.3C307.5 420.4 290.5 428 277.7 454.4 252 507.5 275.6 541.9 358.5 572.1L409.4 590.6 425.8 636.1C446.4 693 453.9 706.7 471.2 718.5 500.4 738.6 550.6 730.8 570.3 703.2 587.5 679 684.8 413.7 686.3 386.7 689.4 334 639.3 296.9 589.8 315.3M620.8 385.7C620.1 400.6 517.4 662.1 512.2 662.1 509 662.1 500.2 643.7 489.8 615.2 458.8 530.2 468.8 540.6 390.6 512.3 358.6 500.7 337.9 491.1 337.9 487.9 337.9 482.8 599.6 379.8 614.3 379.2 618.4 379 621 381.6 620.8 385.7",
"width": 1000
},
"search": [
"navi"
]
},
{
"uid": "4433e31b6fd49de97c469d7b0124bde4",
"css": "exit",
Expand Down Expand Up @@ -1107,6 +1093,34 @@
"css": "chevron_down",
"code": 61560,
"src": "fontawesome5"
},
{
"uid": "ec5e7892560581b81df2bc756f5e0918",
"css": "position_unavailable",
"code": 59443,
"src": "custom_icons",
"selected": true,
"svg": {
"path": "M468.1 84C247.9 111.9 135.1 355.2 257.5 538.3 276.1 566 379.2 683.9 425.7 730.6 468.7 773.8 497.2 782.1 536 762.9 571.5 745.4 735.3 558.9 761.6 506 864.1 300.1 693.9 55.3 468.1 84M544.8 151.3C714.2 187 784.9 387.3 675.1 520.3 598.3 613.2 510.3 707 500 707 490.1 707 398.8 609.6 324.9 520.3 189 355.9 337 107.6 544.8 151.3M398 256.2C388.8 258.7 377.9 270.5 376.2 279.9 373.2 296 376.3 300.7 417.6 342.3L455.9 380.9 417.7 419.4C369.6 467.9 365.6 477.5 385.5 497.3 405.3 517.2 415 513.2 463.4 465.2L502 426.9 540.5 465.2C589 513.2 598.6 517.2 618.4 497.3 638.3 477.5 634.3 467.9 586.3 419.4L548 380.9 586.3 342.3C634.3 293.9 638.3 284.3 618.4 264.4 598.6 244.6 589 248.5 540.5 296.6L502 334.8 463.4 296.5C419.5 252.9 416.8 251.2 398 256.2M228.8 589.8C198.9 600.6 172.7 625.9 161.9 654.5 153.4 676.7 124.9 806.8 124.8 823.2 124.8 868.9 157 908 201.3 916.1 208.5 917.4 314.2 917.9 507 917.5L801.8 917 813 912.5C851.4 896.9 872.7 867.8 874.5 828 875.4 809.2 852.6 698.5 839.6 658.8 831.2 632.8 808.2 607.1 782.6 595 756.7 582.7 760.1 581.3 730.7 615.6L705.1 645.5 724.1 646.7C769.2 649.4 773.4 655.6 795.2 749.7 814.8 834.1 814.5 841 791.6 850.8 782.2 854.8 217.8 854.8 208.4 850.8 185.5 841 185.2 834.1 204.8 749.7 226.6 655.5 230.8 649.4 276.1 646.7L295.3 645.5 269.6 615.7C255.6 599.3 243 586 241.6 586 240.3 586 234.6 587.8 228.8 589.8",
"width": 1000
},
"search": [
"position_unavailable"
]
},
{
"uid": "fa0ff5c4bb0ea8613dcc354eb10b7daf",
"css": "position_unknow",
"code": 59469,
"src": "custom_icons",
"selected": true,
"svg": {
"path": "M468.1 84C247.9 111.9 135.1 355.2 257.5 538.3 276.1 566 379.2 683.9 425.7 730.6 468.7 773.8 497.2 782.1 536 762.9 571.5 745.4 735.3 558.9 761.6 506 864.1 300.1 693.9 55.3 468.1 84M544.8 151.3C714.2 187 784.9 387.3 675.1 520.3 598.3 613.2 510.3 707 500 707 490.1 707 398.8 609.6 324.9 520.3 189 355.9 337 107.6 544.8 151.3M477.1 210C411.3 224.3 364.5 324.7 412.1 349.3 436 361.6 456.3 347.7 459.1 317.2 463.5 269.1 515.3 253.7 535.9 294.4 547.2 316.6 542.6 329.3 512.8 358.4 479.3 391 468.8 411.6 468.8 444 468.8 493.2 527.7 494.1 532.5 445 534.2 427.2 537.3 422.1 555.6 406.6 573.5 391.3 587.9 373.6 595.1 358.1 631.7 278.9 562.1 191.5 477.1 210M487.8 521.4C441.1 536.4 451.1 604.7 500 604.4 554 604.1 557.3 524.5 503.5 520.4 497.8 520 490.8 520.4 487.8 521.4M228.8 589.8C198.9 600.6 172.7 625.9 161.9 654.5 153.4 676.7 124.9 806.8 124.8 823.2 124.8 868.9 157 908 201.3 916.1 208.5 917.4 314.2 917.9 507 917.5L801.8 917 813 912.5C851.4 896.9 872.7 867.8 874.5 828 875.4 809.2 852.6 698.5 839.6 658.8 831.2 632.8 808.2 607.1 782.6 595 756.7 582.7 760.1 581.3 730.7 615.6L705.1 645.5 724.1 646.7C769.2 649.4 773.4 655.6 795.2 749.7 814.8 834.1 814.5 841 791.6 850.8 782.2 854.8 217.8 854.8 208.4 850.8 185.5 841 185.2 834.1 204.8 749.7 226.6 655.5 230.8 649.4 276.1 646.7L295.3 645.5 269.6 615.7C255.6 599.3 243 586 241.6 586 240.3 586 234.6 587.8 228.8 589.8",
"width": 1000
},
"search": [
"position_unknow"
]
}
]
}
3 changes: 2 additions & 1 deletion lib/src/icons/navika_icons_icons.dart
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class NavikaIcons {
static const IconData arrival = IconData(0xe830, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData departure = IconData(0xe831, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData calendar = IconData(0xe832, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData position_unavailable = IconData(0xe833, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData bellAdd = IconData(0xe834, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData bellFilled = IconData(0xe835, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData avance = IconData(0xe836, fontFamily: _kFontFam, fontPackage: _kFontPkg);
Expand All @@ -96,11 +97,11 @@ class NavikaIcons {
static const IconData position_middle = IconData(0xe845, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData position_front = IconData(0xe846, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData navi = IconData(0xe847, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData navi_1 = IconData(0xe848, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData exit = IconData(0xe849, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData entrance = IconData(0xe84a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData stars = IconData(0xe84b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData hearts = IconData(0xe84c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData position_unknow = IconData(0xe84d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData saved = IconData(0xe85a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData bell = IconData(0xe86c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData busFace = IconData(0xe880, fontFamily: _kFontFam, fontPackage: _kFontPkg);
Expand Down
20 changes: 10 additions & 10 deletions lib/src/screens/changes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,29 @@ class _ChangesState extends State<Changes> {
String data = '';

Future _getChanges() async {
ApiStatus _error = ApiStatus.ok;
String _data = '';
ApiStatus error = ApiStatus.ok;
String data = '';

try {
final response = await http.get(Uri.parse(app.APP_CHANGES));

if (response.statusCode == 200) {
_data = utf8.decode(response.bodyBytes);
_error = ApiStatus.ok;
data = utf8.decode(response.bodyBytes);
error = ApiStatus.ok;
} else {
_error = ApiStatus.serverException;
error = ApiStatus.serverException;
}
} on SocketException {
_error = ApiStatus.socketException;
error = ApiStatus.socketException;
} on TimeoutException {
_error = ApiStatus.timeoutException;
error = ApiStatus.timeoutException;
} catch (e) {
_error = ApiStatus.unknownException;
error = ApiStatus.unknownException;
}

setState(() {
data = _data;
error = _error;
data = data;
error = error;
isLoading = false;
});
}
Expand Down
Loading

0 comments on commit 4a65900

Please sign in to comment.