Browse Source

log unsupport file types

Neeraj Gupta 3 years ago
parent
commit
03364ce60f
1 changed files with 3 additions and 0 deletions
  1. 3 0
      lib/ui/file_widget.dart

+ 3 - 0
lib/ui/file_widget.dart

@@ -1,5 +1,6 @@
 import 'package:flutter/material.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter/widgets.dart';
 import 'package:flutter/widgets.dart';
+import 'package:logging/logging.dart';
 import 'package:photos/models/file.dart';
 import 'package:photos/models/file.dart';
 import 'package:photos/models/file_type.dart';
 import 'package:photos/models/file_type.dart';
 import 'package:photos/ui/video_widget.dart';
 import 'package:photos/ui/video_widget.dart';
@@ -13,6 +14,7 @@ class FileWidget extends StatelessWidget {
   final Function(bool) playbackCallback;
   final Function(bool) playbackCallback;
   final BoxDecoration backgroundDecoration;
   final BoxDecoration backgroundDecoration;
   final bool autoPlay;
   final bool autoPlay;
+  final Logger _logger = Logger('FileWidget');
 
 
   const FileWidget(
   const FileWidget(
     this.file, {
     this.file, {
@@ -48,6 +50,7 @@ class FileWidget extends StatelessWidget {
         playbackCallback: playbackCallback,
         playbackCallback: playbackCallback,
       );
       );
     } else {
     } else {
+      _logger.severe('unsupported file type ${file.fileType}');
       return Icon(Icons.error);
       return Icon(Icons.error);
     }
     }
   }
   }