Skip to content

Commit 132a0f1

Browse files
committed
Moved all the widgets release source
1 parent cd0b01d commit 132a0f1

File tree

647 files changed

+142413
-6230
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

647 files changed

+142413
-6230
lines changed

packages/syncfusion_flutter_barcodes/CHANGELOG.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
## Unreleased
1+
## [25.1.35] - 15/03/2024
22

33
**General**
44
* Provided th​e Material 3 themes support.
55

6-
## [20.2.38] - 07/12/2022
6+
## [22.2.10] 08/22/2023
77

88
**Bugs**
99
* #FB45676 - Now, the QR code generated for all kinds of the input values with 07 [codeVersion](https://pub.dev/documentation/syncfusion_flutter_barcodes/latest/barcodes/QRCode/codeVersion.html), medium [errorCorrectionLevel](https://pub.dev/documentation/syncfusion_flutter_barcodes/latest/barcodes/QRCode/errorCorrectionLevel.html), and alphaNumeric [inputMode](https://pub.dev/documentation/syncfusion_flutter_barcodes/latest/barcodes/QRCode/inputMode.html) will be scannable.

packages/syncfusion_flutter_barcodes/lib/src/barcode_generator/base/barcode_generator.dart

+11-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import '../renderers/one_dimensional/upca_renderer.dart';
3131
import '../renderers/one_dimensional/upce_renderer.dart';
3232
import '../renderers/two_dimensional/datamatrix_renderer.dart';
3333
import '../renderers/two_dimensional/qr_code_renderer.dart';
34+
import '../theme.dart';
3435
import '../two_dimensional/datamatrix_symbology.dart';
3536
import '../two_dimensional/qr_code_symbology.dart';
3637

