Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ginkgo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Fred
ginkgo
Commits
a01e1f42
Commit
a01e1f42
authored
1 year ago
by
vjrj
Browse files
Options
Downloads
Patches
Plain Diff
Qr Manager translated
parent
bc906dd7
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/ui/qr_manager_mobile.dart
+5
-4
5 additions, 4 deletions
lib/ui/qr_manager_mobile.dart
lib/ui/qr_manager_web.dart
+1
-1
1 addition, 1 deletion
lib/ui/qr_manager_web.dart
with
6 additions
and
5 deletions
lib/ui/qr_manager_mobile.dart
+
5
−
4
View file @
a01e1f42
// 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,
...
...
This diff is collapsed.
Click to expand it.
lib/ui/qr_manager_web.dart
+
1
−
1
View file @
a01e1f42
...
@@ -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 Cod
e'
),
title:
Text
(
tr
(
'qr_scanner_titl
e'
)
)
,
content:
SizedBox
(
height:
height
,
width:
width
,
child:
sc
),
content:
SizedBox
(
height:
height
,
width:
width
,
child:
sc
),
);
);
});
});
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment