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.

102 lines
3.1 KiB

3 years ago
import 'dart:ui';
3 years ago
import 'package:flutter/material.dart';
3 years ago
// import 'package:flutter_scankit/scan_kit_widget.dart';
3 years ago
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
3 years ago
import 'package:image_pickers/image_pickers.dart';
3 years ago
import 'package:permission_handler/permission_handler.dart';
class QrCodeScanPage extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _QrCodeScanPage();
}
}
class _QrCodeScanPage extends State<QrCodeScanPage> {
3 years ago
// ScanKitController _controller;
// final screenWidth = window.physicalSize.width;
// final screenHeight = window.physicalSize.height;
//
// @override
// void initState() {
// super.initState();
// }
//
// @override
3 years ago
Widget build(BuildContext context) {
3 years ago
// return Scaffold(
// body: Container(
// child: Stack(
// children: [
// Positioned(
// child: Column(
// children: [
// Expanded(
// child: ScanKitWidget(
// callback: (controller) {
// _controller = controller;
// controller.onResult.listen((result) {
// debugPrint("scanning result:$result");
// Navigator.of(context).pop(result);
// });
// },
// continuouslyScan: false,
// boundingBox: Rect.fromLTRB(0, 0, screenWidth, screenHeight),
// ),
// flex: 1,
// ),
// ],
// ),
// top: 0,
// bottom: 0,
// left: 0,
// right: 0,
// ),
// Positioned(
// child: MyAppBar(
// title: "扫码",
// titleColor: Colors.white,
// leadingColor: Colors.white,
// brightness: Brightness.dark,
// background: Colors.transparent,
// action: Container(
// alignment: Alignment.center,
// margin: EdgeInsets.only(right: 16.w),
// child: GestureDetector(
// onTap: () {
// _controller.pickPhoto();
// },
// child: Text(
// S.of(context).xiangce,
// style: TextStyle(
// color: Colors.black,
// fontSize: 18.sp,
// fontWeight: FontWeight.bold,
// ),
// ),
// ),
// ),
// ),
// top: 0,
// left: 0,
// right: 0,
// ),
// ],
// ),
// ),
// );
3 years ago
}
3 years ago
//
// @override
// void dispose() {
// // if (this._controller != null) {
// // this._controller.dispose();
// // }
// super.dispose();
// }
3 years ago
}