-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflutter text.txt
More file actions
67 lines (58 loc) · 2.64 KB
/
flutter text.txt
File metadata and controls
67 lines (58 loc) · 2.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Widget get scannedDataView => RichText(
textAlign: TextAlign.center,
text: TextSpan(
style: TextStyle(
color: Theme.of(context).textTheme.bodyText1?.color,
height: 0.8),
children: [
const TextSpan(text: 'Scanned code: '),
TextSpan(
text: '${scannedData?.code}\n\n',
style: const TextStyle(fontWeight: FontWeight.bold)),
]),
)
Widget get scannedDataView => RichText(
textAlign: TextAlign.center,
text: TextSpan(
style: TextStyle(
color: Theme.of(context).textTheme.bodyText1?.color,
height: 0.8),
children: [
const TextSpan(text: 'Scanned code: '),
TextSpan(
text: '${scannedData?.code}\n\n',
style: const TextStyle(fontWeight: FontWeight.bold)),
/*const TextSpan(text: 'Scanned codeId symbol: '),
TextSpan(
text: '${scannedData?.codeId}\n\n',
style: const TextStyle(fontWeight: FontWeight.bold)),
const TextSpan(text: 'Scanned code type: '),
TextSpan(
text: '${scannedData?.codeType}\n\n',
style: const TextStyle(fontWeight: FontWeight.bold)),
const TextSpan(text: 'Scanned aimId: '),
TextSpan(
text: '${scannedData?.aimId}\n\n',
style: const TextStyle(fontWeight: FontWeight.bold)),
const TextSpan(text: 'Scanned charset: '),
TextSpan(
text: '${scannedData?.charset}\n\n',
style: const TextStyle(fontWeight: FontWeight.bold)),*/
Text("Barcode result $_scanBarcodeResult"),
]
),
); //text in barcode scanner result
---------------------------------------------------------------------------
ElevatedButton(
onPressed: scanBarcodeNormal,
child: Text("Start barcode scan"),
),
if (_scanBarcodeResult != null && _scanBarcodeResult.isNotEmpty)
Text("Barcode result $_scanBarcodeResult\n"),
if (scannedData?.code != null)
Text("Barcode result ${scannedData?.code}\n"), //Text with If condition
ElevatedButton(
onPressed: scanBarcodeNormal,
child: Text("Start barcode scan")),
Text("Barcode result $_scanBarcodeResult\n"),
Text("Barcode result ${scannedData?.code}\n") //normal text