有什么方法可以快速扫描信用卡?我尝试了Card IO插件,并尝试使用它,但是当我打开相机时,它只显示一个盒子,当我专注于卡片时,什么也没发生。
使用的包:https://pub.dartlang.org/packages/flutter_card_io
FlatButton(
onPressed: () async {
Map<String, dynamic> details = await FlutterCardIo.scanCard({
"requireExpiry": true,
"scanExpiry": true,
"requireCVV": false,
"requirePostalCode": false,
"restrictPostalCodeToNumericOnly": false,
"requireCardHolderName": false,
"scanInstructions": "Fit the card within the box",
});
print(details);
},
child: Text("Test"),
),
pubspec.yaml
dependencies:
flutter_card_io:
git:
url: git://github.com/procedurallygenerated/flutter_card_io.git
[如果有人知道我的任何可能的方式,将不胜感激!我真的需要它来做一个重要的项目。
[目前,似乎没有其他插件可公开用于Flutter。但是,您提到的那应该工作正常。尝试编译该插件随附的示例应用程序,并使用多张卡对其进行测试。请记住Card.io only works with cards that have raised digits。