Replace client endpoint + small fixs
This commit is contained in:
parent
da2690cb65
commit
20543dc883
@ -1 +1 @@
|
||||
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"qr_code_scanner","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\qr_code_scanner-1.0.1\\\\","native_build":true,"dependencies":[]},{"name":"sqflite","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-2.0.3+1\\\\","native_build":true,"dependencies":[]}],"android":[{"name":"qr_code_scanner","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\qr_code_scanner-1.0.1\\\\","native_build":true,"dependencies":[]},{"name":"sqflite","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-2.0.3+1\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"sqflite","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-2.0.3+1\\\\","native_build":true,"dependencies":[]}],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"qr_code_scanner","dependencies":[]},{"name":"sqflite","dependencies":[]}],"date_created":"2022-09-17 22:40:40.100790","version":"3.0.3"}
|
||||
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"qr_code_scanner","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\qr_code_scanner-1.0.1\\\\","native_build":true,"dependencies":[]},{"name":"sqflite","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-2.0.3+1\\\\","native_build":true,"dependencies":[]}],"android":[{"name":"qr_code_scanner","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\qr_code_scanner-1.0.1\\\\","native_build":true,"dependencies":[]},{"name":"sqflite","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-2.0.3+1\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"sqflite","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-2.0.3+1\\\\","native_build":true,"dependencies":[]}],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"qr_code_scanner","dependencies":[]},{"name":"sqflite","dependencies":[]}],"date_created":"2022-09-29 18:26:21.662024","version":"3.0.3"}
|
||||
@ -219,22 +219,36 @@ class _ArticlePageState extends State<ArticlePage> {
|
||||
if(sectionDTO == null || articleDTO == null) {
|
||||
await DatabaseHelper.instance.queryWithColumnId(DatabaseTableType.sections, articleId).then((value) async {
|
||||
setState(() {
|
||||
if(value.isNotEmpty) {
|
||||
sectionDTO = DatabaseHelper.instance.getSectionFromDB(value.first);
|
||||
} else {
|
||||
print("EMPTY SECTION");
|
||||
}
|
||||
if(sectionDTO!.type == SectionType.Article) {
|
||||
articleDTO = ArticleDTO.fromJson(jsonDecode(sectionDTO!.data!));
|
||||
}
|
||||
});
|
||||
if(sectionDTO!.imageId != null) {
|
||||
await DatabaseHelper.instance.queryWithColumnId(DatabaseTableType.resources, sectionDTO!.imageId!).then((value) {
|
||||
if(value.isNotEmpty) {
|
||||
resourcesModel.add(DatabaseHelper.instance.getResourceFromDB(value.first));
|
||||
} else {
|
||||
print("EMPTY resourcesModel - first");
|
||||
}
|
||||
});
|
||||
}
|
||||
if(articleDTO!.images!.isNotEmpty) {
|
||||
for (var image in articleDTO!.images!) {
|
||||
if(image.resourceId != null) {
|
||||
await DatabaseHelper.instance.queryWithColumnId(DatabaseTableType.resources, image.resourceId!).then((value) {
|
||||
if(value.isNotEmpty) {
|
||||
resourcesModel.add(DatabaseHelper.instance.getResourceFromDB(value.first));
|
||||
} else {
|
||||
print("EMPTY resourcesModel - second");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/*if(mainResource == null && resourcesModel.isNotEmpty) {
|
||||
mainResource = resourcesModel.first;
|
||||
|
||||
@ -6,7 +6,7 @@ import 'Models/visitContext.dart';
|
||||
|
||||
class AppContext with ChangeNotifier {
|
||||
VisitAppContext _visitContext;
|
||||
Client clientAPI = Client("http://192.168.31.140:8089"); // Replace by https://api.mymuseum.be
|
||||
Client clientAPI = Client("https://api.mymuseum.be"); // Replace by https://api.mymuseum.be //http://192.168.31.140:8089
|
||||
|
||||
AppContext(this._visitContext);
|
||||
|
||||
|
||||
@ -49,7 +49,7 @@ class _MyAppState extends State<MyApp> {
|
||||
create: (_) => AppContext(widget.visitAppContext),
|
||||
child: MaterialApp(
|
||||
debugShowCheckedModeBanner: false,
|
||||
title: 'MyVisit App Demo',
|
||||
title: 'Fort Saint Héribert',
|
||||
initialRoute: widget.initialRoute,
|
||||
localizationsDelegates: const [
|
||||
AppLocalizations.delegate,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user