我一直在寻找如何生成二维码,以及如何在扫描代码后打开文本域,但我一直无法找到任何东西.我看着这个包是为了得到二维码https://pub.dev/packages/qr_flutter,当我扫描它时,我确实得到了Qrdata,但我想要的是,在我扫描代码后,会出现一个弹出窗口,其中包含一个文本字段,我可以在其中输入值,然后可以在代码中使用该值.这有可能吗?如果是的话,有人能告诉我我需要用什么吗?
我try 了QR_Ffltter包,但在生成二维码时,我无法弄清楚如何将数据从手机发送到二维码.
class qrCode extends StatefulWidget {
const qrCode({Key? key}) : super(key: key);
@override
State<qrCode> createState() => _qrCodeState();
}
class _qrCodeState extends State<qrCode> {
final qrKey = GlobalKey();
String qrData = 'Our Qr Data';
@override
Widget build(BuildContext context) {
return Container(
child: RepaintBoundary(
key: qrKey,
child: QrImage(
data: '1', //This is the part we give data to our QR
// embeddedImage: , You can add your custom image to the center of your QR
semanticsLabel: 'hello',
size: 250,
backgroundColor: Colors.white,
version: QrVersions.auto,
//You can also give other versions
),
),
);
}
}