FileIcon constructor

FileIcon({
  1. Key? key,
  2. required String extension,
  3. required double size,
})

Implementation

FileIcon({
  super.key,
  required this.extension,
  required this.size,
}) {
  if (TimeVariables.imgExt
      .any((element) => element.toUpperCase() == extension.toUpperCase())) {
    typeIndex = 0;
  } else if (TimeVariables.vidExt
      .any((element) => element.toUpperCase() == extension.toUpperCase())) {
    typeIndex = 1;
  } else {
    typeIndex = 2;
  }
}