import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:qr_flutter/qr_flutter.dart'; import '../../../../app_settings/app_colors.dart'; import '../../../../tools/submitBtn.dart'; import '../../../../tools/titleAppBar.dart'; class UnlockQRCodePage extends StatefulWidget { const UnlockQRCodePage({Key? key}) : super(key: key); @override State createState() => _UnlockQRCodePageState(); } class _UnlockQRCodePageState extends State { @override Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, appBar: TitleAppBar( barTitle: '微信二维码'.tr, haveBack: true, backgroundColor: AppColors.mainColor), body: Column( children: [ Container( padding: EdgeInsets.all(25.w), margin: EdgeInsets.all(25.w), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(10.h)), ), child: Text( '拥有电子钥匙的人,通过微信扫一扫这个二维码,即可开门。每把锁的二维码都不相同,你可以将其打印出来贴在对应的锁旁边'.tr, style: TextStyle(fontSize: 20.sp), )), Container( width: 1.sw, padding: EdgeInsets.only(top: 50.w), margin: EdgeInsets.only(left: 25.w, right: 25.w), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(10.h)), ), child: Column( children: [ // Image.asset('images/main/icon_addDoorMagnetic_tip.png', width: 300.w, height: 300.w,), // QrImageView( // data:'二维码', // size:300, // ), // QrImage(data: 'www.baidu.com', size: 300.w), QrImageView(data: 'www.baidu.com', size: 260.w), SizedBox( height: 50.w, ), Container( margin: EdgeInsets.only(left: 20.w, right: 20.w), child: SubmitBtn( btnName: '分享'.tr, onClick: () {}), ), SizedBox( height: 60.w, ) ], )), ], )); } }