feat: upgrade flutter pubs

This commit is contained in:
Kingtous
2023-05-11 14:26:59 +08:00
parent 003edd04bd
commit 5b3a8a2c3d
4 changed files with 19 additions and 16 deletions

View File

@@ -46,13 +46,13 @@ class _ScanPageState extends State<ScanPage> {
await picker.pickImage(source: ImageSource.gallery);
if (file != null) {
var image = img.decodeNamedImage(
File(file.path).readAsBytesSync(), file.path)!;
file.path, File(file.path).readAsBytesSync())!;
LuminanceSource source = RGBLuminanceSource(
image.width,
image.height,
image
.getBytes(format: img.Format.abgr)
.getBytes(order: img.ChannelOrder.abgr)
.buffer
.asInt32List());
var bitmap = BinaryBitmap(HybridBinarizer(source));