Add Image select for article type + change icon for qr code download
This commit is contained in:
parent
025338ae9f
commit
e64977f95e
@ -40,7 +40,7 @@ class _DownloadPDFState extends State<DownloadPDF> {
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(left: 5.0),
|
||||
child: Icon(Icons.cloud_download, color: kPrimaryColor)
|
||||
child: Icon(Icons.qr_code, color: kPrimaryColor)
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@ -146,6 +146,16 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
if(sectionDTO.type == SectionType.article)
|
||||
Container(
|
||||
width: size.width *0.1,
|
||||
height: 125,
|
||||
child: QrImage(
|
||||
data: sectionDTO.id,
|
||||
version: QrVersions.auto,
|
||||
size: 50.0,
|
||||
),
|
||||
),
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@ -188,25 +198,18 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
|
||||
],
|
||||
),
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if(sectionDTO.type != SectionType.article)
|
||||
ImageInputContainer(
|
||||
label: "Image :",
|
||||
initialValue: sectionDTO != null ? sectionDTO.imageId : "",
|
||||
color: kPrimaryColor,
|
||||
onChanged: (ResourceDTO resource) {
|
||||
sectionDTO.imageId = resource.id;
|
||||
sectionDTO.imageSource = resource.type == ResourceType.imageUrl ? resource.data : appContext.getContext().clientAPI.resourceApi.apiClient.basePath+"/api/Resource/"+ resource.id;
|
||||
},
|
||||
)
|
||||
else
|
||||
QrImage(
|
||||
data: sectionDTO.id,
|
||||
version: QrVersions.auto,
|
||||
size: 200.0,
|
||||
),
|
||||
ImageInputContainer(
|
||||
label: "Image :",
|
||||
initialValue: sectionDTO != null ? sectionDTO.imageId : "",
|
||||
color: kPrimaryColor,
|
||||
onChanged: (ResourceDTO resource) {
|
||||
sectionDTO.imageId = resource.id;
|
||||
sectionDTO.imageSource = resource.type == ResourceType.imageUrl ? resource.data : appContext.getContext().clientAPI.resourceApi.apiClient.basePath+"/api/Resource/"+ resource.id;
|
||||
},
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user