diff --git a/lib/screens/page_screen.dart b/lib/screens/page_screen.dart index 9c2bc11..68c57c8 100644 --- a/lib/screens/page_screen.dart +++ b/lib/screens/page_screen.dart @@ -103,7 +103,7 @@ class PageScreenState extends NohevaScreenState { return Directionality( textDirection: TextDirection.ltr, child: Scaffold( - backgroundColor: const Color(0xffffffff), + backgroundColor: const Color(0xff000000), body: DeferredPointerHandler( child: Container( width: screenSize.width, diff --git a/lib/utils/offline_file_controller.dart b/lib/utils/offline_file_controller.dart index 0adf64c..b16b094 100644 --- a/lib/utils/offline_file_controller.dart +++ b/lib/utils/offline_file_controller.dart @@ -1,6 +1,7 @@ import "dart:async"; import "dart:convert"; import "dart:io"; +import "dart:typed_data"; import "package:crypto/crypto.dart"; import "package:path_provider/path_provider.dart"; import "package:path/path.dart" as p; @@ -177,18 +178,19 @@ class OfflineFileController { File newFile = await filePart.rename(newFileName); String extension = fileName.substring(fileName.lastIndexOf(".")); - File? videoThumbnail; + Uint8List? videoThumbnail; File? existingVideoThumbnailFileName = File(newFileName.replaceAll(extension, ".thumbnail.jpg")); if (extension == ".mp4") { videoThumbnail = - await VideoCompress.getFileThumbnail(newFile.absolute.path); + await VideoCompress.getByteThumbnail(newFile.absolute.path); } if (videoThumbnail != null && !await existingVideoThumbnailFileName.exists()) { - await videoThumbnail - .rename(newFileName.replaceAll(extension, ".thumbnail.jpg")); + File videoThumbnailFile = + File(newFileName.replaceAll(extension, ".thumbnail.jpg")); + await videoThumbnailFile.writeAsBytes(videoThumbnail); } await _writeMetaFile(existingFile, eTag); SimpleLogger().info("Downloaded $newFileName!"); diff --git a/pubspec.yaml b/pubspec.yaml index ca9db98..128c0f2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: Noheva visitor UI project publish_to: "none" # Remove this line if you wish to publish to pub.dev -version: 0.1.18 +version: 0.1.19-develop.0 environment: sdk: ">=3.0.6 <4.0.0"