xuiGetDocsGallery function
List<Widget>
xuiGetDocsGallery({
- required BuildContext context,
- required List docsFileList,
- required void onDelete(
- dynamic
- dynamic onPressedEdit(
- dynamic i
- String? urlToOpenFile,
utilizzalo per avere una lista di documenti
Implementation
List<Widget> xuiGetDocsGallery({required BuildContext context, required List<dynamic> docsFileList, required void Function(dynamic) onDelete, Function(dynamic i)? onPressedEdit, String? urlToOpenFile}) {
var retval = <Widget>[];
if (docsFileList.isNotEmpty) {
for (var i in docsFileList) {
retval.add(GestureDetector(
onTap: () => XUtils.launchURLBrowser(i.blobContainer, i.id, urlToOpenFile),
child: Card(
color: Colors.grey[850],
child: Row(children: [
Expanded(flex: 2, child: Container(padding: EdgeInsets.only(top: 5, left: 5, bottom: 5), child: Text(i.fileName!))),
SizedBox(width: 10),
Container(padding: EdgeInsets.only(top: 5, left: 5, bottom: 5), width: 80, child: Text(XUtils.dateToString(i.dtFile!))),
]))));
}
} else {
retval.add(Container());
}
return retval;
}