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.
25 lines
493 B
25 lines
493 B
import 'package:flutter_zxing/flutter_zxing.dart' as zxing; |
|
import 'package:hive_flutter/hive_flutter.dart'; |
|
|
|
part 'code.g.dart'; |
|
|
|
@HiveType(typeId: 0) |
|
class Code extends HiveObject { |
|
Code(); |
|
|
|
Code.fromCodeResult(zxing.Code result) { |
|
isValid = result.isValid; |
|
format = result.format; |
|
text = result.text; |
|
} |
|
@HiveField(0) |
|
bool? isValid; |
|
|
|
@HiveField(1) |
|
int? format; |
|
|
|
@HiveField(2) |
|
String? text; |
|
|
|
String get formatName => zxing.zx.barcodeFormatName(format ?? 0); |
|
}
|
|
|