diff --git a/assets/images/ar.svg b/assets/images/ar.svg
new file mode 100644
index 0000000..63d2fbf
--- /dev/null
+++ b/assets/images/ar.svg
@@ -0,0 +1,26 @@
+
\ No newline at end of file
diff --git a/assets/images/cn.svg b/assets/images/cn.svg
new file mode 100644
index 0000000..7f27dae
--- /dev/null
+++ b/assets/images/cn.svg
@@ -0,0 +1,11 @@
+
diff --git a/assets/images/de.svg b/assets/images/de.svg
new file mode 100644
index 0000000..ccb5ff1
--- /dev/null
+++ b/assets/images/de.svg
@@ -0,0 +1,5 @@
+
diff --git a/assets/images/en.svg b/assets/images/en.svg
new file mode 100644
index 0000000..b261273
--- /dev/null
+++ b/assets/images/en.svg
@@ -0,0 +1,7 @@
+
diff --git a/assets/images/es.svg b/assets/images/es.svg
new file mode 100644
index 0000000..f9c9b4b
--- /dev/null
+++ b/assets/images/es.svg
@@ -0,0 +1,547 @@
+
diff --git a/assets/images/fr.svg b/assets/images/fr.svg
new file mode 100644
index 0000000..dfa34e8
--- /dev/null
+++ b/assets/images/fr.svg
@@ -0,0 +1,7 @@
+
diff --git a/assets/images/it.svg b/assets/images/it.svg
new file mode 100644
index 0000000..b9596d0
--- /dev/null
+++ b/assets/images/it.svg
@@ -0,0 +1,7 @@
+
diff --git a/assets/images/nl.svg b/assets/images/nl.svg
new file mode 100644
index 0000000..eb0e360
--- /dev/null
+++ b/assets/images/nl.svg
@@ -0,0 +1,5 @@
+
diff --git a/assets/images/DE.png b/assets/images/old/DE.png
similarity index 100%
rename from assets/images/DE.png
rename to assets/images/old/DE.png
diff --git a/assets/images/EN.png b/assets/images/old/EN.png
similarity index 100%
rename from assets/images/EN.png
rename to assets/images/old/EN.png
diff --git a/assets/images/FR.png b/assets/images/old/FR.png
similarity index 100%
rename from assets/images/FR.png
rename to assets/images/old/FR.png
diff --git a/assets/images/NL.png b/assets/images/old/NL.png
similarity index 100%
rename from assets/images/NL.png
rename to assets/images/old/NL.png
diff --git a/assets/images/pl.svg b/assets/images/pl.svg
new file mode 100644
index 0000000..8c43577
--- /dev/null
+++ b/assets/images/pl.svg
@@ -0,0 +1,6 @@
+
diff --git a/assets/images/uk.svg b/assets/images/uk.svg
new file mode 100644
index 0000000..7c55d48
--- /dev/null
+++ b/assets/images/uk.svg
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/lib/Helpers/DatabaseHelper.dart b/lib/Helpers/DatabaseHelper.dart
index 91029ca..2ccbd12 100644
--- a/lib/Helpers/DatabaseHelper.dart
+++ b/lib/Helpers/DatabaseHelper.dart
@@ -16,6 +16,7 @@ class DatabaseHelper {
static final columnHost = 'host';
static final columnConfiguration = 'configuration';
static final columnLanguage = 'language';
+ static final columnInstanceId = 'instanceId';
DatabaseHelper._privateConstructor();
static final DatabaseHelper instance = DatabaseHelper._privateConstructor();
@@ -41,7 +42,8 @@ class DatabaseHelper {
$columnDeviceId TEXT NOT NULL,
$columnHost TEXT NOT NULL,
$columnConfiguration TEXT,
- $columnLanguage TEXT NOT NULL
+ $columnLanguage TEXT NOT NULL,
+ $columnInstanceId TEXT NOT NULL
)
''');
}
diff --git a/lib/Helpers/MQTTHelper.dart b/lib/Helpers/MQTTHelper.dart
index eb4ec86..dc71266 100644
--- a/lib/Helpers/MQTTHelper.dart
+++ b/lib/Helpers/MQTTHelper.dart
@@ -1,11 +1,14 @@
import 'dart:convert';
+import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:manager_api/api.dart';
+import 'package:mqtt_client/mqtt_browser_client.dart';
import 'package:mqtt_client/mqtt_client.dart';
import 'package:mqtt_client/mqtt_server_client.dart';
import 'package:tablet_app/Helpers/DeviceInfoHelper.dart';
import 'package:tablet_app/Models/tabletContext.dart';
+import 'package:tablet_app/app_context.dart';
import 'DatabaseHelper.dart';
@@ -18,69 +21,80 @@ class MQTTHelper {
print('Connected !!!!!!!!!!!! ----------------------------------');
TabletAppContext tabletAppContext = appContext.getContext();
- tabletAppContext.clientMQTT!.updates!.listen((List> c) async {
- final MqttPublishMessage message = c[0].payload as MqttPublishMessage;
+ if(kIsWeb) {
+ tabletAppContext.clientBrowserMQTT!.updates!.listen((List> c) async {
+ handleMessage(appContext, c);
+ });
+ } else {
+ tabletAppContext.clientMQTT!.updates!.listen((List> c) async {
+ handleMessage(appContext, c);
+ });
+ }
+ }
- final payload = MqttPublishPayload.bytesToStringAsString(message.payload.message);
- print('Received message:$payload from topic: ${c[0].topic}');
+ Future handleMessage(AppContext appContext, List> c) async {
+ TabletAppContext tabletAppContext = appContext.getContext();
+ final MqttPublishMessage message = c[0].payload as MqttPublishMessage;
- var topic = c[0].topic.split('/')[0];
+ final payload = MqttPublishPayload.bytesToStringAsString(message.payload.message);
+ print('Received message:$payload from topic: ${c[0].topic}');
- switch(topic) {
- case "config":
- print('Get message in topic config = $payload');
- var configId = c[0].topic.split('/')[1];
- if (configId != null) {
- // Check if tablet config
- print("Check if tablet config");
- print(tabletAppContext.configuration);
- if (tabletAppContext.configuration != null) {
- if (tabletAppContext.configuration!.id == configId) {
- // refresh config
- try {
- PlayerMessageDTO playerMessage = PlayerMessageDTO.fromJson(jsonDecode(payload))!;
- var isConfigChanged = playerMessage.configChanged != null ? playerMessage.configChanged : false;
- var isDeleted = playerMessage.isDeleted != null ? playerMessage.isDeleted : false;
- print(isDeleted);
- if (isDeleted!) {
- // Clear all
- print("isDeleted");
- tabletAppContext.configuration = null;
- appContext.setContext(tabletAppContext);
- // UPDATE IT LOCALLY (SQLite)
- await DatabaseHelper.instance.update(tabletAppContext);
+ var topic = c[0].topic.split('/')[0];
- } else {
- if (isConfigChanged!) {
- updateConfig(appContext);
- }
+ switch(topic) {
+ case "config":
+ print('Get message in topic config = $payload');
+ var configId = c[0].topic.split('/')[1];
+ if (configId != null) {
+ // Check if tablet config
+ print("Check if tablet config");
+ print(tabletAppContext.configuration);
+ if (tabletAppContext.configuration != null) {
+ if (tabletAppContext.configuration!.id == configId) {
+ // refresh config
+ try {
+ PlayerMessageDTO playerMessage = PlayerMessageDTO.fromJson(jsonDecode(payload))!;
+ var isConfigChanged = playerMessage.configChanged != null ? playerMessage.configChanged : false;
+ var isDeleted = playerMessage.isDeleted != null ? playerMessage.isDeleted : false;
+ print(isDeleted);
+ if (isDeleted!) {
+ // Clear all
+ print("isDeleted");
+ tabletAppContext.configuration = null;
+ appContext.setContext(tabletAppContext);
+ // UPDATE IT LOCALLY (SQLite)
+ await DatabaseHelper.instance.update(tabletAppContext);
+
+ } else {
+ if (isConfigChanged!) {
+ updateConfig(appContext);
}
+ }
- }
- catch(e) {
- print('Error = $e');
- }
+ }
+ catch(e) {
+ print('Error = $e');
}
}
}
- break;
- case "player":
- print('Get message in topic player = $payload');
+ }
+ break;
+ case "player":
+ print('Get message in topic player = $payload');
- // refresh device info
- try {
- PlayerMessageDTO playerMessage = PlayerMessageDTO.fromJson(jsonDecode(payload))!;
- var isConfigChanged = playerMessage.configChanged != null ? playerMessage.configChanged : false;
- if (isConfigChanged!) {
- updateDevice(appContext);
- }
+ // refresh device info
+ try {
+ PlayerMessageDTO playerMessage = PlayerMessageDTO.fromJson(jsonDecode(payload))!;
+ var isConfigChanged = playerMessage.configChanged != null ? playerMessage.configChanged : false;
+ if (isConfigChanged!) {
+ updateDevice(appContext);
}
- catch(e) {
- print('Error = $e');
- }
- break;
- }
- });
+ }
+ catch(e) {
+ print('Error = $e');
+ }
+ break;
+ }
}
// unconnected
@@ -103,25 +117,16 @@ class MQTTHelper {
print('Unsubscribed topic: $topic');
}
- Future connect(dynamic appContext) async {
+ Future connect(dynamic appContext) async {
TabletAppContext tabletAppContext = appContext.getContext();
- var identifier = await DeviceInfoHelper.getDeviceDetails();
+ var identifier = kIsWeb ? "Demo Web" : await DeviceInfoHelper.getDeviceDetails();
var hostToTake = tabletAppContext.host;
if(tabletAppContext.host!.lastIndexOf(":") > 5)
{
hostToTake = tabletAppContext.host!.substring(0,tabletAppContext.host!.lastIndexOf(":"));
}
- tabletAppContext.clientMQTT = MqttServerClient.withPort(hostToTake!.replaceAll('http://', ''), 'tablet_app_'+identifier!, 1883);
- isInstantiated = true;
-
- tabletAppContext.clientMQTT!.logging(on: false);
- tabletAppContext.clientMQTT!.keepAlivePeriod = 20;
- tabletAppContext.clientMQTT!.onDisconnected = onDisconnected;
- tabletAppContext.clientMQTT!.onConnected = () => onConnected(appContext);
- tabletAppContext.clientMQTT!.onSubscribed = onSubscribed;
-
var message = {
"deviceId": tabletAppContext.deviceId != null ? tabletAppContext.deviceId : identifier,
"connected": false
@@ -135,37 +140,85 @@ class MQTTHelper {
.startClean()
.withWillQos(MqttQos.atLeastOnce);
- tabletAppContext.clientMQTT!.connectionMessage = connMessage;
- tabletAppContext.clientMQTT!.autoReconnect = true;
- try {
- await tabletAppContext.clientMQTT!.connect();
+ if(kIsWeb) {
+ tabletAppContext.clientBrowserMQTT = MqttBrowserClient.withPort(hostToTake!.replaceAll('http://', ''), 'tablet_app_'+identifier!, 1883);
+ tabletAppContext.clientBrowserMQTT!.logging(on: false);
+ tabletAppContext.clientBrowserMQTT!.keepAlivePeriod = 20;
+ tabletAppContext.clientBrowserMQTT!.onDisconnected = onDisconnected;
+ tabletAppContext.clientBrowserMQTT!.onConnected = () => onConnected(appContext);
+ tabletAppContext.clientBrowserMQTT!.onSubscribed = onSubscribed;
- // For get config changed request
- if(tabletAppContext.configuration != null) {
- tabletAppContext.clientMQTT!.subscribe('config/#', MqttQos.atLeastOnce);
+ tabletAppContext.clientBrowserMQTT!.connectionMessage = connMessage;
+ tabletAppContext.clientBrowserMQTT!.autoReconnect = true;
+ try {
+ await tabletAppContext.clientBrowserMQTT!.connect();
+
+ // For get config changed request
+ if(tabletAppContext.configuration != null) {
+ tabletAppContext.clientBrowserMQTT!.subscribe('config/#', MqttQos.atLeastOnce);
+ }
+
+ // For get device assignation config request
+ if(tabletAppContext.deviceId != null) {
+ tabletAppContext.clientBrowserMQTT!.subscribe('player/${tabletAppContext.deviceId}', MqttQos.atLeastOnce);
+
+ var message = {
+ "deviceId": tabletAppContext.deviceId,
+ "connected": true
+ };
+
+ const pubTopic = 'player/status';
+ final builder = MqttClientPayloadBuilder();
+
+ builder.addString(jsonEncode(message));
+ tabletAppContext.clientBrowserMQTT!.publishMessage(pubTopic, MqttQos.atLeastOnce, builder.payload!);
+ }
+ } catch (e) {
+ print('Exception clientBrowserMQTT: $e');
+ tabletAppContext.clientBrowserMQTT!.disconnect();
}
+ } else {
+ tabletAppContext.clientMQTT = MqttServerClient.withPort(hostToTake!.replaceAll('http://', ''), 'tablet_app_'+identifier!, 1883);
+ tabletAppContext.clientMQTT!.logging(on: false);
+ tabletAppContext.clientMQTT!.keepAlivePeriod = 20;
+ tabletAppContext.clientMQTT!.onDisconnected = onDisconnected;
+ tabletAppContext.clientMQTT!.onConnected = () => onConnected(appContext);
+ tabletAppContext.clientMQTT!.onSubscribed = onSubscribed;
- // For get device assignation config request
- if(tabletAppContext.deviceId != null) {
- tabletAppContext.clientMQTT!.subscribe('player/${tabletAppContext.deviceId}', MqttQos.atLeastOnce);
+ tabletAppContext.clientMQTT!.connectionMessage = connMessage;
+ tabletAppContext.clientMQTT!.autoReconnect = true;
+ try {
+ await tabletAppContext.clientMQTT!.connect();
- var message = {
- "deviceId": tabletAppContext.deviceId,
- "connected": true
- };
+ // For get config changed request
+ if(tabletAppContext.configuration != null) {
+ tabletAppContext.clientMQTT!.subscribe('config/#', MqttQos.atLeastOnce);
+ }
- const pubTopic = 'player/status';
- final builder = MqttClientPayloadBuilder();
+ // For get device assignation config request
+ if(tabletAppContext.deviceId != null) {
+ tabletAppContext.clientMQTT!.subscribe('player/${tabletAppContext.deviceId}', MqttQos.atLeastOnce);
- builder.addString(jsonEncode(message));
- tabletAppContext.clientMQTT!.publishMessage(pubTopic, MqttQos.atLeastOnce, builder.payload!);
+ var message = {
+ "deviceId": tabletAppContext.deviceId,
+ "connected": true
+ };
+
+ const pubTopic = 'player/status';
+ final builder = MqttClientPayloadBuilder();
+
+ builder.addString(jsonEncode(message));
+ tabletAppContext.clientMQTT!.publishMessage(pubTopic, MqttQos.atLeastOnce, builder.payload!);
+ }
+ } catch (e) {
+ print('Exception clientMQTT: $e');
+ tabletAppContext.clientMQTT!.disconnect();
}
- } catch (e) {
- print('Exception: $e');
- tabletAppContext.clientMQTT!.disconnect();
}
- return tabletAppContext.clientMQTT!;
+ isInstantiated = true;
+
+ return kIsWeb ? tabletAppContext.clientBrowserMQTT : tabletAppContext.clientMQTT!;
}
Future updateDevice(dynamic appContext) async {
diff --git a/lib/Models/tabletContext.dart b/lib/Models/tabletContext.dart
index 01dd9cc..b63fe37 100644
--- a/lib/Models/tabletContext.dart
+++ b/lib/Models/tabletContext.dart
@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:manager_api/api.dart';
+import 'package:mqtt_client/mqtt_browser_client.dart';
import 'package:mqtt_client/mqtt_server_client.dart';
import 'package:tablet_app/client.dart';
import 'dart:convert';
@@ -8,13 +9,15 @@ import 'dart:convert';
class TabletAppContext with ChangeNotifier{
Client? clientAPI;
MqttServerClient? clientMQTT;
+ MqttBrowserClient? clientBrowserMQTT;
String? id;
String? host;
ConfigurationDTO? configuration;
String? language;
String? deviceId;
+ String? instanceId;
- TabletAppContext({this.id, this.deviceId, this.host, this.configuration, this.language});
+ TabletAppContext({this.id, this.deviceId, this.host, this.configuration, this.language, this.instanceId, this.clientAPI});
Map toMap() {
return {
@@ -22,7 +25,8 @@ class TabletAppContext with ChangeNotifier{
'deviceId': deviceId,
'host': host,
'configuration': configuration == null ? null : jsonEncode(configuration!.toJson()),
- 'language': language
+ 'language': language,
+ 'instanceId': instanceId
};
}
@@ -32,13 +36,14 @@ class TabletAppContext with ChangeNotifier{
deviceId: json['deviceId'] as String,
host: json['host'] as String,
configuration: json['configuration'] == null ? null : ConfigurationDTO.fromJson(json['configuration']),
- language: json['language'] as String
+ language: json['language'] as String,
+ instanceId: json['instanceId'] as String
);
}
// Implement toString to make it easier to see information about
@override
String toString() {
- return 'TabletAppContext{id: $id, deviceId: $deviceId, configuration: $configuration, language: $language, host: $host}';
+ return 'TabletAppContext{id: $id, deviceId: $deviceId, configuration: $configuration, language: $language, host: $host, instanceId: $instanceId, clientAPI: $clientAPI}';
}
}
\ No newline at end of file
diff --git a/lib/Screens/Configuration/config_view.dart b/lib/Screens/Configuration/config_view.dart
index 22170eb..f55e10e 100644
--- a/lib/Screens/Configuration/config_view.dart
+++ b/lib/Screens/Configuration/config_view.dart
@@ -1,9 +1,11 @@
import 'package:device_info/device_info.dart';
+import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:manager_api/api.dart';
+import 'package:mqtt_client/mqtt_browser_client.dart';
import 'package:mqtt_client/mqtt_server_client.dart';
import 'package:provider/provider.dart';
import 'package:tablet_app/Components/Buttons/rounded_button.dart';
@@ -39,10 +41,10 @@ class _ConfigViewWidget extends State {
SystemChrome.setEnabledSystemUIOverlays([]);
Size size = MediaQuery.of(context).size;
TabletAppContext tabletAppContext = appContext.getContext();
- if (tabletAppContext != null) {
- if (tabletAppContext.host != null)
- url = tabletAppContext.host!;
- }
+
+ if (tabletAppContext.host != null)
+ url = tabletAppContext.host!;
+
return Scaffold(
body: Container(
height: size.height,
@@ -56,48 +58,78 @@ class _ConfigViewWidget extends State {
future: getConfigurations(appContext),
builder: (context, AsyncSnapshot snapshot) {
if (snapshot.connectionState == ConnectionState.done) {
- return Center(
- child: Container(
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(29),
- color: kBackgroundLight,
- ),
- height: size.height*0.3,
- width: size.width*0.3,
- child: Column(
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Padding(
- padding: const EdgeInsets.only(left: 15, right: 15, top: 15, bottom: 5),
- child: Text(
- "Choisir une configuration",
- style: new TextStyle(
- fontSize: 25
+ if (snapshot.data == null || snapshot.data!.length == 0) {
+ return Center(
+ child: Container(
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(29),
+ color: kBackgroundLight,
+ ),
+ height: size.height * 0.2,
+ width: size.width * 0.6,
+ child: Center(
+ child: Text(
+ "Veuillez créer une configuration dans le manager",
+ style: new TextStyle(
+ fontSize: 25
+ ),
+ ),
+ )
+ )
+ );
+ } else {
+ return Center(
+ child: Container(
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(29),
+ color: kBackgroundLight,
+ ),
+ height: size.height*0.3,
+ width: size.width*0.6,
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.spaceEvenly,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ Padding(
+ padding: const EdgeInsets.only(left: 15, right: 15, top: 15, bottom: 5),
+ child: Text(
+ "Choisir une configuration",
+ style: new TextStyle(
+ fontSize: 25
+ ),
),
),
- ),
- DropDownConfig(
- configurations: snapshot.data,
- onChange: (ConfigurationDTO configurationOut) async {
- // CREATE DEVICE REQUEST
- await createDevice(configurationOut, appContext);
+ DropDownConfig(
+ configurations: snapshot.data,
+ onChange: (ConfigurationDTO configurationOut) async {
+ if(!kIsWeb) {
+ // CREATE DEVICE REQUEST
+ await createDevice(configurationOut, appContext);
+ } else {
+ TabletAppContext tabletAppContext = appContext.getContext();
+ tabletAppContext.host = url;
+ tabletAppContext.language = "FR"; // By Default
+ tabletAppContext.configuration = configurationOut;
+ print("Set context - WEB");
+ appContext.setContext(tabletAppContext);
+ }
- Navigator.pushAndRemoveUntil(
- context,
- MaterialPageRoute(
- builder: (context) {
- return MainViewWidget();
- },
- ),
- (Route route) => false // For pushAndRemoveUntil
- );
- },
- ),
- ],
+ Navigator.pushAndRemoveUntil(
+ context,
+ MaterialPageRoute(
+ builder: (context) {
+ return MainViewWidget();
+ },
+ ),
+ (Route route) => false // For pushAndRemoveUntil
+ );
+ },
+ ),
+ ],
+ ),
),
- ),
- );
+ );
+ }
} else if (snapshot.connectionState == ConnectionState.none) {
return Text("No data");
} else {
@@ -115,8 +147,9 @@ class _ConfigViewWidget extends State {
borderRadius: BorderRadius.circular(29),
color: kBackgroundLight,
),
+ constraints: BoxConstraints(maxWidth: 500, minWidth: 450),
height: size.height*0.3,
- width: size.width*0.3,
+ width: size.width*0.6,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center,
@@ -160,15 +193,24 @@ class _ConfigViewWidget extends State {
textColor: Colors.white,
fontSize: 16.0
);
- TabletAppContext tabletAppContext = new TabletAppContext();
- tabletAppContext.host = url;
- tabletAppContext.clientAPI = client;
- // Add if web TODO
- //var identifier = await DeviceInfoHelper.getDeviceDetails();
- var identifier = "WEB TEST";
- // TODO WEB !
- // tabletAppContext.clientMQTT = new MqttServerClient(url.replaceAll('http://', ''),'tablet_app_'+identifier);
+ TabletAppContext? tabletAppContext = appContext.getContext();
+ if(tabletAppContext == null) {
+ TabletAppContext tabletAppContext = new TabletAppContext();
+ tabletAppContext.host = url;
+ }
+
+ tabletAppContext!.clientAPI = client;
+ var identifier = kIsWeb ? "WEB TEST" : await DeviceInfoHelper.getDeviceDetails();
+
+ if(kIsWeb) {
+ tabletAppContext.clientBrowserMQTT = new MqttBrowserClient(url.replaceAll('http://', ''),'tablet_app_'+ identifier!);
+ } else
+ {
+ // mobile specific
+ tabletAppContext!.clientMQTT = new MqttServerClient(url.replaceAll('http://', ''),'tablet_app_'+ identifier!);
+ }
+
setState(() {
appContext.setContext(tabletAppContext);
configOk = true;
@@ -201,16 +243,18 @@ class _ConfigViewWidget extends State {
DeviceDetailDTO newDevice = new DeviceDetailDTO();
newDevice.configurationId = configurationDTO.id;
newDevice.configuration = configurationDTO.label;
+ newDevice.instanceId = tabletAppContext.instanceId;
newDevice.connected = true;
- //newDevice.identifier = await DeviceInfoHelper.getDeviceDetails(); // TODO WEB
- //newDevice.ipAddressWLAN = await getIP(true);
- //newDevice.ipAddressETH = await getIP(false);
- //newDevice.name = newDevice.ipAddressWLAN;
- newDevice.name = "WEB TEST";
+ newDevice.identifier = await DeviceInfoHelper.getDeviceDetails(); // TODO WEB
+ newDevice.ipAddressWLAN = await getIP(true);
+ newDevice.ipAddressETH = await getIP(false);
+ newDevice.name = newDevice.ipAddressWLAN;
print(newDevice);
DeviceDetailDTO? device = await tabletAppContext.clientAPI!.deviceApi!.deviceCreate(newDevice);
+ print("DEVICE RESSSULT");
+ print(device);
if (device != null) {
// STORE IT LOCALLY !!
@@ -220,8 +264,10 @@ class _ConfigViewWidget extends State {
tabletAppContext.host = url;
tabletAppContext.language = "FR"; // By Default
tabletAppContext.configuration = configurationDTO;
- appContext.setContext(tabletAppContext);
+ print("Set context");
+
+ appContext.setContext(tabletAppContext);
// STORE IT LOCALLY (SQLite)
TabletAppContext localContext = await DatabaseHelper.instance.getData();
if (localContext != null) { // Check if sql DB exist
@@ -302,12 +348,14 @@ boxDecoration(SectionDTO section) {
);
}
-Future> getConfigurations(dynamic appContext) async {
-
- List configurations = await appContext.getContext().clientAPI.configurationApi.configurationGet();
- print("number of configurations " + configurations.length.toString());
+Future?> getConfigurations(dynamic appContext) async {
+ TabletAppContext tabletAppContext = (appContext.getContext() as TabletAppContext);
+ print(tabletAppContext);
+ List? configurations = await tabletAppContext.clientAPI!.configurationApi!.configurationGet(instanceId: tabletAppContext.instanceId);
+ print("number of configurations " + configurations!.length.toString());
configurations.forEach((element) {
- print(element);
+ //print(element);
});
- return configurations;
+
+ return configurations.where((config) => config.isTablet!).toList();
}
\ No newline at end of file
diff --git a/lib/Screens/MainView/dropDown_configuration.dart b/lib/Screens/MainView/dropDown_configuration.dart
index 6b2a5b2..d6617f8 100644
--- a/lib/Screens/MainView/dropDown_configuration.dart
+++ b/lib/Screens/MainView/dropDown_configuration.dart
@@ -5,11 +5,11 @@ import 'package:tablet_app/app_context.dart';
import 'package:tablet_app/constants.dart';
class DropDownConfig extends StatefulWidget {
- final List? configurations;
+ final List configurations;
final ValueChanged? onChange;
const DropDownConfig({
Key? key,
- this.configurations,
+ required this.configurations,
this.onChange,
}) : super(key: key);
@@ -18,14 +18,15 @@ class DropDownConfig extends StatefulWidget {
}
class _DropDownConfigState extends State {
- ConfigurationDTO configurationDTO = ConfigurationDTO();
+ ConfigurationDTO? selectedConfigurationDTO;
@override
Widget build(BuildContext context) {
- final appContext = Provider.of(context);
- Size size = MediaQuery.of(context).size;
+ /*final appContext = Provider.of(context);
+ Size size = MediaQuery.of(context).size;*/
+
return DropdownButton(
- value: configurationDTO,
+ value: selectedConfigurationDTO,
icon: const Icon(Icons.arrow_downward),
iconSize: 24,
elevation: 16,
@@ -36,11 +37,11 @@ class _DropDownConfigState extends State {
),
onChanged: (ConfigurationDTO? newValue) {
setState(() {
- configurationDTO = newValue!;
- widget.onChange!(configurationDTO);
+ selectedConfigurationDTO = newValue!;
+ widget.onChange!(selectedConfigurationDTO!);
});
},
- items: widget.configurations!.map>((ConfigurationDTO value) {
+ items: widget.configurations.map>((ConfigurationDTO value) {
return DropdownMenuItem(
value: value,
child: Text(value.label!, style: TextStyle(fontSize: 20, fontWeight: FontWeight.w400)),
diff --git a/lib/Screens/MainView/language_selection.dart b/lib/Screens/MainView/language_selection.dart
index 4dd01ee..d844a30 100644
--- a/lib/Screens/MainView/language_selection.dart
+++ b/lib/Screens/MainView/language_selection.dart
@@ -1,8 +1,10 @@
+import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:tablet_app/Models/tabletContext.dart';
import 'package:tablet_app/app_context.dart';
import 'package:tablet_app/constants.dart';
+import 'package:flutter_svg_provider/flutter_svg_provider.dart';
import 'package:webview_flutter/webview_flutter.dart';
class LanguageSelection extends StatefulWidget {
@@ -31,14 +33,14 @@ class _LanguageSelection extends State with TickerProviderSta
@override
void initState() {
setState(() {
- _leftLanguage = sizeScreen.width - (sizeScreen.width *0.07); //size.width - size.width *0.07;
- _topLanguage = sizeScreen.height * 0.075;
+ _leftLanguage = kIsWeb ? sizeScreen.width - (sizeScreen.width *0.07) : sizeScreen.width - (sizeScreen.width *0.07); //size.width - size.width *0.07;
+ _topLanguage = kIsWeb ? sizeScreen.height * 0.07 : sizeScreen.height * 0.075;
_rightLanguage = 0;
- _bottomLanguage = minimized ? sizeScreen.height*0.6 : sizeScreen.height - (sizeScreen.height *0.07);
+ _bottomLanguage = minimized ? (kIsWeb ? sizeScreen.height*0.8 : sizeScreen.height*0.6) : (kIsWeb ? sizeScreen.height - (sizeScreen.height *0.45) : sizeScreen.height - (sizeScreen.height *0.07));
});
_controller = AnimationController(
- value: 12, vsync: this, duration: Duration(seconds: 1));
+ value: 12, vsync: this, duration: Duration(seconds: 5));
_controller!.animateBack(0);
super.initState();
@@ -54,6 +56,7 @@ class _LanguageSelection extends State with TickerProviderSta
Widget build(BuildContext context) {
final appContext = Provider.of(context);
Size size = MediaQuery.of(context).size;
+
selectedLanguage = (appContext.getContext() as TabletAppContext).language;
languagesEnable = (appContext.getContext() as TabletAppContext).configuration!.languages;
@@ -77,41 +80,36 @@ class _LanguageSelection extends State with TickerProviderSta
)
),
AnimatedPositioned(
- duration: const Duration(milliseconds: 1500),
+ duration: const Duration(seconds: 5),
curve: Curves.fastLinearToSlowEaseIn,
top: _topLanguage,
left: _leftLanguage,
right: _rightLanguage,
bottom: _bottomLanguage,
- child: Container(
- child:
- ListView(
- children: [
- if(minimized) ... [
- for(var language in languagesEnable!.where((element) => element.toUpperCase() != selectedLanguage ))
- InkWell(
- onTap: () {
- setState(() {
- // TODO STORE IT LOCALLY !!
- TabletAppContext tabletAppContext = appContext.getContext();
- tabletAppContext.language = language;
- appContext.setContext(tabletAppContext);
- minimizedAnimation(size);
- });
- },
- child: Padding(
- padding: const EdgeInsets.all(8.0),
- child: Container(
- width: sizeScreen.height *0.07,
- height: sizeScreen.width *0.07,
- decoration: flagDecoration(language),
- ),
+ child: ListView(
+ children: [
+ if(minimized) ... [
+ for(var language in languagesEnable!.where((element) => element.toUpperCase() != selectedLanguage ))
+ InkWell(
+ onTap: () {
+ setState(() {
+ TabletAppContext tabletAppContext = appContext.getContext();
+ tabletAppContext.language = language;
+ appContext.setContext(tabletAppContext);
+ minimizedAnimation(size);
+ });
+ },
+ child: Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: Container(
+ width: sizeScreen.height *0.07,
+ height: kIsWeb ? sizeScreen.height *0.015 : sizeScreen.width *0.07,
+ decoration: flagDecoration(language),
),
- )
- ]
- ],
- )
- ,
+ ),
+ )
+ ]
+ ],
),
),
],
@@ -120,16 +118,17 @@ class _LanguageSelection extends State with TickerProviderSta
minimizedAnimation(Size size) {
minimized = !minimized;
+ print(_controller);
if (minimized) {
_controller!.animateBack(15.0);
} else {
_controller!.animateBack(0.0);
}
setState(() {
- _leftLanguage = size.width - (size.width *0.07); //size.width - size.width *0.07;
- _topLanguage = sizeScreen.height * 0.07;
+ _leftLanguage = kIsWeb ? size.width - (size.width *0.07) : size.width - (size.width *0.07); //size.width - size.width *0.07;
+ _topLanguage = kIsWeb ? sizeScreen.height * 0.06 : sizeScreen.height * 0.07;
_rightLanguage = 0;
- _bottomLanguage = minimized ? size.height*0.6 : size.height - (size.height *0.07);
+ _bottomLanguage = minimized ? (kIsWeb ? size.height*0.2 : size.height*0.6) : (kIsWeb ? size.height - (size.height *0.07) : size.height - (size.height *0.07));
});
}
@@ -138,9 +137,11 @@ class _LanguageSelection extends State with TickerProviderSta
color: kBackgroundColor,
shape: BoxShape.circle,
//border: Border.all(width: 1.5, color: kSecondGrey),
- image: new DecorationImage(
+ image: DecorationImage(
fit: BoxFit.contain,
- image: new AssetImage("assets/images/"+language+".png"),
+ image: Svg(
+ "assets/images/"+language.toLowerCase()+".svg",
+ ), //AssetImage("assets/images/"+language+".png"),
),
boxShadow: [
BoxShadow(
diff --git a/lib/Screens/MainView/main_view.dart b/lib/Screens/MainView/main_view.dart
index 8896bf5..cc7c648 100644
--- a/lib/Screens/MainView/main_view.dart
+++ b/lib/Screens/MainView/main_view.dart
@@ -1,3 +1,4 @@
+import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
@@ -45,6 +46,7 @@ class _MainViewWidget extends State {
if(sectionSelected != null) {
var elementToShow;
+ print(sectionSelected!.type);
switch (sectionSelected!.type) {
case SectionType.map : // MAP
elementToShow = ChangeNotifierProvider(
@@ -90,7 +92,7 @@ class _MainViewWidget extends State {
children: [
Container(
width: size.width,
- height: size.height * 0.12,
+ color: Colors.pink,
child: Row(
children: [
Padding(
@@ -128,7 +130,7 @@ class _MainViewWidget extends State {
alignment: Alignment.centerLeft,
child: AutoSizeText(
sectionSelected!.description!.firstWhere((translation) => translation.language == appContext.getContext().language).value!,
- style: new TextStyle(fontSize: kSectionDescriptionDetailSize),
+ style: new TextStyle(fontSize: kIsWeb? kWebSectionDescriptionDetailSize : kSectionDescriptionDetailSize),
maxLines: 2,
),
)
@@ -167,18 +169,21 @@ class _MainViewWidget extends State {
),
),
floatingActionButtonLocation: FloatingActionButtonLocation.endTop,
- floatingActionButton: Container(
- height: 185.0,
- width: 185.0,
- child: FittedBox(
- child: FloatingActionButton.extended(
- onPressed: () {
- setState(() {
- sectionSelected = null;
- });
- },
- icon: Icon(Icons.arrow_back),
- label: Text("Menu")
+ floatingActionButton: Padding(
+ padding: const EdgeInsets.only(top: kIsWeb ? 16.0 : 0.0),
+ child: Container(
+ height: kIsWeb ? size.height *0.08 : 185.0,
+ width: kIsWeb ? size.width *0.08: 185.0,
+ child: FittedBox(
+ child: FloatingActionButton.extended(
+ onPressed: () {
+ setState(() {
+ sectionSelected = null;
+ });
+ },
+ icon: Icon(Icons.arrow_back),
+ label: Text("Menu")
+ ),
),
),
),
@@ -194,7 +199,7 @@ class _MainViewWidget extends State {
if (appContext.getContext().configuration != null) LanguageSelection(),
Center(
child: Container(
- height: size.height * 0.85,
+ height: kIsWeb ? size.height : size.height * 0.85,
width: size.width * 0.9,
child: FutureBuilder(
future: getSections(appContext),
@@ -205,50 +210,52 @@ class _MainViewWidget extends State {
return Text("");
}
else {
- return GridView.builder(
- shrinkWrap: true,
- gridDelegate: new SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: rowCount),
- itemCount: snapshot.data?.length,
- itemBuilder: (BuildContext context, int index) {
- return InkWell(
- onTap: () {
- setState(() {
- sectionSelected = snapshot.data[index];
- });
- },
- child: Container(
- decoration: boxDecoration(snapshot.data[index], false),
- padding: const EdgeInsets.all(25),
- margin: EdgeInsets.symmetric(vertical: 25, horizontal: 25),
- child: Align(
- alignment: Alignment.bottomRight,
- child: FractionallySizedBox(
- heightFactor: 0.4,
- child: Column(
- children: [
- Align(
- alignment: Alignment.centerRight,
- child: AutoSizeText(
- snapshot.data[index].title.firstWhere((translation) => translation.language == appContext.getContext().language).value,
- style: new TextStyle(fontSize: kMenuTitleDetailSize),
- maxLines: 1,
+ return Center(
+ child: GridView.builder(
+ shrinkWrap: true,
+ gridDelegate: new SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: rowCount),
+ itemCount: snapshot.data?.length,
+ itemBuilder: (BuildContext context, int index) {
+ return InkWell(
+ onTap: () {
+ setState(() {
+ sectionSelected = snapshot.data[index];
+ });
+ },
+ child: Container(
+ decoration: boxDecoration(snapshot.data[index], false),
+ padding: const EdgeInsets.all(25),
+ margin: EdgeInsets.symmetric(vertical: 25, horizontal: 25),
+ child: Align(
+ alignment: Alignment.bottomRight,
+ child: FractionallySizedBox(
+ heightFactor: 0.4,
+ child: Column(
+ children: [
+ Align(
+ alignment: Alignment.centerRight,
+ child: AutoSizeText(
+ snapshot.data[index].title.firstWhere((translation) => translation.language == appContext.getContext().language).value,
+ style: new TextStyle(fontSize: kIsWeb ? kWebMenuTitleDetailSize: kMenuTitleDetailSize),
+ maxLines: 1,
+ ),
),
- ),
- Align(
- alignment: Alignment.centerRight,
- child: AutoSizeText(
- snapshot.data[index].description.firstWhere((translation) => translation.language == appContext.getContext().language).value,
- style: new TextStyle(fontSize: kMenuDescriptionDetailSize, fontFamily: ""),
- maxLines: 1,
+ Align(
+ alignment: Alignment.centerRight,
+ child: AutoSizeText(
+ snapshot.data[index].description.firstWhere((translation) => translation.language == appContext.getContext().language).value,
+ style: new TextStyle(fontSize: kIsWeb ? kWebMenuDescriptionDetailSize: kMenuDescriptionDetailSize, fontFamily: ""),
+ maxLines: 1,
+ ),
),
- ),
- ],
- )
+ ],
+ )
+ ),
),
),
- ),
- );
- }
+ );
+ }
+ ),
);
}
} else if (snapshot.connectionState == ConnectionState.none) {
@@ -275,6 +282,9 @@ class _MainViewWidget extends State {
try {
List? sections = await tabletAppContext.clientAPI!.sectionApi!.sectionGetFromConfiguration(tabletAppContext.configuration!.id!);
sections!.sort((a, b) => a.order!.compareTo(b.order!));
+
+ print("Sections");
+ print(sections);
return sections;
} catch (e) {
print(e);
@@ -298,7 +308,7 @@ boxDecoration(SectionDTO section, bool isSelected) {
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(30.0),
image: section.imageSource != null ? new DecorationImage(
- fit: !isSelected? BoxFit.cover : BoxFit.contain,
+ fit: !isSelected || kIsWeb ? BoxFit.cover : BoxFit.contain,
colorFilter: !isSelected? new ColorFilter.mode(Colors.black.withOpacity(0.5), BlendMode.dstATop) : null,
image: new NetworkImage(
section.imageSource!,
diff --git a/lib/Screens/Menu/menu_view.dart b/lib/Screens/Menu/menu_view.dart
index f6b56d7..3a57cc9 100644
--- a/lib/Screens/Menu/menu_view.dart
+++ b/lib/Screens/Menu/menu_view.dart
@@ -1,5 +1,6 @@
import 'dart:convert';
import 'package:auto_size_text/auto_size_text.dart';
+import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:manager_api/api.dart';
import 'package:provider/provider.dart';
@@ -159,7 +160,7 @@ class _MenuViewWidget extends State {
alignment: Alignment.centerRight,
child: AutoSizeText(
menuDTO.sections![index].title!.firstWhere((translation) => translation.language == appContext.getContext().language).value!,
- style: new TextStyle(fontSize: kMenuTitleDetailSize),
+ style: new TextStyle(fontSize: kIsWeb? kWebMenuTitleDetailSize : kMenuTitleDetailSize),
maxLines: 1,
),
),
@@ -167,7 +168,7 @@ class _MenuViewWidget extends State {
alignment: Alignment.centerRight,
child: AutoSizeText(
menuDTO.sections![index].description!.firstWhere((translation) => translation.language == appContext.getContext().language).value!,
- style: new TextStyle(fontSize: kSectionDescriptionDetailSize, fontFamily: ""),
+ style: new TextStyle(fontSize: kIsWeb? kWebSectionDescriptionDetailSize: kSectionDescriptionDetailSize, fontFamily: ""),
maxLines: 1,
),
),
diff --git a/lib/app_context.dart b/lib/app_context.dart
index ef325e0..3017f1f 100644
--- a/lib/app_context.dart
+++ b/lib/app_context.dart
@@ -3,8 +3,7 @@ import 'package:tablet_app/Models/tabletContext.dart';
import 'package:tablet_app/client.dart';
class AppContext with ChangeNotifier {
- TabletAppContext _tabletContext;
- Client? clientAPI;
+ TabletAppContext? _tabletContext;
AppContext(this._tabletContext);
diff --git a/lib/constants.dart b/lib/constants.dart
index a45573c..6df99b3 100644
--- a/lib/constants.dart
+++ b/lib/constants.dart
@@ -15,7 +15,7 @@ const kBackgroundSecondGrey = Color(0xFF5b5b63);
const kBackgroundLight = Color(0xfff3f3f3);
-const List languages = ["FR", "NL", "EN", "DE"];
+const List languages = ["FR", "NL", "EN", "DE", "IT", "ES", "PL", "CN", "AR", "UK"]; // hmmmm depends on config..
const kTitleSize = 40.0;
const kDescriptionSize = 25.0;
@@ -26,6 +26,12 @@ const kSectionDescriptionDetailSize = 35.0;
const kMenuTitleDetailSize = 45.0;
const kMenuDescriptionDetailSize = 28.0;
+// WEB
+const kWebMenuTitleDetailSize = 30.0;
+const kWebMenuDescriptionDetailSize = 14.0;
+const kWebSectionTitleDetailSize = 35.0;
+const kWebSectionDescriptionDetailSize = 20.0;
+
const kNoneInfoOrIncorrect = 35.0;
/*
diff --git a/lib/main.dart b/lib/main.dart
index 5ca411f..3e5a549 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -41,7 +41,8 @@ void main() async {
}
if(kIsWeb) {
- localContext = TabletAppContext(host: "https://api.mymuseum.be");
+ localContext = TabletAppContext(host: "https://api.mymuseum.be", instanceId: "63514fd67ed8c735aaa4b8f1"); // mymuseum : 63514fd67ed8c735aaa4b8f1
+ print(localContext);
}
initialRoute = isConfig ? '/main' : '/config';
@@ -74,7 +75,7 @@ class _MyAppState extends State {
@override
Widget build(BuildContext context) {
return ChangeNotifierProvider(
- create: (_) => AppContext(widget.tabletAppContext!),
+ create: (_) => AppContext(widget.tabletAppContext),
child: MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Tablet App Demo',
diff --git a/manager_api/lib/model/map_type_app.dart b/manager_api/lib/model/map_type_app.dart
index 9fd93be..e7acad8 100644
--- a/manager_api/lib/model/map_type_app.dart
+++ b/manager_api/lib/model/map_type_app.dart
@@ -74,11 +74,11 @@ class MapTypeAppTypeTransformer {
MapTypeApp? decode(dynamic data, {bool allowNull = true}) {
if (data != null) {
switch (data.toString()) {
- case r'none': return MapTypeApp.none;
- case r'normal': return MapTypeApp.normal;
- case r'satellite': return MapTypeApp.satellite;
- case r'terrain': return MapTypeApp.terrain;
- case r'hybrid': return MapTypeApp.hybrid;
+ case r'None': return MapTypeApp.none;
+ case r'Normal': return MapTypeApp.normal;
+ case r'Satellite': return MapTypeApp.satellite;
+ case r'Terrain': return MapTypeApp.terrain;
+ case r'Hybrid': return MapTypeApp.hybrid;
default:
if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data');
diff --git a/manager_api/lib/model/resource_type.dart b/manager_api/lib/model/resource_type.dart
index adeadd3..5877e37 100644
--- a/manager_api/lib/model/resource_type.dart
+++ b/manager_api/lib/model/resource_type.dart
@@ -74,11 +74,11 @@ class ResourceTypeTypeTransformer {
ResourceType? decode(dynamic data, {bool allowNull = true}) {
if (data != null) {
switch (data.toString()) {
- case r'image': return ResourceType.image;
- case r'video': return ResourceType.video;
- case r'imageUrl': return ResourceType.imageUrl;
- case r'videoUrl': return ResourceType.videoUrl;
- case r'audio': return ResourceType.audio;
+ case r'Image': return ResourceType.image;
+ case r'Video': return ResourceType.video;
+ case r'ImageUrl': return ResourceType.imageUrl;
+ case r'VideoUrl': return ResourceType.videoUrl;
+ case r'Audio': return ResourceType.audio;
default:
if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data');
diff --git a/manager_api/lib/model/section_type.dart b/manager_api/lib/model/section_type.dart
index a2e2985..d47385e 100644
--- a/manager_api/lib/model/section_type.dart
+++ b/manager_api/lib/model/section_type.dart
@@ -78,13 +78,13 @@ class SectionTypeTypeTransformer {
SectionType? decode(dynamic data, {bool allowNull = true}) {
if (data != null) {
switch (data.toString()) {
- case r'map': return SectionType.map;
- case r'slider': return SectionType.slider;
- case r'video': return SectionType.video;
- case r'web': return SectionType.web;
- case r'menu': return SectionType.menu;
- case r'quizz': return SectionType.quizz;
- case r'article': return SectionType.article;
+ case r'Map': return SectionType.map;
+ case r'Slider': return SectionType.slider;
+ case r'Video': return SectionType.video;
+ case r'Web': return SectionType.web;
+ case r'Menu': return SectionType.menu;
+ case r'Quizz': return SectionType.quizz;
+ case r'Article': return SectionType.article;
default:
if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data');
diff --git a/pubspec.lock b/pubspec.lock
index 9183599..345766a 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -318,6 +318,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.7"
+ flutter_svg:
+ dependency: transitive
+ description:
+ name: flutter_svg
+ sha256: "6ff9fa12892ae074092de2fa6a9938fb21dbabfdaa2ff57dc697ff912fc8d4b2"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.6"
+ flutter_svg_provider:
+ dependency: "direct main"
+ description:
+ name: flutter_svg_provider
+ sha256: cbb2d02fd9feb70fc30221fc36a7ee5347f1cceae6b0c99ab4fa011bbd9f1f7f
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.3"
flutter_test:
dependency: "direct dev"
description: flutter
@@ -591,6 +607,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.8.3"
+ path_drawing:
+ dependency: transitive
+ description:
+ name: path_drawing
+ sha256: bbb1934c0cbb03091af082a6389ca2080345291ef07a5fa6d6e078ba8682f977
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.1"
+ path_parsing:
+ dependency: transitive
+ description:
+ name: path_parsing
+ sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.1"
petitparser:
dependency: transitive
description:
diff --git a/pubspec.yaml b/pubspec.yaml
index a48467f..be270a6 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -47,6 +47,7 @@ dependencies:
photo_view: ^0.14.0
confetti: ^0.7.0
flutter_launcher_icons: ^0.10.0 # All but web
+ flutter_svg_provider: ^1.0.3
openapi_generator_cli: ^4.0.0
openapi_generator: ^4.0.0