mirror of
https://github.com/lifegpc/eh_downloader_flutter.git
synced 2026-07-08 01:30:28 +08:00
Fix copy Image to Clipboard not works on web
This commit is contained in:
6
lib/platform/to_png.dart
Normal file
6
lib/platform/to_png.dart
Normal file
@@ -0,0 +1,6 @@
|
||||
import 'dart:typed_data';
|
||||
import 'package:image/image.dart';
|
||||
|
||||
Future<Uint8List> jpgToPng(Uint8List data) async {
|
||||
return encodePng(decodeJpg(data)!);
|
||||
}
|
||||
5
lib/platform/to_png_none.dart
Normal file
5
lib/platform/to_png_none.dart
Normal file
@@ -0,0 +1,5 @@
|
||||
import 'dart:typed_data';
|
||||
|
||||
Future<Uint8List> jpgToPng(Uint8List data) async {
|
||||
throw UnimplementedError();
|
||||
}
|
||||
Reference in New Issue
Block a user