Remove description for detail screen for article + remove all print..
This commit is contained in:
parent
e64977f95e
commit
7c594bc82d
@ -64,8 +64,8 @@ getContent(List<TranslationDTO> translations, int maxLines) {
|
|||||||
maxLines: maxLines,
|
maxLines: maxLines,
|
||||||
initialValue: translation.value,
|
initialValue: translation.value,
|
||||||
onChanged: (String value) {
|
onChanged: (String value) {
|
||||||
print("onChanged value in tranbslationTAB");
|
//print("onChanged value in tranbslationTAB");
|
||||||
print(value);
|
//print(value);
|
||||||
translation.value = value;
|
translation.value = value;
|
||||||
},
|
},
|
||||||
cursorColor: kPrimaryColor,
|
cursorColor: kPrimaryColor,
|
||||||
|
|||||||
@ -28,7 +28,7 @@ class _UploadOnlineResourceContainerState extends State<UploadOnlineResourceCont
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
Size size = MediaQuery.of(context).size;
|
Size size = MediaQuery.of(context).size;
|
||||||
print(size.width);
|
//print(size.width);
|
||||||
return displayElement(size);
|
return displayElement(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,7 +94,7 @@ class _UploadOnlineResourceContainerState extends State<UploadOnlineResourceCont
|
|||||||
hintText: widget.resourceDTO.type == ResourceType.imageUrl ? "Url de l'image" : "Url de la vidéo",
|
hintText: widget.resourceDTO.type == ResourceType.imageUrl ? "Url de l'image" : "Url de la vidéo",
|
||||||
icon: widget.resourceDTO.type == ResourceType.imageUrl ? Icons.image : Icons.ondemand_video, // TODO: TBD
|
icon: widget.resourceDTO.type == ResourceType.imageUrl ? Icons.image : Icons.ondemand_video, // TODO: TBD
|
||||||
onChanged: (String text) {
|
onChanged: (String text) {
|
||||||
print("onchanged url");
|
//print("onchanged url");
|
||||||
widget.resourceDTO.data = text;
|
widget.resourceDTO.data = text;
|
||||||
widget.onChanged(widget.resourceDTO);
|
widget.onChanged(widget.resourceDTO);
|
||||||
},
|
},
|
||||||
@ -104,7 +104,7 @@ class _UploadOnlineResourceContainerState extends State<UploadOnlineResourceCont
|
|||||||
),
|
),
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
print("refresh preview");
|
//print("refresh preview");
|
||||||
setState(() {
|
setState(() {
|
||||||
urlResourceToShow = widget.resourceDTO.data;
|
urlResourceToShow = widget.resourceDTO.data;
|
||||||
});
|
});
|
||||||
|
|||||||
@ -86,7 +86,7 @@ class FileHelper {
|
|||||||
if (e.toString().contains("cannot find the file")) {
|
if (e.toString().contains("cannot find the file")) {
|
||||||
final path = await _localPath;
|
final path = await _localPath;
|
||||||
new File('$path/session.json').createSync(recursive: true);
|
new File('$path/session.json').createSync(recursive: true);
|
||||||
print("file created");
|
//print("file created");
|
||||||
await writeSession(new Session(rememberMe: false));
|
await writeSession(new Session(rememberMe: false));
|
||||||
}
|
}
|
||||||
// If encountering an error, return 0
|
// If encountering an error, return 0
|
||||||
|
|||||||
@ -98,10 +98,10 @@ class _GeoPointImageListState extends State<GeoPointImageList> {
|
|||||||
if (result != null) {
|
if (result != null) {
|
||||||
setState(() {
|
setState(() {
|
||||||
ImageGeoPoint newImage = new ImageGeoPoint(imageResourceId: result.id, imageSource: result.type == ResourceType.imageUrl ? result.data : appContext.getContext().clientAPI.resourceApi.apiClient.basePath+"/api/Resource/"+ result.id);
|
ImageGeoPoint newImage = new ImageGeoPoint(imageResourceId: result.id, imageSource: result.type == ResourceType.imageUrl ? result.data : appContext.getContext().clientAPI.resourceApi.apiClient.basePath+"/api/Resource/"+ result.id);
|
||||||
print("REULT IMAGES = ");
|
//print("REULT IMAGES = ");
|
||||||
print(newImage);
|
//print(newImage);
|
||||||
imagesGeo.add(newImage);
|
imagesGeo.add(newImage);
|
||||||
print(imagesGeo);
|
//print(imagesGeo);
|
||||||
widget.onChanged(imagesGeo);
|
widget.onChanged(imagesGeo);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -114,8 +114,8 @@ class _MenuConfigState extends State<MenuConfig> {
|
|||||||
true,
|
true,
|
||||||
(SectionDTO newSubsection) {
|
(SectionDTO newSubsection) {
|
||||||
setState(() {
|
setState(() {
|
||||||
print("RECEIVED new swubssection");
|
//print("RECEIVED new swubssection");
|
||||||
print(newSubsection);
|
//print(newSubsection);
|
||||||
menuDTO.sections.add(newSubsection);
|
menuDTO.sections.add(newSubsection);
|
||||||
widget.onChanged(jsonEncode(menuDTO).toString());
|
widget.onChanged(jsonEncode(menuDTO).toString());
|
||||||
});
|
});
|
||||||
|
|||||||
@ -129,8 +129,8 @@ getSpecificData(SectionDTO sectionDTO, BuildContext context, AppContext appConte
|
|||||||
return MapConfig(
|
return MapConfig(
|
||||||
initialValue: sectionDTO.data,
|
initialValue: sectionDTO.data,
|
||||||
onChanged: (String data) {
|
onChanged: (String data) {
|
||||||
print("Received info in parent");
|
//print("Received info in parent");
|
||||||
print(data);
|
//print(data);
|
||||||
sectionDTO.data = data;
|
sectionDTO.data = data;
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@ -141,8 +141,8 @@ getSpecificData(SectionDTO sectionDTO, BuildContext context, AppContext appConte
|
|||||||
child: SliderConfig(
|
child: SliderConfig(
|
||||||
initialValue: sectionDTO.data,
|
initialValue: sectionDTO.data,
|
||||||
onChanged: (String data) {
|
onChanged: (String data) {
|
||||||
print("Received info in parent");
|
//print("Received info in parent");
|
||||||
print(data);
|
//print(data);
|
||||||
sectionDTO.data = data;
|
sectionDTO.data = data;
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@ -160,8 +160,8 @@ getSpecificData(SectionDTO sectionDTO, BuildContext context, AppContext appConte
|
|||||||
return MenuConfig(
|
return MenuConfig(
|
||||||
initialValue: sectionDTO.data,
|
initialValue: sectionDTO.data,
|
||||||
onChanged: (String data) {
|
onChanged: (String data) {
|
||||||
print("Received info in parent");
|
//print("Received info in parent");
|
||||||
print(data);
|
//print(data);
|
||||||
sectionDTO.data = data;
|
sectionDTO.data = data;
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@ -181,6 +181,7 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
|
|||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
isTitle: true,
|
isTitle: true,
|
||||||
),
|
),
|
||||||
|
if(sectionDTO.type != SectionType.article)
|
||||||
MultiStringContainer(
|
MultiStringContainer(
|
||||||
label: "Description affichée:",
|
label: "Description affichée:",
|
||||||
modalLabel: "Description",
|
modalLabel: "Description",
|
||||||
@ -357,7 +358,7 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
|
|||||||
return MenuConfig(
|
return MenuConfig(
|
||||||
initialValue: sectionDTO.data,
|
initialValue: sectionDTO.data,
|
||||||
onChanged: (String data) {
|
onChanged: (String data) {
|
||||||
print("Received info in parent");
|
//print("Received info in parent");
|
||||||
//print(data);
|
//print(data);
|
||||||
sectionDTO.data = data;
|
sectionDTO.data = data;
|
||||||
},
|
},
|
||||||
@ -366,7 +367,7 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
|
|||||||
return QuizzConfig(
|
return QuizzConfig(
|
||||||
initialValue: sectionDTO.data,
|
initialValue: sectionDTO.data,
|
||||||
onChanged: (String data) {
|
onChanged: (String data) {
|
||||||
print("Received info in parent - quizz");
|
//print("Received info in parent - quizz");
|
||||||
//print(data);
|
//print(data);
|
||||||
sectionDTO.data = data;
|
sectionDTO.data = data;
|
||||||
},
|
},
|
||||||
@ -375,7 +376,7 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
|
|||||||
return ArticleConfig(
|
return ArticleConfig(
|
||||||
initialValue: sectionDTO.data,
|
initialValue: sectionDTO.data,
|
||||||
onChanged: (String data) {
|
onChanged: (String data) {
|
||||||
print("Received info in parent - article");
|
//print("Received info in parent - article");
|
||||||
//print(data);
|
//print(data);
|
||||||
sectionDTO.data = data;
|
sectionDTO.data = data;
|
||||||
save(false, sectionDTO, appContext);
|
save(false, sectionDTO, appContext);
|
||||||
|
|||||||
@ -177,7 +177,7 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
|
|||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
var tempOutput = new List<String>.from(value);
|
var tempOutput = new List<String>.from(value);
|
||||||
configurationDTO.languages = tempOutput;
|
configurationDTO.languages = tempOutput;
|
||||||
print(configurationDTO.languages);
|
//print(configurationDTO.languages);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
CheckInputContainer(
|
CheckInputContainer(
|
||||||
|
|||||||
@ -135,7 +135,7 @@ class _ConfigurationsScreenState extends State<ConfigurationsScreen> {
|
|||||||
|
|
||||||
Future<List<ConfigurationDTO>> getConfigurations(dynamic appContext) async {
|
Future<List<ConfigurationDTO>> getConfigurations(dynamic appContext) async {
|
||||||
List<ConfigurationDTO> configurations = await appContext.getContext().clientAPI.configurationApi.configurationGet();
|
List<ConfigurationDTO> configurations = await appContext.getContext().clientAPI.configurationApi.configurationGet();
|
||||||
print("number of configurations " + configurations.length.toString());
|
//print("number of configurations " + configurations.length.toString());
|
||||||
configurations.forEach((element) {
|
configurations.forEach((element) {
|
||||||
//print(element);
|
//print(element);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -145,9 +145,9 @@ getConfigurationsElement(DeviceDTO inputDevice, data, Function onGetResult) {
|
|||||||
|
|
||||||
Future<List<ConfigurationDTO>> getConfigurations(dynamic appContext) async {
|
Future<List<ConfigurationDTO>> getConfigurations(dynamic appContext) async {
|
||||||
List<ConfigurationDTO> configurations = await appContext.getContext().clientAPI.configurationApi.configurationGet();
|
List<ConfigurationDTO> configurations = await appContext.getContext().clientAPI.configurationApi.configurationGet();
|
||||||
print("number of configurations " + configurations.length.toString());
|
//print("number of configurations " + configurations.length.toString());
|
||||||
configurations.forEach((element) {
|
configurations.forEach((element) {
|
||||||
print(element);
|
//print(element);
|
||||||
});
|
});
|
||||||
return configurations;
|
return configurations;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -99,8 +99,8 @@ class _DeviceElementState extends State<DeviceElement> {
|
|||||||
(DeviceDTO outputDevice) {
|
(DeviceDTO outputDevice) {
|
||||||
// For refresh
|
// For refresh
|
||||||
setState(() {
|
setState(() {
|
||||||
print("output");
|
//print("output");
|
||||||
print(outputDevice);
|
//print(outputDevice);
|
||||||
deviceDTO = outputDevice;
|
deviceDTO = outputDevice;
|
||||||
// Update device main info
|
// Update device main info
|
||||||
updateMainInfos(deviceDTO, appContext);
|
updateMainInfos(deviceDTO, appContext);
|
||||||
@ -120,9 +120,9 @@ class _DeviceElementState extends State<DeviceElement> {
|
|||||||
|
|
||||||
Future<DeviceDTO> updateMainInfos(DeviceDTO deviceToUpdate, dynamic appContext) async {
|
Future<DeviceDTO> updateMainInfos(DeviceDTO deviceToUpdate, dynamic appContext) async {
|
||||||
ManagerAppContext managerAppContext = appContext.getContext();
|
ManagerAppContext managerAppContext = appContext.getContext();
|
||||||
print(deviceToUpdate);
|
//print(deviceToUpdate);
|
||||||
DeviceDTO device = await managerAppContext.clientAPI.deviceApi.deviceUpdateMainInfos(deviceToUpdate);
|
DeviceDTO device = await managerAppContext.clientAPI.deviceApi.deviceUpdateMainInfos(deviceToUpdate);
|
||||||
print(device);
|
//print(device);
|
||||||
return device;
|
return device;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -224,7 +224,7 @@ boxDecoration() {
|
|||||||
|
|
||||||
Future<List<DeviceDTO>> getDevices(dynamic appContext) async {
|
Future<List<DeviceDTO>> getDevices(dynamic appContext) async {
|
||||||
List<DeviceDTO> devices = await appContext.getContext().clientAPI.deviceApi.deviceGet();
|
List<DeviceDTO> devices = await appContext.getContext().clientAPI.deviceApi.deviceGet();
|
||||||
print("number of devices " + devices.length.toString());
|
//print("number of devices " + devices.length.toString());
|
||||||
devices.forEach((element) {
|
devices.forEach((element) {
|
||||||
//print(element);
|
//print(element);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -35,7 +35,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
bool isRememberMe = false;
|
bool isRememberMe = false;
|
||||||
|
|
||||||
void authenticateTRY(dynamic appContext) async {
|
void authenticateTRY(dynamic appContext) async {
|
||||||
print("try auth.. ");
|
//print("try auth.. ");
|
||||||
|
|
||||||
/*this.host = "http://localhost:5000";
|
/*this.host = "http://localhost:5000";
|
||||||
this.email = "test@email.be";
|
this.email = "test@email.be";
|
||||||
@ -50,8 +50,8 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
isLoading = true;
|
isLoading = true;
|
||||||
});
|
});
|
||||||
print(email);
|
/*print(email);
|
||||||
print(password);
|
print(password);*/
|
||||||
|
|
||||||
LoginDTO loginDTO = new LoginDTO(email: email, password: password);
|
LoginDTO loginDTO = new LoginDTO(email: email, password: password);
|
||||||
TokenDTO token = await clientAPI.authenticationApi.authenticationAuthenticateWithJson(loginDTO);
|
TokenDTO token = await clientAPI.authenticationApi.authenticationAuthenticateWithJson(loginDTO);
|
||||||
@ -75,7 +75,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
managerAppContext.email = email;
|
managerAppContext.email = email;
|
||||||
managerAppContext.token = token;
|
managerAppContext.token = token;
|
||||||
managerAppContext.clientAPI = clientAPI;
|
managerAppContext.clientAPI = clientAPI;
|
||||||
print(managerAppContext);
|
//print(managerAppContext);
|
||||||
|
|
||||||
appContext.setContext(managerAppContext);
|
appContext.setContext(managerAppContext);
|
||||||
|
|
||||||
@ -94,8 +94,8 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
print("error auth");
|
//print("error auth");
|
||||||
print(e);
|
//print(e);
|
||||||
showNotification(Colors.orange, kWhite, 'Un problème est survenu lors de la connexion', context, null);
|
showNotification(Colors.orange, kWhite, 'Un problème est survenu lors de la connexion', context, null);
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|||||||
@ -73,7 +73,7 @@ class _MyAppState extends State<MyApp> {
|
|||||||
|
|
||||||
Future<Session> loadJsonSessionFile() async {
|
Future<Session> loadJsonSessionFile() async {
|
||||||
Session session = await FileHelper().readSession();
|
Session session = await FileHelper().readSession();
|
||||||
print(session);
|
//print(session);
|
||||||
return session;
|
return session;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user