Verification add image to slider
This commit is contained in:
parent
93b8dbeb92
commit
15c5430cc7
@ -109,7 +109,7 @@ class _ImageInputContainerState extends State<ImageInputContainer> {
|
|||||||
child: AutoSizeText(
|
child: AutoSizeText(
|
||||||
"Choisir une image",
|
"Choisir une image",
|
||||||
style: TextStyle(color: kWhite),
|
style: TextStyle(color: kWhite),
|
||||||
maxLines: 2,
|
maxLines: 1,
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|||||||
@ -29,7 +29,7 @@ void showNewOrUpdateImageSlider(ImageDTO inputImageDTO, Function getResult, AppC
|
|||||||
|
|
||||||
Size size = MediaQuery.of(context).size;
|
Size size = MediaQuery.of(context).size;
|
||||||
showDialog(
|
showDialog(
|
||||||
builder: (BuildContext context) => AlertDialog(
|
builder: (BuildContext dialogContext) => AlertDialog(
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.all(Radius.circular(20.0))
|
borderRadius: BorderRadius.all(Radius.circular(20.0))
|
||||||
),
|
),
|
||||||
@ -43,8 +43,7 @@ void showNewOrUpdateImageSlider(ImageDTO inputImageDTO, Function getResult, AppC
|
|||||||
Column(
|
Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Align(
|
Center(
|
||||||
alignment: AlignmentDirectional.center,
|
|
||||||
child: ImageInputContainer(
|
child: ImageInputContainer(
|
||||||
label: "Image :",
|
label: "Image :",
|
||||||
initialValue: imageDTO.resourceId,
|
initialValue: imageDTO.resourceId,
|
||||||
@ -56,11 +55,11 @@ void showNewOrUpdateImageSlider(ImageDTO inputImageDTO, Function getResult, AppC
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
child: SingleChildScrollView(
|
height: size.height * 0.33,
|
||||||
child: Column(
|
width: double.infinity,
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
child: ListView(
|
||||||
children: getTranslations(context, appContext, imageDTO),
|
scrollDirection: Axis.horizontal,
|
||||||
),
|
children: getTranslations(dialogContext, appContext, imageDTO),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -83,7 +82,7 @@ void showNewOrUpdateImageSlider(ImageDTO inputImageDTO, Function getResult, AppC
|
|||||||
icon: Icons.undo,
|
icon: Icons.undo,
|
||||||
color: kSecond,
|
color: kSecond,
|
||||||
press: () {
|
press: () {
|
||||||
Navigator.of(context).pop();
|
Navigator.of(dialogContext).pop();
|
||||||
},
|
},
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
),
|
),
|
||||||
@ -100,8 +99,10 @@ void showNewOrUpdateImageSlider(ImageDTO inputImageDTO, Function getResult, AppC
|
|||||||
color: kPrimaryColor,
|
color: kPrimaryColor,
|
||||||
textColor: kWhite,
|
textColor: kWhite,
|
||||||
press: () {
|
press: () {
|
||||||
getResult(imageDTO);
|
if (imageDTO.resourceId != null) {
|
||||||
Navigator.of(context).pop();
|
getResult(imageDTO);
|
||||||
|
Navigator.of(dialogContext).pop();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
),
|
),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user