Open FMorschel opened 6 months ago
For anyone else that comes across this I managed to do it with this bit of code:
import 'package:flutter/src/widgets/framework.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:qr_flutter/qr_flutter.dart';
class WifiQRCode extends ConsumerWidget {
final String ssid;
final String password;
final String encryption;
const WifiQRCode({
super.key,
required this.ssid,
required this.password,
required this.encryption,
});
@override
Widget build(BuildContext context, WidgetRef ref) {
// Format the WiFi QR data string
final wifiData = 'WIFI:T:$encryption;S:$ssid;P:$password;;';
return QrImageView(
data: wifiData,
version: QrVersions.auto,
);
}
}
Is your feature request related to a problem? Please describe. There is a site: https://br.qr-code-generator.com/ and some others that do the same. They have a list of different QRCodes that they support such as "V-Card", "WIFI", etc. Today if I'd like to do this with this package I'd have to manually implement these options.
Describe the solution you'd like I'd like an API for me to create these QRCodes for some of these options (like WIFI, V-Card, etc).
Describe alternatives you've considered Manually implement those defaults myself and give the result to the QR code generator API.