Last updated:
0 purchases
flutter customized scan
flutter_customized_scan #
这是可以自定义UI的Flutter扫码插件,基于HUAWEI ScanKit SDK。
思路源于flutter-scankit
因为他的项目不能自定义UI,所以我基于他的思路重新做了一个可以自定义UI的插件
用法 #
使用前请自行处理权限问题,可以参照flutter-scankit这个项目进行
late ScanController _controller;
@override
void initState() {
super.initState();
_controller = ScanController();
_controller.addCallback((result) => (result){
//二维码扫描回调
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text("扫一扫"),),
body: ConstrainedBox(
constraints: BoxConstraints.expand(),
child:ScanView(
controller: _controller,
child: Container(),
),
),
);
}
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.