Skip to content
Snippets Groups Projects
Commit a01e1f42 authored by vjrj's avatar vjrj
Browse files

Qr Manager translated

parent bc906dd7
No related branches found
No related tags found
No related merge requests found
// Import only for Android
import 'package:barcode_scan2/barcode_scan2.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
......@@ -17,11 +18,11 @@ class QrManager {
static Future<String?> _mobileQrScan() async {
final ScanResult result = await BarcodeScanner.scan(
options: const ScanOptions(
options: ScanOptions(
strings: <String, String>{
'cancel': 'CANCEL',
'flash_on': 'FLASH ON',
'flash_off': 'FLASH OFF',
'cancel': tr('qr_scanner_cancel'),
'flash_on': tr('qr_scanner_flash_on'),
'flash_off': tr('qr_scanner_flash_off'),
},
restrictFormat: <BarcodeFormat>[BarcodeFormat.qr],
// useCamera: -1,
......
......@@ -37,7 +37,7 @@ class QrManager {
insetPadding: const EdgeInsets.all(5),
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(10.0))),
title: const Text('Scan QR Code'),
title: Text(tr('qr_scanner_title')),
content: SizedBox(height: height, width: width, child: sc),
);
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment