bug 2247 fixed

main_production_attahment_type
Sikander Saleem 3 weeks ago
parent 4bdb5c2da3
commit 709b8a699b

@ -42,6 +42,14 @@ class FilesList extends StatelessWidget {
var isPdf = images[itemIndex].split(".").last.toLowerCase() == "pdf"; var isPdf = images[itemIndex].split(".").last.toLowerCase() == "pdf";
var isExcel = images[itemIndex].split(".").last.toLowerCase() == "xlsx"; var isExcel = images[itemIndex].split(".").last.toLowerCase() == "xlsx";
String checkNull(int index) {
try {
return types[itemIndex];
} catch (ex) {
return "Asset Guide";
}
}
return Row( return Row(
spacing: 8, spacing: 8,
children: [ children: [
@ -81,7 +89,7 @@ class FilesList extends StatelessWidget {
2.height, 2.height,
RichText( RichText(
text: TextSpan( text: TextSpan(
text: '${types.isEmpty ? "Asset Guide" : types[itemIndex]} | ', text: '${types.isEmpty ? "Asset Guide" : checkNull(itemIndex)} | ',
style: AppTextStyles.tinyFont.copyWith(color: AppColor.lightTextColor(context)), style: AppTextStyles.tinyFont.copyWith(color: AppColor.lightTextColor(context)),
children: <TextSpan>[ children: <TextSpan>[
TextSpan( TextSpan(

Loading…
Cancel
Save