Flutter plugin for scanning and generating QR codes using the ZXing library, supporting Android, iOS, and desktop platforms
flutterbarcode-generatorbarcode-scannergeneratorqrqrcodeqrcode-generatorqrcode-scannerscannerzxingbarcodezxscanner
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
663 B
37 lines
663 B
3 years ago
|
import 'dart:typed_data';
|
||
|
|
||
|
import 'package:flutter_zxing/flutter_zxing.dart';
|
||
|
import 'package:hive_flutter/hive_flutter.dart';
|
||
|
|
||
|
part "encode.g.dart";
|
||
|
|
||
|
@HiveType(typeId: 1)
|
||
|
class Encode extends HiveObject {
|
||
|
@HiveField(0)
|
||
|
bool? isValid;
|
||
|
|
||
|
@HiveField(1)
|
||
|
int? format;
|
||
|
|
||
|
@HiveField(2)
|
||
|
String? text;
|
||
|
|
||
|
@HiveField(3)
|
||
|
Uint8List? data;
|
||
|
|
||
|
@HiveField(4)
|
||
|
int? length;
|
||
|
|
||
|
Encode();
|
||
|
|
||
3 years ago
|
Encode.fromEncodeResult(EncodeResult result, Uint8List? bytes) {
|
||
3 years ago
|
isValid = result.isValidBool;
|
||
|
format = result.format;
|
||
|
text = result.textString;
|
||
3 years ago
|
data = bytes;
|
||
3 years ago
|
length = result.length;
|
||
|
}
|
||
3 years ago
|
|
||
|
String get formatName => FlutterZxing.formatName(format ?? 0);
|
||
3 years ago
|
}
|