fix bugs
This commit is contained in:
parent
2674233113
commit
6486590224
@ -313,7 +313,7 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
|
||||
initialValue: sectionDTO.data,
|
||||
onChanged: (String data) {
|
||||
sectionDTO.data = data;
|
||||
save(false, sectionDTO, appContext);
|
||||
//save(false, sectionDTO, appContext);
|
||||
},
|
||||
);
|
||||
case SectionType.slider:
|
||||
|
||||
@ -83,9 +83,9 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
|
||||
Client clientAPI = appContext.getContext().clientAPI;
|
||||
ExportConfigurationDTO export = await clientAPI.configurationApi.configurationExport(configurationDTO.id);
|
||||
File test = await FileHelper().storeConfiguration(export);
|
||||
showNotification(Colors.green, kWhite, "l'export de la configuration a réussi, le document se trouve là : " + test.path, context, 3000);
|
||||
showNotification(Colors.green, kWhite, "L'export de la configuration a réussi, le document se trouve là : " + test.path, context, 3000);
|
||||
} catch(e) {
|
||||
showNotification(kPrimaryColor, kWhite, "l'export de la configuration a échoué", context, null);
|
||||
showNotification(kPrimaryColor, kWhite, "L'export de la configuration a échoué", context, null);
|
||||
}
|
||||
},
|
||||
child: Padding(
|
||||
|
||||
@ -78,8 +78,8 @@ class _DeviceElementState extends State<DeviceElement> {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
AutoSizeText(
|
||||
deviceDTO.configuration,
|
||||
style: new TextStyle(fontSize: 25),
|
||||
deviceDTO.configuration != null ? deviceDTO.configuration : "Aucune configuration",
|
||||
style: new TextStyle(fontSize: 20),
|
||||
maxLines: 1,
|
||||
),
|
||||
],
|
||||
|
||||
@ -53,25 +53,26 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
|
||||
if (isRememberMe) {
|
||||
Session updatedSession = new Session(rememberMe: isRememberMe, host: host, email: email, password: password);
|
||||
print("REMBER ME TEST SESSIOn");
|
||||
// update JSON FILE
|
||||
FileHelper().writeSession(updatedSession);
|
||||
}
|
||||
|
||||
showNotification(Colors.lightGreen, kWhite, 'Connexion réussie', context, null);
|
||||
|
||||
ManagerAppContext managerAppContext = appContext.getContext();
|
||||
// Set the appContext
|
||||
if (appContext.getContext() == null) {
|
||||
ManagerAppContext managerAppContext = new ManagerAppContext();
|
||||
// store user info locally
|
||||
managerAppContext.email = email;
|
||||
managerAppContext.token = token;
|
||||
managerAppContext.clientAPI = clientAPI;
|
||||
print(managerAppContext);
|
||||
|
||||
appContext.setContext(managerAppContext);
|
||||
if (managerAppContext == null) {
|
||||
managerAppContext = new ManagerAppContext();
|
||||
}
|
||||
|
||||
// store user info locally
|
||||
managerAppContext.email = email;
|
||||
managerAppContext.token = token;
|
||||
managerAppContext.clientAPI = clientAPI;
|
||||
print(managerAppContext);
|
||||
|
||||
appContext.setContext(managerAppContext);
|
||||
|
||||
setState(() {
|
||||
isLoading = false;
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user