@@ -274,9 +275,18 @@ class _SfBarcodeGeneratorState extends State<SfBarcodeGenerator> {
274275

275276
SfBarcodeThemeData _updateThemeData(
276277
ThemeData themeData, SfBarcodeThemeData barcodeThemeData) {
278+
final SfBarcodeThemeData effectiveThemeData = BarcodeThemeData(context);
277279
barcodeThemeData = barcodeThemeData.copyWith(
280+
backgroundColor: barcodeThemeData.backgroundColor ??
281+
widget.backgroundColor ??
282+
effectiveThemeData.backgroundColor,
283+
barColor: barcodeThemeData.barColor ??
284+
widget.barColor ??
285+
effectiveThemeData.barColor,
278286
textStyle: themeData.textTheme.bodyMedium!
279-
.copyWith(color: barcodeThemeData.textColor)
287+
.copyWith(
288+
color:
289+
barcodeThemeData.textColor ?? effectiveThemeData.textColor)
280290
.merge(barcodeThemeData.textStyle)
281291
.merge(widget.textStyle));
282292
return barcodeThemeData;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:syncfusion_flutter_core/theme.dart';
3+
4+
/// [BarcodeThemeData] this class provides themeData.
5+
/// BarcodeThemeData class extends the 'SfBarcodeThemeData' class and customize
6+
/// the appearance of a mapping component based on th colorScheme obtained from
7+
/// the provided [BuildContext].
8+
class BarcodeThemeData extends SfBarcodeThemeData {
9+
/// This a constructor that takes a [BuildContext] as a parameter.This context
10+
/// is used for obtaining the colorScheme of the current theme.
11+
BarcodeThemeData(this.context);
12+
13+
/// Property that stores the provided [BuildContext]
14+
/// context is later used to obtain the colorScheme.
15+
final BuildContext context;
16+
17+
/// A late-initialized property representing the color scheme obtained from
18+
/// the current theme using the provided [BuildContext]
19+
late final SfColorScheme colorScheme = SfTheme.colorScheme(context);
20+
21+
@override
22+
Color? get backgroundColor => colorScheme.transparent;
23+
24+
@override
25+
Color? get barColor => colorScheme.onSurface[70];
26+
27+
@override
28+
Color? get textColor => colorScheme.onSurface[70];
29+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
import 'package:flutter/material.dart';
2+
import '../../../barcodes.dart';
3+
4+
/// Returns the codabar generator
5+
SfBarcodeGenerator getCodabarGenerator(String sample) {
6+
late SfBarcodeGenerator barcodeGenerator;
7+
switch (sample) {
8+
case 'with-value':
9+
{
10+
barcodeGenerator = SfBarcodeGenerator(
11+
value: '123456',
12+
symbology: Codabar(),
13+
);
14+
}
15+
break;
16+
17+
case 'with-value1':
18+
{
19+
barcodeGenerator = SfBarcodeGenerator(
20+
value: '714411106011348790',
21+
symbology: Codabar(),
22+
);
23+
}
24+
break;
25+
26+
case 'with-specialcharcter':
27+
{
28+
barcodeGenerator = SfBarcodeGenerator(
29+
value: '6738989812:/+',
30+
symbology: Codabar(),
31+
);
32+
}
33+
break;
34+
35+
case 'enable-showValue':
36+
{
37+
barcodeGenerator = SfBarcodeGenerator(
38+
value: '123456',
39+
showValue: true,
40+
symbology: Codabar(),
41+
);
42+
}
43+
break;
44+
45+
case 'show value for longest digit':
46+
{
47+
barcodeGenerator = SfBarcodeGenerator(
48+
value: '714411106011348790123654',
49+
showValue: true,
50+
symbology: Codabar(),
51+
);
52+
}
53+
break;
54+
55+
case 'change bar color':
56+
{
57+
barcodeGenerator = SfBarcodeGenerator(
58+
value: '7144111060113487',
59+
barColor: Colors.green,
60+
symbology: Codabar(),
61+
);
62+
}
63+
break;
64+
65+
case 'chnage background color':
66+
{
67+
barcodeGenerator = SfBarcodeGenerator(
68+
value: '7144111060113487',
69+
backgroundColor: Colors.yellow,
70+
symbology: Codabar(),
71+
);
72+
}
73+
break;
74+
75+
case 'set text spacing with show value':
76+
{
77+
barcodeGenerator = SfBarcodeGenerator(
78+
value: '7144111060113487',
79+
textSpacing: 10,
80+
showValue: true,
81+
symbology: Codabar(),
82+
);
83+
}
84+
break;
85+
86+
case 'text align as start with showValue':
87+
{
88+
barcodeGenerator = SfBarcodeGenerator(
89+
value: '7144111060113487',
90+
textAlign: TextAlign.start,
91+
showValue: true,
92+
symbology: Codabar(),
93+
);
94+
}
95+
break;
96+
97+
case 'set text style with all the properties':
98+
{
99+
barcodeGenerator = SfBarcodeGenerator(
100+
value: '7144111060113487',
101+
textSpacing: 10,
102+
showValue: true,
103+
backgroundColor: Colors.yellow,
104+
barColor: Colors.green,
105+
textAlign: TextAlign.right,
106+
textStyle: const TextStyle(
107+
fontSize: 20,
108+
fontStyle: FontStyle.italic,
109+
fontWeight: FontWeight.bold),
110+
symbology: Codabar(),
111+
);
112+
}
113+
break;
114+
115+
case 'set module with all properties':
116+
{
117+
barcodeGenerator = SfBarcodeGenerator(
118+
value: '7144111060113487',
119+
showValue: true,
120+
textSpacing: 10,
121+
backgroundColor: Colors.yellow,
122+
barColor: Colors.green,
123+
textAlign: TextAlign.end,
124+
textStyle: const TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
125+
symbology: Codabar(module: 2),
126+
);
127+
}
128+
break;
129+
}
130+
131+
return barcodeGenerator;
132+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import 'codabar_testcases.dart';
2+
3+
/// Codabar test scripts
4+
void codabarTestCases() {
5+
codabarSamples();
6+
}

0 commit comments

Comments
 (0)