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('βββββββββββββββββββββββββββββββββββββββ');
// Create a proper QR code pattern
final qrString = _generateQRCode(url);
print(qrString);
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');
}
}