diff --git a/.gitignore b/.gitignore
index e213b88b..a135d6ae 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,6 +10,9 @@
.svn/
migrate_working_dir/
+# here sdk
+/plugins/here_sdk/
+
# credentials
*credentials.dart
*google-services.json
diff --git a/README.md b/README.md
index b56e8bc9..7a44a42c 100644
--- a/README.md
+++ b/README.md
@@ -30,7 +30,7 @@
-
+
## Geting Started
diff --git a/assets/img/icons/null.png b/assets/img/icons/null.png
new file mode 100644
index 00000000..a385dd49
Binary files /dev/null and b/assets/img/icons/null.png differ
diff --git a/assets/img/icons/sncf/TER_white.png b/assets/img/icons/sncf/TER_light.png
similarity index 100%
rename from assets/img/icons/sncf/TER_white.png
rename to assets/img/icons/sncf/TER_light.png
diff --git a/assets/img/icons/sncf/inoui.png b/assets/img/icons/sncf/inoui.png
new file mode 100644
index 00000000..a5945d49
Binary files /dev/null and b/assets/img/icons/sncf/inoui.png differ
diff --git a/assets/img/icons/sncf/inoui_color.png b/assets/img/icons/sncf/inoui_color.png
new file mode 100644
index 00000000..5cc5d818
Binary files /dev/null and b/assets/img/icons/sncf/inoui_color.png differ
diff --git a/assets/img/icons/sncf/inoui_light.png b/assets/img/icons/sncf/inoui_light.png
new file mode 100644
index 00000000..d02e4fae
Binary files /dev/null and b/assets/img/icons/sncf/inoui_light.png differ
diff --git a/assets/img/icons/sncf/intercites.png b/assets/img/icons/sncf/intercites.png
new file mode 100644
index 00000000..98ee5a2b
Binary files /dev/null and b/assets/img/icons/sncf/intercites.png differ
diff --git a/assets/img/icons/sncf/intercites_color.png b/assets/img/icons/sncf/intercites_color.png
new file mode 100644
index 00000000..207d8711
Binary files /dev/null and b/assets/img/icons/sncf/intercites_color.png differ
diff --git a/assets/img/icons/sncf/intercites_light.png b/assets/img/icons/sncf/intercites_light.png
new file mode 100644
index 00000000..9c73df1f
Binary files /dev/null and b/assets/img/icons/sncf/intercites_light.png differ
diff --git a/assets/img/icons/sncf/logo_white.png b/assets/img/icons/sncf/logo_light.png
similarity index 100%
rename from assets/img/icons/sncf/logo_white.png
rename to assets/img/icons/sncf/logo_light.png
diff --git a/assets/img/modal/alert_white.png b/assets/img/modal/alert_light.png
similarity index 100%
rename from assets/img/modal/alert_white.png
rename to assets/img/modal/alert_light.png
diff --git a/assets/img/modal/error_white.png b/assets/img/modal/error_light.png
similarity index 100%
rename from assets/img/modal/error_white.png
rename to assets/img/modal/error_light.png
diff --git a/assets/img/modal/information_white.png b/assets/img/modal/information_light.png
similarity index 100%
rename from assets/img/modal/information_white.png
rename to assets/img/modal/information_light.png
diff --git a/assets/img/modal/interogation_white.png b/assets/img/modal/interogation_light.png
similarity index 100%
rename from assets/img/modal/interogation_white.png
rename to assets/img/modal/interogation_light.png
diff --git a/assets/img/modal/valid_white.png b/assets/img/modal/valid_light.png
similarity index 100%
rename from assets/img/modal/valid_white.png
rename to assets/img/modal/valid_light.png
diff --git a/assets/img/modal/work_white.png b/assets/img/modal/work_light.png
similarity index 100%
rename from assets/img/modal/work_white.png
rename to assets/img/modal/work_light.png
diff --git a/lib/src/data/lines.dart b/lib/src/data/lines.dart
index 507ebbbd..7e7ab72f 100644
--- a/lib/src/data/lines.dart
+++ b/lib/src/data/lines.dart
@@ -1,118 +1,102 @@
class LinesInfo {
- final lines = [];
+ List lines = [];
- void addLine(String id, String name, String libelle, String imageDark, String imageLight, String mode, String imageModeDark, String imageModeLight) {
- var line = Info(id, name, libelle, imageDark, imageLight, mode, imageModeDark, imageModeLight);
- lines.add(line);
+ void setLines(List _lines) {
+ lines = _lines;
}
void reset(){
lines.clear();
}
- bool isLineById(id) {
+ Map? getLines(el) {
for (var line in lines) {
- if (line.id == id) return true;
- }
- return false;
- }
-
- Info getLinesById(id) {
- for (var line in lines) {
- if (line.id == id) return line;
- }
- return lines[0];
- }
-
- Info getLines(name) {
- for (var line in lines) {
- if (line.name == name) {
- return line;
+ if (el is Map) {
+ if (line['id'] == el['id'] || line['name'] == el['name']) {
+ return line;
+ }
+ if (line['code'] != null && line['code'] == el['code']) {
+ return line;
+ }
+ } else {
+ if (line['id'] == el || line['name'] == el) {
+ return line;
+ }
+ if (line['code'] != null && line['code'] == el) {
+ return line;
+ }
}
+
+
}
return lines[0];
}
}
-class Info {
- final String id;
- final String name;
- final String libelle;
- final String imageDark;
- final String imageLight;
- final String mode;
- final String imageModeDark;
- final String imageModeLight;
-
- Info(this.id, this.name, this.libelle, this.imageDark, this.imageLight, this.mode, this.imageModeDark, this.imageModeLight);
-}
-
-final LINES = LinesInfo()
-..addLine('0', '', '','assets/img/null.png', 'assets/img/null.png', '0','assets/img/null.png', 'assets/img/null.png')
-..addLine('IDFM:C01742', 'RER A', 'RER A', 'assets/img/icons/lines/RER_A.png', 'assets/img/icons/lines/RER_A_light.png', 'RER','assets/img/icons/RER.png', 'assets/img/icons/RER_light.png')
-..addLine('IDFM:C01743', 'RER B', 'RER B', 'assets/img/icons/lines/RER_B.png', 'assets/img/icons/lines/RER_B_light.png', 'RER','assets/img/icons/RER.png', 'assets/img/icons/RER_light.png')
-..addLine('IDFM:C01727', 'RER C', 'RER C', 'assets/img/icons/lines/RER_C.png', 'assets/img/icons/lines/RER_C_light.png', 'RER','assets/img/icons/RER.png', 'assets/img/icons/RER_light.png')
-..addLine('IDFM:C01728', 'RER D', 'RER D', 'assets/img/icons/lines/RER_D.png', 'assets/img/icons/lines/RER_D_light.png', 'RER','assets/img/icons/RER.png', 'assets/img/icons/RER_light.png')
-..addLine('IDFM:C01729', 'RER E', 'RER E', 'assets/img/icons/lines/RER_E.png', 'assets/img/icons/lines/RER_E_light.png', 'RER','assets/img/icons/RER.png', 'assets/img/icons/RER_light.png')
-
-..addLine('IDFM:C01371', 'METRO 1', 'Métro 1', 'assets/img/icons/lines/METRO_1.png', 'assets/img/icons/lines/METRO_1_light.png', 'METRO', 'assets/img/icons/metro.png', 'assets/img/icons/metro_light.png')
-..addLine('IDFM:C01372', 'METRO 2', 'Métro 2', 'assets/img/icons/lines/METRO_2.png', 'assets/img/icons/lines/METRO_2_light.png', 'METRO', 'assets/img/icons/metro.png', 'assets/img/icons/metro_light.png')
-..addLine('IDFM:C01373', 'METRO 3', 'Métro 3', 'assets/img/icons/lines/METRO_3.png', 'assets/img/icons/lines/METRO_3_light.png', 'METRO', 'assets/img/icons/metro.png', 'assets/img/icons/metro_light.png')
-..addLine('IDFM:C01386', 'METRO 3B', 'Métro 3bis', 'assets/img/icons/lines/METRO_3b.png', 'assets/img/icons/lines/METRO_3b_light.png', 'METRO', 'assets/img/icons/metro.png', 'assets/img/icons/metro_light.png')
-..addLine('IDFM:C01374', 'METRO 4', 'Métro 4', 'assets/img/icons/lines/METRO_4.png', 'assets/img/icons/lines/METRO_4_light.png', 'METRO', 'assets/img/icons/metro.png', 'assets/img/icons/metro_light.png')
-..addLine('IDFM:C01375', 'METRO 5', 'Métro 5', 'assets/img/icons/lines/METRO_5.png', 'assets/img/icons/lines/METRO_5_light.png', 'METRO', 'assets/img/icons/metro.png', 'assets/img/icons/metro_light.png')
-..addLine('IDFM:C01376', 'METRO 6', 'Métro 6', 'assets/img/icons/lines/METRO_6.png', 'assets/img/icons/lines/METRO_6_light.png', 'METRO', 'assets/img/icons/metro.png', 'assets/img/icons/metro_light.png')
-..addLine('IDFM:C01377', 'METRO 7', 'Métro 7', 'assets/img/icons/lines/METRO_7.png', 'assets/img/icons/lines/METRO_7_light.png', 'METRO', 'assets/img/icons/metro.png', 'assets/img/icons/metro_light.png')
-..addLine('IDFM:C01387', 'METRO 7B', 'Métro 7bis', 'assets/img/icons/lines/METRO_7b.png', 'assets/img/icons/lines/METRO_7b_light.png', 'METRO', 'assets/img/icons/metro.png', 'assets/img/icons/metro_light.png')
-..addLine('IDFM:C01378', 'METRO 8', 'Métro 8', 'assets/img/icons/lines/METRO_8.png', 'assets/img/icons/lines/METRO_8_light.png', 'METRO', 'assets/img/icons/metro.png', 'assets/img/icons/metro_light.png')
-..addLine('IDFM:C01379', 'METRO 9', 'Métro 9', 'assets/img/icons/lines/METRO_9.png', 'assets/img/icons/lines/METRO_9_light.png', 'METRO', 'assets/img/icons/metro.png', 'assets/img/icons/metro_light.png')
-..addLine('IDFM:C01380', 'METRO 10', 'Métro 10', 'assets/img/icons/lines/METRO_10.png', 'assets/img/icons/lines/METRO_10_light.png', 'METRO', 'assets/img/icons/metro.png', 'assets/img/icons/metro_light.png')
-..addLine('IDFM:C01381', 'METRO 11', 'Métro 11', 'assets/img/icons/lines/METRO_11.png', 'assets/img/icons/lines/METRO_11_light.png', 'METRO', 'assets/img/icons/metro.png', 'assets/img/icons/metro_light.png')
-..addLine('IDFM:C01382', 'METRO 12', 'Métro 12', 'assets/img/icons/lines/METRO_12.png', 'assets/img/icons/lines/METRO_12_light.png', 'METRO', 'assets/img/icons/metro.png', 'assets/img/icons/metro_light.png')
-..addLine('IDFM:C01383', 'METRO 13', 'Métro 13', 'assets/img/icons/lines/METRO_13.png', 'assets/img/icons/lines/METRO_13_light.png', 'METRO', 'assets/img/icons/metro.png', 'assets/img/icons/metro_light.png')
-..addLine('IDFM:C01384', 'METRO 14', 'Métro 14', 'assets/img/icons/lines/METRO_14.png', 'assets/img/icons/lines/METRO_14_light.png', 'METRO', 'assets/img/icons/metro.png', 'assets/img/icons/metro_light.png')
-
-..addLine('IDFM:C01388', 'Orly val', 'Orly val', 'assets/img/icons/lines/ORLYVAL.png', 'assets/img/icons/lines/ORLYVAL.png', 'VAL', 'assets/img/null.png', 'assets/img/null.png')
-..addLine('IDFM:C00563', 'CDG Val', 'CDG Val', 'assets/img/icons/lines/CDGVAL.png', 'assets/img/icons/lines/CDGVAL.png', 'VAL', 'assets/img/null.png', 'assets/img/null.png')
-
-..addLine('IDFM:C01389', 'T1', 'Tram T1', 'assets/img/icons/lines/TRAM_T1.png', 'assets/img/icons/lines/TRAM_T1_light.png', 'TRAM','assets/img/icons/tram.png', 'assets/img/icons/tram_light.png')
-..addLine('IDFM:C01390', 'T2', 'Tram T2', 'assets/img/icons/lines/TRAM_T2.png', 'assets/img/icons/lines/TRAM_T2_light.png', 'TRAM','assets/img/icons/tram.png', 'assets/img/icons/tram_light.png')
-..addLine('IDFM:C01391', 'T3A', 'Tram T3a', 'assets/img/icons/lines/TRAM_T3a.png', 'assets/img/icons/lines/TRAM_T3a_light.png', 'TRAM','assets/img/icons/tram.png', 'assets/img/icons/tram_light.png')
-..addLine('IDFM:C01679', 'T3B', 'Tram T3b', 'assets/img/icons/lines/TRAM_T3b.png', 'assets/img/icons/lines/TRAM_T3b_light.png', 'TRAM','assets/img/icons/tram.png', 'assets/img/icons/tram_light.png')
-..addLine('IDFM:C01843', 'T4', 'Tram T4', 'assets/img/icons/lines/TRAM_T4.png', 'assets/img/icons/lines/TRAM_T4_light.png', 'TRAM','assets/img/icons/tram.png', 'assets/img/icons/tram_light.png')
-..addLine('IDFM:C01684', 'T5', 'Tram T5', 'assets/img/icons/lines/TRAM_T5.png', 'assets/img/icons/lines/TRAM_T5_light.png', 'TRAM','assets/img/icons/tram.png', 'assets/img/icons/tram_light.png')
-..addLine('IDFM:C01794', 'T6', 'Tram T6', 'assets/img/icons/lines/TRAM_T6.png', 'assets/img/icons/lines/TRAM_T6_light.png', 'TRAM','assets/img/icons/tram.png', 'assets/img/icons/tram_light.png')
-..addLine('IDFM:C01774', 'T7', 'Tram T7', 'assets/img/icons/lines/TRAM_T7.png', 'assets/img/icons/lines/TRAM_T7_light.png', 'TRAM','assets/img/icons/tram.png', 'assets/img/icons/tram_light.png')
-..addLine('IDFM:C01795', 'T8', 'Tram T8', 'assets/img/icons/lines/TRAM_T8.png', 'assets/img/icons/lines/TRAM_T8_light.png', 'TRAM','assets/img/icons/tram.png', 'assets/img/icons/tram_light.png')
-..addLine('IDFM:C02317', 'T9', 'Tram T9', 'assets/img/icons/lines/TRAM_T9.png', 'assets/img/icons/lines/TRAM_T9_light.png', 'TRAM','assets/img/icons/tram.png', 'assets/img/icons/tram_light.png')
-..addLine('IDFM:C02528', 'T10', 'Tram T10', 'assets/img/icons/lines/TRAM_T10.png', 'assets/img/icons/lines/TRAM_T10_light.png', 'TRAM','assets/img/icons/tram.png', 'assets/img/icons/tram_light.png')
-..addLine('IDFM:C01999', 'T11', 'Tram T11', 'assets/img/icons/lines/TRAM_T11.png', 'assets/img/icons/lines/TRAM_T11_light.png', 'TRAM','assets/img/icons/tram.png', 'assets/img/icons/tram_light.png')
-..addLine('IDFM:C02529', 'T12', 'Tram T12', 'assets/img/icons/lines/TRAM_T12.png', 'assets/img/icons/lines/TRAM_T12_light.png', 'TRAM','assets/img/icons/tram.png', 'assets/img/icons/tram_light.png')
-..addLine('IDFM:C02344', 'T13', 'Tram T13', 'assets/img/icons/lines/TRAM_T13.png', 'assets/img/icons/lines/TRAM_T13_light.png', 'TRAM','assets/img/icons/tram.png', 'assets/img/icons/tram_light.png')
-
-..addLine('IDFM:C01737', 'TRANSILIEN H', 'Transilien H', 'assets/img/icons/lines/TRAIN_H.png', 'assets/img/icons/lines/TRAIN_H_light.png', 'TRAIN','assets/img/icons/train.png','assets/img/icons/train_light.png')
-..addLine('IDFM:C01739', 'TRANSILIEN J', 'Transilien J', 'assets/img/icons/lines/TRAIN_J.png', 'assets/img/icons/lines/TRAIN_J_light.png', 'TRAIN','assets/img/icons/train.png','assets/img/icons/train_light.png')
-..addLine('IDFM:C01738', 'TRANSILIEN K', 'Transilien K', 'assets/img/icons/lines/TRAIN_K.png', 'assets/img/icons/lines/TRAIN_K_light.png', 'TRAIN','assets/img/icons/train.png','assets/img/icons/train_light.png')
-..addLine('IDFM:C01740', 'TRANSILIEN L', 'Transilien L', 'assets/img/icons/lines/TRAIN_L.png', 'assets/img/icons/lines/TRAIN_L_light.png', 'TRAIN','assets/img/icons/train.png','assets/img/icons/train_light.png')
-..addLine('IDFM:C01736', 'TRANSILIEN N', 'Transilien N', 'assets/img/icons/lines/TRAIN_N.png', 'assets/img/icons/lines/TRAIN_N_light.png', 'TRAIN','assets/img/icons/train.png','assets/img/icons/train_light.png')
-..addLine('IDFM:C01730', 'TRANSILIEN P', 'Transilien P', 'assets/img/icons/lines/TRAIN_P.png', 'assets/img/icons/lines/TRAIN_P_light.png', 'TRAIN','assets/img/icons/train.png','assets/img/icons/train_light.png')
-..addLine('IDFM:C01731', 'TRANSILIEN R', 'Transilien R', 'assets/img/icons/lines/TRAIN_R.png', 'assets/img/icons/lines/TRAIN_R_light.png', 'TRAIN','assets/img/icons/train.png','assets/img/icons/train_light.png')
-..addLine('IDFM:C01741', 'TRANSILIEN U', 'Transilien U', 'assets/img/icons/lines/TRAIN_U.png', 'assets/img/icons/lines/TRAIN_U_light.png', 'TRAIN','assets/img/icons/train.png','assets/img/icons/train_light.png')
-..addLine('IDFM:V01741', 'TRANSILIEN V', 'Transilien V', 'assets/img/icons/lines/TRAIN_V.png', 'assets/img/icons/lines/TRAIN_V_light.png', 'TRAIN','assets/img/icons/train.png','assets/img/icons/train_light.png')
-
-..addLine('IDFM:C01744', 'TER', 'TER', 'assets/img/icons/sncf/TER_color.png', 'assets/img/icons/sncf/TER_color.png', 'TER', 'assets/img/icons/sncf/TER.png', 'assets/img/icons/sncf/TER_white.png')
-..addLine('IDFM:C01863', 'TER', 'TER', 'assets/img/icons/sncf/TER_color.png', 'assets/img/icons/sncf/TER_color.png', 'TER', 'assets/img/icons/sncf/TER.png', 'assets/img/icons/sncf/TER_white.png')
-..addLine('IDFM:C01747', 'TER', 'TER', 'assets/img/icons/sncf/TER_color.png', 'assets/img/icons/sncf/TER_color.png', 'TER', 'assets/img/icons/sncf/TER.png', 'assets/img/icons/sncf/TER_white.png')
-..addLine('IDFM:C02375', 'TER', 'TER', 'assets/img/icons/sncf/TER_color.png', 'assets/img/icons/sncf/TER_color.png', 'TER', 'assets/img/icons/sncf/TER.png', 'assets/img/icons/sncf/TER_white.png')
-..addLine('IDFM:C01745', 'TER', 'TER', 'assets/img/icons/sncf/TER_color.png', 'assets/img/icons/sncf/TER_color.png', 'TER', 'assets/img/icons/sncf/TER.png', 'assets/img/icons/sncf/TER_white.png')
-..addLine('IDFM:C02368', 'TER', 'TER', 'assets/img/icons/sncf/TER_color.png', 'assets/img/icons/sncf/TER_color.png', 'TER', 'assets/img/icons/sncf/TER.png', 'assets/img/icons/sncf/TER_white.png')
-..addLine('IDFM:C02372', 'TER', 'TER', 'assets/img/icons/sncf/TER_color.png', 'assets/img/icons/sncf/TER_color.png', 'TER', 'assets/img/icons/sncf/TER.png', 'assets/img/icons/sncf/TER_white.png')
-..addLine('IDFM:C02370', 'TER', 'TER', 'assets/img/icons/sncf/TER_color.png', 'assets/img/icons/sncf/TER_color.png', 'TER', 'assets/img/icons/sncf/TER.png', 'assets/img/icons/sncf/TER_white.png')
-..addLine('IDFM:C01748', 'TER', 'TER', 'assets/img/icons/sncf/TER_color.png', 'assets/img/icons/sncf/TER_color.png', 'TER', 'assets/img/icons/sncf/TER.png', 'assets/img/icons/sncf/TER_white.png')
-..addLine('IDFM:C01857', 'TER', 'TER', 'assets/img/icons/sncf/TER_color.png', 'assets/img/icons/sncf/TER_color.png', 'TER', 'assets/img/icons/sncf/TER.png', 'assets/img/icons/sncf/TER_white.png')
-..addLine('IDFM:C01746', 'TER', 'TER', 'assets/img/icons/sncf/TER_color.png', 'assets/img/icons/sncf/TER_color.png', 'TER', 'assets/img/icons/sncf/TER.png', 'assets/img/icons/sncf/TER_white.png')
-
-..addLine('TER', 'TER', 'TER', 'assets/img/icons/sncf/TER_color.png', 'assets/img/icons/sncf/TER_color.png', 'TER', 'assets/img/icons/sncf/TER.png', 'assets/img/icons/sncf/TER_white.png')
-..addLine('SNCF', 'SNCF', 'Trains SNCF', 'assets/img/icons/sncf/logo_color.png', 'assets/img/icons/sncf/logo_color.png', 'SNCF', 'assets/img/icons/sncf/logo_color.png', 'assets/img/icons/sncf/logo_white.png')
-;
+final LINES = LinesInfo()..setLines(
+ [
+ {'id': '0','code': null, 'name': '','logo': null,'logo_light': null,'symbol': null,'symbol_light': null},
+ {'id': 'IDFM:C01742','code': null, 'name': 'RER A','logo': 'lines/RER_A.png','logo_light': 'lines/RER_A_light.png','symbol': 'RER.png','symbol_light': 'RER_light.png'},
+ {'id': 'IDFM:C01743','code': null, 'name': 'RER B','logo': 'lines/RER_B.png','logo_light': 'lines/RER_B_light.png','symbol': 'RER.png','symbol_light': 'RER_light.png'},
+ {'id': 'IDFM:C01727','code': null, 'name': 'RER C','logo': 'lines/RER_C.png','logo_light': 'lines/RER_C_light.png','symbol': 'RER.png','symbol_light': 'RER_light.png'},
+ {'id': 'IDFM:C01728','code': null, 'name': 'RER D','logo': 'lines/RER_D.png','logo_light': 'lines/RER_D_light.png','symbol': 'RER.png','symbol_light': 'RER_light.png'},
+ {'id': 'IDFM:C01729','code': null, 'name': 'RER E','logo': 'lines/RER_E.png','logo_light': 'lines/RER_E_light.png','symbol': 'RER.png','symbol_light': 'RER_light.png'},
+ {'id': 'IDFM:C01371','code': null, 'name': 'Métro 1','logo': 'lines/METRO_1.png','logo_light': 'lines/METRO_1_light.png','symbol': 'metro.png','symbol_light': 'metro_light.png'},
+ {'id': 'IDFM:C01372','code': null, 'name': 'Métro 2','logo': 'lines/METRO_2.png','logo_light': 'lines/METRO_2_light.png','symbol': 'metro.png','symbol_light': 'metro_light.png'},
+ {'id': 'IDFM:C01373','code': null, 'name': 'Métro 3','logo': 'lines/METRO_3.png','logo_light': 'lines/METRO_3_light.png','symbol': 'metro.png','symbol_light': 'metro_light.png'},
+ {'id': 'IDFM:C01386','code': null, 'name': 'Métro 3bis','logo': 'lines/METRO_3b.png','logo_light': 'lines/METRO_3b_light.png','symbol': 'metro.png','symbol_light': 'metro_light.png'},
+ {'id': 'IDFM:C01374','code': null, 'name': 'Métro 4','logo': 'lines/METRO_4.png','logo_light': 'lines/METRO_4_light.png','symbol': 'metro.png','symbol_light': 'metro_light.png'},
+ {'id': 'IDFM:C01375','code': null, 'name': 'Métro 5','logo': 'lines/METRO_5.png','logo_light': 'lines/METRO_5_light.png','symbol': 'metro.png','symbol_light': 'metro_light.png'},
+ {'id': 'IDFM:C01376','code': null, 'name': 'Métro 6','logo': 'lines/METRO_6.png','logo_light': 'lines/METRO_6_light.png','symbol': 'metro.png','symbol_light': 'metro_light.png'},
+ {'id': 'IDFM:C01377','code': null, 'name': 'Métro 7','logo': 'lines/METRO_7.png','logo_light': 'lines/METRO_7_light.png','symbol': 'metro.png','symbol_light': 'metro_light.png'},
+ {'id': 'IDFM:C01387','code': null, 'name': 'Métro 7bis','logo': 'lines/METRO_7b.png','logo_light': 'lines/METRO_7b_light.png','symbol': 'metro.png','symbol_light': 'metro_light.png'},
+ {'id': 'IDFM:C01378','code': null, 'name': 'Métro 8','logo': 'lines/METRO_8.png','logo_light': 'lines/METRO_8_light.png','symbol': 'metro.png','symbol_light': 'metro_light.png'},
+ {'id': 'IDFM:C01379','code': null, 'name': 'Métro 9','logo': 'lines/METRO_9.png','logo_light': 'lines/METRO_9_light.png','symbol': 'metro.png','symbol_light': 'metro_light.png'},
+ {'id': 'IDFM:C01380','code': null, 'name': 'Métro 10','logo': 'lines/METRO_10.png','logo_light': 'lines/METRO_10_light.png','symbol': 'metro.png','symbol_light': 'metro_light.png'},
+ {'id': 'IDFM:C01381','code': null, 'name': 'Métro 11','logo': 'lines/METRO_11.png','logo_light': 'lines/METRO_11_light.png','symbol': 'metro.png','symbol_light': 'metro_light.png'},
+ {'id': 'IDFM:C01382','code': null, 'name': 'Métro 12','logo': 'lines/METRO_12.png','logo_light': 'lines/METRO_12_light.png','symbol': 'metro.png','symbol_light': 'metro_light.png'},
+ {'id': 'IDFM:C01383','code': null, 'name': 'Métro 13','logo': 'lines/METRO_13.png','logo_light': 'lines/METRO_13_light.png','symbol': 'metro.png','symbol_light': 'metro_light.png'},
+ {'id': 'IDFM:C01384','code': null, 'name': 'Métro 14','logo': 'lines/METRO_14.png','logo_light': 'lines/METRO_14_light.png','symbol': 'metro.png','symbol_light': 'metro_light.png'},
+ {'id': 'IDFM:C01388','code': null, 'name': 'Orly val','logo': 'lines/ORLYVAL.png','logo_light': 'lines/ORLYVAL.png','symbol': null,'symbol_light': null},
+ {'id': 'IDFM:C00563','code': null, 'name': 'CDG Val','logo': 'lines/CDGVAL.png','logo_light': 'lines/CDGVAL.png','symbol': null,'symbol_light': null},
+ {'id': 'IDFM:C01389','code': null, 'name': 'Tram T1','logo': 'lines/TRAM_T1.png','logo_light': 'lines/TRAM_T1_light.png','symbol': 'tram.png','symbol_light': 'tram_light.png'},
+ {'id': 'IDFM:C01390','code': null, 'name': 'Tram T2','logo': 'lines/TRAM_T2.png','logo_light': 'lines/TRAM_T2_light.png','symbol': 'tram.png','symbol_light': 'tram_light.png'},
+ {'id': 'IDFM:C01391','code': null, 'name': 'Tram T3a','logo': 'lines/TRAM_T3a.png','logo_light': 'lines/TRAM_T3a_light.png','symbol': 'tram.png','symbol_light': 'tram_light.png'},
+ {'id': 'IDFM:C01679','code': null, 'name': 'Tram T3b','logo': 'lines/TRAM_T3b.png','logo_light': 'lines/TRAM_T3b_light.png','symbol': 'tram.png','symbol_light': 'tram_light.png'},
+ {'id': 'IDFM:C01843','code': null, 'name': 'Tram T4','logo': 'lines/TRAM_T4.png','logo_light': 'lines/TRAM_T4_light.png','symbol': 'tram.png','symbol_light': 'tram_light.png'},
+ {'id': 'IDFM:C01684','code': null, 'name': 'Tram T5','logo': 'lines/TRAM_T5.png','logo_light': 'lines/TRAM_T5_light.png','symbol': 'tram.png','symbol_light': 'tram_light.png'},
+ {'id': 'IDFM:C01794','code': null, 'name': 'Tram T6','logo': 'lines/TRAM_T6.png','logo_light': 'lines/TRAM_T6_light.png','symbol': 'tram.png','symbol_light': 'tram_light.png'},
+ {'id': 'IDFM:C01774','code': null, 'name': 'Tram T7','logo': 'lines/TRAM_T7.png','logo_light': 'lines/TRAM_T7_light.png','symbol': 'tram.png','symbol_light': 'tram_light.png'},
+ {'id': 'IDFM:C01795','code': null, 'name': 'Tram T8','logo': 'lines/TRAM_T8.png','logo_light': 'lines/TRAM_T8_light.png','symbol': 'tram.png','symbol_light': 'tram_light.png'},
+ {'id': 'IDFM:C02317','code': null, 'name': 'Tram T9','logo': 'lines/TRAM_T9.png','logo_light': 'lines/TRAM_T9_light.png','symbol': 'tram.png','symbol_light': 'tram_light.png'},
+ {'id': 'IDFM:C02528','code': null, 'name': 'Tram T10','logo': 'lines/TRAM_T10.png','logo_light': 'lines/TRAM_T10_light.png','symbol': 'tram.png','symbol_light': 'tram_light.png'},
+ {'id': 'IDFM:C01999','code': null, 'name': 'Tram T11','logo': 'lines/TRAM_T11.png','logo_light': 'lines/TRAM_T11_light.png','symbol': 'tram.png','symbol_light': 'tram_light.png'},
+ {'id': 'IDFM:C02529','code': null, 'name': 'Tram T12','logo': 'lines/TRAM_T12.png','logo_light': 'lines/TRAM_T12_light.png','symbol': 'tram.png','symbol_light': 'tram_light.png'},
+ {'id': 'IDFM:C02344','code': null, 'name': 'Tram T13','logo': 'lines/TRAM_T13.png','logo_light': 'lines/TRAM_T13_light.png','symbol': 'tram.png','symbol_light': 'tram_light.png'},
+ {'id': 'IDFM:C01737','code': null, 'name': 'Transilien H','logo': 'lines/TRAIN_H.png','logo_light': 'lines/TRAIN_H_light.png','symbol': 'train.png','symbol_light': 'train_light.png'},
+ {'id': 'IDFM:C01739','code': null, 'name': 'Transilien J','logo': 'lines/TRAIN_J.png','logo_light': 'lines/TRAIN_J_light.png','symbol': 'train.png','symbol_light': 'train_light.png'},
+ {'id': 'IDFM:C01738','code': null, 'name': 'Transilien K','logo': 'lines/TRAIN_K.png','logo_light': 'lines/TRAIN_K_light.png','symbol': 'train.png','symbol_light': 'train_light.png'},
+ {'id': 'IDFM:C01740','code': null, 'name': 'Transilien L','logo': 'lines/TRAIN_L.png','logo_light': 'lines/TRAIN_L_light.png','symbol': 'train.png','symbol_light': 'train_light.png'},
+ {'id': 'IDFM:C01736','code': null, 'name': 'Transilien N','logo': 'lines/TRAIN_N.png','logo_light': 'lines/TRAIN_N_light.png','symbol': 'train.png','symbol_light': 'train_light.png'},
+ {'id': 'IDFM:C01730','code': null, 'name': 'Transilien P','logo': 'lines/TRAIN_P.png','logo_light': 'lines/TRAIN_P_light.png','symbol': 'train.png','symbol_light': 'train_light.png'},
+ {'id': 'IDFM:C01731','code': null, 'name': 'Transilien R','logo': 'lines/TRAIN_R.png','logo_light': 'lines/TRAIN_R_light.png','symbol': 'train.png','symbol_light': 'train_light.png'},
+ {'id': 'IDFM:C01741','code': null, 'name': 'Transilien U','logo': 'lines/TRAIN_U.png','logo_light': 'lines/TRAIN_U_light.png','symbol': 'train.png','symbol_light': 'train_light.png'},
+ {'id': 'IDFM:V01741','code': null, 'name': 'Transilien V','logo': 'lines/TRAIN_V.png','logo_light': 'lines/TRAIN_V_light.png','symbol': 'train.png','symbol_light': 'train_light.png'},
+ {'id': 'IDFM:C01744','code': null, 'name': 'TER','logo': 'sncf/TER_color.png','logo_light': 'sncf/TER_color.png','symbol': 'sncf/TER.png','symbol_light': 'sncf/TER_light.png'},
+ {'id': 'IDFM:C01863','code': null, 'name': 'TER','logo': 'sncf/TER_color.png','logo_light': 'sncf/TER_color.png','symbol': 'sncf/TER.png','symbol_light': 'sncf/TER_light.png'},
+ {'id': 'IDFM:C01747','code': null, 'name': 'TER','logo': 'sncf/TER_color.png','logo_light': 'sncf/TER_color.png','symbol': 'sncf/TER.png','symbol_light': 'sncf/TER_light.png'},
+ {'id': 'IDFM:C02375','code': null, 'name': 'TER','logo': 'sncf/TER_color.png','logo_light': 'sncf/TER_color.png','symbol': 'sncf/TER.png','symbol_light': 'sncf/TER_light.png'},
+ {'id': 'IDFM:C01745','code': null, 'name': 'TER','logo': 'sncf/TER_color.png','logo_light': 'sncf/TER_color.png','symbol': 'sncf/TER.png','symbol_light': 'sncf/TER_light.png'},
+ {'id': 'IDFM:C02368','code': null, 'name': 'TER','logo': 'sncf/TER_color.png','logo_light': 'sncf/TER_color.png','symbol': 'sncf/TER.png','symbol_light': 'sncf/TER_light.png'},
+ {'id': 'IDFM:C02372','code': null, 'name': 'TER','logo': 'sncf/TER_color.png','logo_light': 'sncf/TER_color.png','symbol': 'sncf/TER.png','symbol_light': 'sncf/TER_light.png'},
+ {'id': 'IDFM:C02370','code': null, 'name': 'TER','logo': 'sncf/TER_color.png','logo_light': 'sncf/TER_color.png','symbol': 'sncf/TER.png','symbol_light': 'sncf/TER_light.png'},
+ {'id': 'IDFM:C01748','code': null, 'name': 'TER','logo': 'sncf/TER_color.png','logo_light': 'sncf/TER_color.png','symbol': 'sncf/TER.png','symbol_light': 'sncf/TER_light.png'},
+ {'id': 'IDFM:C01857','code': null, 'name': 'TER','logo': 'sncf/TER_color.png','logo_light': 'sncf/TER_color.png','symbol': 'sncf/TER.png','symbol_light': 'sncf/TER_light.png'},
+ {'id': 'IDFM:C01746','code': null, 'name': 'TER','logo': 'sncf/TER_color.png','logo_light': 'sncf/TER_color.png','symbol': 'sncf/TER.png','symbol_light': 'sncf/TER_light.png'},
+ {'id': 'TER', 'code': 'TER', 'name': '', 'logo': 'sncf/TER.png','logo_light': 'sncf/TER_light.png','symbol': null,'symbol_light': null},
+ {'id': 'TGV', 'code': 'TGV', 'name': '', 'logo': 'sncf/inoui.png','logo_light': 'sncf/inoui_light.png','symbol': null,'symbol_light': null},
+ {'id': 'IC', 'code': 'IC', 'name': '', 'logo': 'sncf/intercites.png','logo_light': 'sncf/intercites_light.png','symbol': null,'symbol_light': null},
+ {'id': 'SNCF','code': 'SNCF', 'name': '', 'logo': 'sncf/SNCF.png','logo_light': 'sncf/SNCF_light.png','symbol': null,'symbol_light': null},
+ ]
+);
\ No newline at end of file
diff --git a/lib/src/screens/schedules_departures.dart b/lib/src/screens/schedules_departures.dart
index a45e0ead..77edc896 100644
--- a/lib/src/screens/schedules_departures.dart
+++ b/lib/src/screens/schedules_departures.dart
@@ -87,8 +87,8 @@ class _DepartureDetailsState extends State with SingleTickerPr
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(globals.schedulesStopName, style: appBarTitle),
- if (LINES.getLinesById(departure['id']).libelle != '')
- Text(LINES.getLinesById(departure['id']).libelle,
+ if (LINES.getLines(departure) != null && LINES.getLines(departure)!['name'] != '')
+ Text(LINES.getLines(departure)!['name'],
style: appBarSubtitle),
],
),
diff --git a/lib/src/screens/settings.dart b/lib/src/screens/settings.dart
index ee40fa16..215b478d 100644
--- a/lib/src/screens/settings.dart
+++ b/lib/src/screens/settings.dart
@@ -1,4 +1,3 @@
-import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
@@ -272,6 +271,7 @@ class _SettingsState extends State {
color: Colors.white,
),
),
+
Container(
padding: const EdgeInsets.only(left: 20, right: 20, top: 10, bottom: 10),
child: const Text(
diff --git a/lib/src/screens/trafic.dart b/lib/src/screens/trafic.dart
index 48caf63f..7a3d38de 100644
--- a/lib/src/screens/trafic.dart
+++ b/lib/src/screens/trafic.dart
@@ -242,39 +242,39 @@ class _TraficState extends State {
child: Wrap(
children: [
TraficBlock(
- name: 'TRANSILIEN H',
+ name: 'Transilien H',
trafic: trafic,
),
TraficBlock(
- name: 'TRANSILIEN J',
+ name: 'Transilien J',
trafic: trafic,
),
TraficBlock(
- name: 'TRANSILIEN K',
+ name: 'Transilien K',
trafic: trafic,
),
TraficBlock(
- name: 'TRANSILIEN L',
+ name: 'Transilien L',
trafic: trafic,
),
TraficBlock(
- name: 'TRANSILIEN N',
+ name: 'Transilien N',
trafic: trafic,
),
TraficBlock(
- name: 'TRANSILIEN P',
+ name: 'Transilien P',
trafic: trafic,
),
TraficBlock(
- name: 'TRANSILIEN R',
+ name: 'Transilien R',
trafic: trafic,
),
TraficBlock(
- name: 'TRANSILIEN U',
+ name: 'Transilien U',
trafic: trafic,
),
TraficBlock(
- name: 'TRANSILIEN V',
+ name: 'Transilien V',
trafic: trafic,
),
],
@@ -285,7 +285,7 @@ class _TraficState extends State {
divider,
-// METRO
+// Métro
Row(
children: [
Container(
@@ -304,67 +304,67 @@ class _TraficState extends State {
child: Wrap(
children: [
TraficBlock(
- name: 'METRO 1',
+ name: 'Métro 1',
trafic: trafic,
),
TraficBlock(
- name: 'METRO 2',
+ name: 'Métro 2',
trafic: trafic,
),
TraficBlock(
- name: 'METRO 3',
+ name: 'Métro 3',
trafic: trafic,
),
TraficBlock(
- name: 'METRO 3B',
+ name: 'Métro 3bis',
trafic: trafic,
),
TraficBlock(
- name: 'METRO 4',
+ name: 'Métro 4',
trafic: trafic,
),
TraficBlock(
- name: 'METRO 5',
+ name: 'Métro 5',
trafic: trafic,
),
TraficBlock(
- name: 'METRO 6',
+ name: 'Métro 6',
trafic: trafic,
),
TraficBlock(
- name: 'METRO 7',
+ name: 'Métro 7',
trafic: trafic,
),
TraficBlock(
- name: 'METRO 7B',
+ name: 'Métro 7bis',
trafic: trafic,
),
TraficBlock(
- name: 'METRO 8',
+ name: 'Métro 8',
trafic: trafic,
),
TraficBlock(
- name: 'METRO 9',
+ name: 'Métro 9',
trafic: trafic,
),
TraficBlock(
- name: 'METRO 10',
+ name: 'Métro 10',
trafic: trafic,
),
TraficBlock(
- name: 'METRO 11',
+ name: 'Métro 11',
trafic: trafic,
),
TraficBlock(
- name: 'METRO 12',
+ name: 'Métro 12',
trafic: trafic,
),
TraficBlock(
- name: 'METRO 13',
+ name: 'Métro 13',
trafic: trafic,
),
TraficBlock(
- name: 'METRO 14',
+ name: 'Métro 14',
trafic: trafic,
),
TraficBlock(
@@ -402,59 +402,59 @@ class _TraficState extends State {
child: Wrap(
children: [
TraficBlock(
- name: 'T1',
+ name: 'Tram T1',
trafic: trafic,
),
TraficBlock(
- name: 'T2',
+ name: 'Tram T2',
trafic: trafic,
),
TraficBlock(
- name: 'T3A',
+ name: 'Tram T3a',
trafic: trafic,
),
TraficBlock(
- name: 'T3B',
+ name: 'Tram T3b',
trafic: trafic,
),
TraficBlock(
- name: 'T4',
+ name: 'Tram T4',
trafic: trafic,
),
TraficBlock(
- name: 'T5',
+ name: 'Tram T5',
trafic: trafic,
),
TraficBlock(
- name: 'T6',
+ name: 'Tram T6',
trafic: trafic,
),
TraficBlock(
- name: 'T7',
+ name: 'Tram T7',
trafic: trafic,
),
TraficBlock(
- name: 'T8',
+ name: 'Tram T8',
trafic: trafic,
),
TraficBlock(
- name: 'T9',
+ name: 'Tram T9',
trafic: trafic,
),
TraficBlock(
- name: 'T10',
+ name: 'Tram T10',
trafic: trafic,
),
TraficBlock(
- name: 'T11',
+ name: 'Tram T11',
trafic: trafic,
),
TraficBlock(
- name: 'T12',
+ name: 'Tram T12',
trafic: trafic,
),
TraficBlock(
- name: 'T13',
+ name: 'Tram T13',
trafic: trafic,
),
],
diff --git a/lib/src/screens/trafic_details.dart b/lib/src/screens/trafic_details.dart
index f44f647e..40b9cd2d 100644
--- a/lib/src/screens/trafic_details.dart
+++ b/lib/src/screens/trafic_details.dart
@@ -41,8 +41,8 @@ class _TraficDetailsState extends State {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text('Info Trafic', style: appBarTitle),
- if (LINES.getLinesById(globals.lineTrafic['id']).libelle != '')
- Text(LINES.getLinesById(globals.lineTrafic['id']).libelle, style: appBarSubtitle),
+ if (LINES.getLines(globals.lineTrafic) != null && LINES.getLines(globals.lineTrafic)!['name'] != '')
+ Text(LINES.getLines(globals.lineTrafic)!['name'], style: appBarSubtitle),
],
),
actions: [
diff --git a/lib/src/screens/trafic_work_schedule.dart b/lib/src/screens/trafic_work_schedule.dart
index 02caa05c..68687d39 100644
--- a/lib/src/screens/trafic_work_schedule.dart
+++ b/lib/src/screens/trafic_work_schedule.dart
@@ -8,7 +8,6 @@ import 'package:navika/src/screens/journeys.dart';
import 'package:navika/src/screens/navigation_bar.dart';
import 'package:navika/src/style.dart';
import 'package:navika/src/data/global.dart' as globals;
-import 'package:navika/src/utils.dart';
import 'package:navika/src/widgets/trafic_details/disruptions.dart';
Map shortDay = {
@@ -174,8 +173,8 @@ class _TraficWorkScheduleState extends State {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text('Calendrier des travaux', style: appBarTitle),
- if (LINES.getLinesById(globals.lineTrafic['id']).libelle != '')
- Text(LINES.getLinesById(globals.lineTrafic['id']).libelle, style: appBarSubtitle),
+ if (LINES.getLines(globals.lineTrafic) != null && LINES.getLines(globals.lineTrafic)!['name'] != '')
+ Text(LINES.getLines(globals.lineTrafic)!['name'], style: appBarSubtitle),
],
),
),
diff --git a/lib/src/style.dart b/lib/src/style.dart
index 1fa6fec8..b0618793 100644
--- a/lib/src/style.dart
+++ b/lib/src/style.dart
@@ -114,9 +114,9 @@ getShimmerHighlightColor(context) {
String getIconLine(Brightness brightness, line) {
if (Brightness.dark == brightness) {
- return line.imageLight;
+ return 'assets/img/icons/${line['logo_light']}';
}
- return line.imageDark;
+ return 'assets/img/icons/${line['logo']}';
}
Color getActiveColor(context, status) {
diff --git a/lib/src/utils.dart b/lib/src/utils.dart
index 66c0e4c9..2b759271 100644
--- a/lib/src/utils.dart
+++ b/lib/src/utils.dart
@@ -61,38 +61,38 @@ int getMaxLength(int max, List list) {
return list.length;
}
-Map? getTraficLines(Info line) {
+Map? getTraficLines(Map line) {
for (var lines in globals.trafic) {
- if (lines['id'] == line.id) {
+ if (lines['id'] == line['id']) {
return lines;
}
}
return null;
}
-Map getDefaultLine(Info line) {
+Map getDefaultLine(Map line) {
return {
- 'id': line.id,
- 'code': line.name,
- 'name': line.libelle,
+ 'id': line['id'],
+ 'code': line['code'],
+ 'name': line['name'],
'color': 'aaaaaa',
'text_color': '000000',
};
}
Map? getReports(String lineId) {
- return getTraficLines(LINES.getLines(lineId))?['reports'];
+ return getTraficLines(LINES.getLines(lineId)!)?['reports'];
}
int? getSeverity(String lineId) {
- return getTraficLines(LINES.getLines(lineId))?['severity'];
+ return getTraficLines(LINES.getLines(lineId)!)?['severity'];
}
String getModeImage(Brightness brightness, line) {
- if (LINES.isLineById(line['id'])) {
+ if (LINES.getLines(line) != null && LINES.getLines(line)!['symbol'] != null) {
return Brightness.light == brightness
- ? LINES.getLinesById(line['id']).imageModeDark
- : LINES.getLinesById(line['id']).imageModeLight;
+ ? 'assets/img/icons/${LINES.getLines(line)!['symbol']}'
+ : 'assets/img/icons/${LINES.getLines(line)!['symbol_light']}';
}
String img = 'assets/img/icons/';
diff --git a/lib/src/widgets/departures/block.dart b/lib/src/widgets/departures/block.dart
index ce8fad3b..0c3aef2a 100644
--- a/lib/src/widgets/departures/block.dart
+++ b/lib/src/widgets/departures/block.dart
@@ -60,21 +60,22 @@ class DeparturesBlock extends StatelessWidget {
brightness: Theme.of(context).colorScheme.brightness,
),
LinesIcones(line: line, size: 30),
- Container(
+ SizedBox(
width: 10,
),
- Text( LINES.getLinesById(line['id']).libelle,
- style: TextStyle(
- fontSize: 16,
- fontWeight: FontWeight.w600,
- fontFamily: 'Segoe Ui',
- color: accentColor(context),
- ),
- maxLines: 1,
- softWrap: false,
- overflow: TextOverflow.fade,
- )
+ if ( LINES.getLines(line) != null )
+ Text( LINES.getLines(line)!['name'],
+ style: TextStyle(
+ fontSize: 16,
+ fontWeight: FontWeight.w600,
+ fontFamily: 'Segoe Ui',
+ color: accentColor(context),
+ ),
+ maxLines: 1,
+ softWrap: false,
+ overflow: TextOverflow.fade,
+ )
],
),
),
diff --git a/lib/src/widgets/icons/lines.dart b/lib/src/widgets/icons/lines.dart
index ec963430..3f5402a1 100644
--- a/lib/src/widgets/icons/lines.dart
+++ b/lib/src/widgets/icons/lines.dart
@@ -21,19 +21,7 @@ class LinesIcones extends StatelessWidget {
@override
Widget build(BuildContext context) => Stack(
children: [
- if (line['code'] == 'TER')
- Container(
- width: size,
- height: size,
- margin: removeMargin
- ? const EdgeInsets.all(0)
- : const EdgeInsets.only(left:3, right:3, top: 5, bottom: 5),
- child: Image(
- image: AssetImage( getIconLine(brightness ?? Theme.of(context).colorScheme.brightness, LINES.getLinesById(line['code'])) )
- ),
- )
-
- else if (line['agency'] != null && line['agency']['name'] == 'Noctilien')
+ if (line['agency'] != null && line['agency']['name'] == 'Noctilien')
Container(
width: size,
height: size * 0.64,
@@ -63,7 +51,7 @@ class LinesIcones extends StatelessWidget {
)
)
- else if (LINES.isLineById(line['id']))
+ else if (LINES.getLines(line) != null && LINES.getLines(line)!['logo'] != null)
Container(
width: size,
height: size,
@@ -71,7 +59,7 @@ class LinesIcones extends StatelessWidget {
? const EdgeInsets.all(0)
: const EdgeInsets.only(left:3, right:3, top: 5, bottom: 5),
child: Image(
- image: AssetImage( getIconLine(brightness ?? Theme.of(context).colorScheme.brightness, LINES.getLinesById(line['id'])) )
+ image: AssetImage( getIconLine(brightness ?? Theme.of(context).colorScheme.brightness, LINES.getLines(line)) )
),
)
diff --git a/lib/src/widgets/icons/mode.dart b/lib/src/widgets/icons/mode.dart
index a67e9be2..4a4d0628 100644
--- a/lib/src/widgets/icons/mode.dart
+++ b/lib/src/widgets/icons/mode.dart
@@ -18,8 +18,8 @@ class ModeIcones extends StatelessWidget {
@override
Widget build(BuildContext context) => Stack(
children: [
- if (line['id'] == 'SNCF' || line['id'] == 'TER' || line['code'] == 'SNCF' || line['code'] == 'TER')
- const Text('')
+ if (['SNCF', 'TGV', 'IC'].contains(line['code']))
+ Container()
else
Container(
width: size,
diff --git a/lib/src/widgets/trafic/block.dart b/lib/src/widgets/trafic/block.dart
index b02f6aa4..20728cdb 100644
--- a/lib/src/widgets/trafic/block.dart
+++ b/lib/src/widgets/trafic/block.dart
@@ -10,7 +10,7 @@ Map getTrafic(List trafic, String? name, Map? line) {
String id = '';
if (name != null) {
- id = LINES.getLines(name).id;
+ id = LINES.getLines(name)!['id'];
} else if (line!['id'] != null) {
id = line['id'];
@@ -25,7 +25,9 @@ Map getTrafic(List trafic, String? name, Map? line) {
// Si on a rien
if (name != null) {
- return getDefaultLine(LINES.getLines(name));
+ if (LINES.getLines(name) != null) {
+ return getDefaultLine(LINES.getLines(name)!);
+ }
}
return line!;
diff --git a/pubspec.yaml b/pubspec.yaml
index d502f810..98fb9783 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -238,12 +238,18 @@ flutter:
- assets/img/icons/lines/TRAM_T13.png
- assets/img/icons/lines/TRAM_T13_light.png
- - assets/img/icons/sncf/logo_white.png
+ - assets/img/icons/sncf/logo_light.png
- assets/img/icons/sncf/logo_color.png
- assets/img/icons/sncf/logo.png
- assets/img/icons/sncf/TER.png
- - assets/img/icons/sncf/TER_white.png
+ - assets/img/icons/sncf/TER_light.png
- assets/img/icons/sncf/TER_color.png
+ - assets/img/icons/sncf/inoui.png
+ - assets/img/icons/sncf/inoui_light.png
+ - assets/img/icons/sncf/inoui_color.png
+ - assets/img/icons/sncf/intercites.png
+ - assets/img/icons/sncf/intercites_color.png
+ - assets/img/icons/sncf/intercites_light.png
- assets/img/icons/lines/CDGVAL.png
- assets/img/icons/lines/ORLYVAL.png
@@ -277,22 +283,22 @@ flutter:
- assets/img/modal/acces_ufr.png
- assets/img/modal/acces_ufr_train.png
- assets/img/modal/alert.png
- - assets/img/modal/alert_white.png
+ - assets/img/modal/alert_light.png
- assets/img/modal/emergency_call.png
- assets/img/modal/emergency_signal.png
- assets/img/modal/error.png
- - assets/img/modal/error_white.png
+ - assets/img/modal/error_light.png
- assets/img/modal/futur_work.png
- assets/img/modal/information.png
- - assets/img/modal/information_white.png
+ - assets/img/modal/information_light.png
- assets/img/modal/interogation.png
- assets/img/modal/interogation_grey.png
- - assets/img/modal/interogation_white.png
+ - assets/img/modal/interogation_light.png
- assets/img/modal/valid.png
- - assets/img/modal/valid_white.png
+ - assets/img/modal/valid_light.png
- assets/img/modal/warning.png
- assets/img/modal/work.png
- - assets/img/modal/work_white.png
+ - assets/img/modal/work_light.png
- assets/img/sign_top.svg
- assets/img/bus_schedules.png