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 only for Android
import 'package:barcode_scan2/barcode_scan2.dart'; import 'package:barcode_scan2/barcode_scan2.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
...@@ -17,11 +18,11 @@ class QrManager { ...@@ -17,11 +18,11 @@ class QrManager {
static Future<String?> _mobileQrScan() async { static Future<String?> _mobileQrScan() async {
final ScanResult result = await BarcodeScanner.scan( final ScanResult result = await BarcodeScanner.scan(
options: const ScanOptions( options: ScanOptions(
strings: <String, String>{ strings: <String, String>{
'cancel': 'CANCEL', 'cancel': tr('qr_scanner_cancel'),
'flash_on': 'FLASH ON', 'flash_on': tr('qr_scanner_flash_on'),
'flash_off': 'FLASH OFF', 'flash_off': tr('qr_scanner_flash_off'),
}, },
restrictFormat: <BarcodeFormat>[BarcodeFormat.qr], restrictFormat: <BarcodeFormat>[BarcodeFormat.qr],
// useCamera: -1, // useCamera: -1,
......
...@@ -37,7 +37,7 @@ class QrManager { ...@@ -37,7 +37,7 @@ class QrManager {
insetPadding: const EdgeInsets.all(5), insetPadding: const EdgeInsets.all(5),
shape: const RoundedRectangleBorder( shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(10.0))), 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), 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