generateAndDisplayQRCode function
Generate and display QR code for the local server URL
Implementation
Future<void> generateAndDisplayQRCode(String url) async {
try {
print('\nπ± QR Code for easy mobile access:');
print('βββββββββββββββββββββββββββββββββββββββ');
// Generate QR code using the QRGenerator class with smaller size
QRGenerator.printQRCodeToTerminal(url, size: 2);
print('βββββββββββββββββββββββββββββββββββββββ');
print('π± Scan this QR code with your mobile device to access the app');
print('π Or manually visit: $url');
} catch (e) {
print('β οΈ Could not generate QR code: $e');
print('π Please manually visit: $url');
}
}