Skip to content

Commit

Permalink
Moved all the widgets release source
Browse files Browse the repository at this point in the history
  • Loading branch information
BPraveenBalu committed Jun 11, 2024
1 parent cd0b01d commit 132a0f1
Show file tree
Hide file tree
Showing 647 changed files with 142,413 additions and 6,230 deletions.
4 changes: 2 additions & 2 deletions packages/syncfusion_flutter_barcodes/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
## Unreleased
## [25.1.35] - 15/03/2024

**General**
* Provided th​e Material 3 themes support.

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

**Bugs**
* #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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import '../renderers/one_dimensional/upca_renderer.dart';
import '../renderers/one_dimensional/upce_renderer.dart';
import '../renderers/two_dimensional/datamatrix_renderer.dart';
import '../renderers/two_dimensional/qr_code_renderer.dart';
import '../theme.dart';
import '../two_dimensional/datamatrix_symbology.dart';
import '../two_dimensional/qr_code_symbology.dart';

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

SfBarcodeThemeData _updateThemeData(
ThemeData themeData, SfBarcodeThemeData barcodeThemeData) {
final SfBarcodeThemeData effectiveThemeData = BarcodeThemeData(context);
barcodeThemeData = barcodeThemeData.copyWith(
backgroundColor: barcodeThemeData.backgroundColor ??
widget.backgroundColor ??
effectiveThemeData.backgroundColor,
barColor: barcodeThemeData.barColor ??
widget.barColor ??
effectiveThemeData.barColor,
textStyle: themeData.textTheme.bodyMedium!
.copyWith(color: barcodeThemeData.textColor)
.copyWith(
color:
barcodeThemeData.textColor ?? effectiveThemeData.textColor)
.merge(barcodeThemeData.textStyle)
.merge(widget.textStyle));
return barcodeThemeData;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import 'package:flutter/material.dart';
import 'package:syncfusion_flutter_core/theme.dart';

/// [BarcodeThemeData] this class provides themeData.
/// BarcodeThemeData class extends the 'SfBarcodeThemeData' class and customize
/// the appearance of a mapping component based on th colorScheme obtained from
/// the provided [BuildContext].
class BarcodeThemeData extends SfBarcodeThemeData {
/// This a constructor that takes a [BuildContext] as a parameter.This context
/// is used for obtaining the colorScheme of the current theme.
BarcodeThemeData(this.context);

/// Property that stores the provided [BuildContext]
/// context is later used to obtain the colorScheme.
final BuildContext context;

/// A late-initialized property representing the color scheme obtained from
/// the current theme using the provided [BuildContext]
late final SfColorScheme colorScheme = SfTheme.colorScheme(context);

@override
Color? get backgroundColor => colorScheme.transparent;

@override
Color? get barColor => colorScheme.onSurface[70];

@override
Color? get textColor => colorScheme.onSurface[70];
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
import 'package:flutter/material.dart';
import '../../../barcodes.dart';

/// Returns the codabar generator
SfBarcodeGenerator getCodabarGenerator(String sample) {
late SfBarcodeGenerator barcodeGenerator;
switch (sample) {
case 'with-value':
{
barcodeGenerator = SfBarcodeGenerator(
value: '123456',
symbology: Codabar(),
);
}
break;

case 'with-value1':
{
barcodeGenerator = SfBarcodeGenerator(
value: '714411106011348790',
symbology: Codabar(),
);
}
break;

case 'with-specialcharcter':
{
barcodeGenerator = SfBarcodeGenerator(
value: '6738989812:/+',
symbology: Codabar(),
);
}
break;

case 'enable-showValue':
{
barcodeGenerator = SfBarcodeGenerator(
value: '123456',
showValue: true,
symbology: Codabar(),
);
}
break;

case 'show value for longest digit':
{
barcodeGenerator = SfBarcodeGenerator(
value: '714411106011348790123654',
showValue: true,
symbology: Codabar(),
);
}
break;

case 'change bar color':
{
barcodeGenerator = SfBarcodeGenerator(
value: '7144111060113487',
barColor: Colors.green,
symbology: Codabar(),
);
}
break;

case 'chnage background color':
{
barcodeGenerator = SfBarcodeGenerator(
value: '7144111060113487',
backgroundColor: Colors.yellow,
symbology: Codabar(),
);
}
break;

case 'set text spacing with show value':
{
barcodeGenerator = SfBarcodeGenerator(
value: '7144111060113487',
textSpacing: 10,
showValue: true,
symbology: Codabar(),
);
}
break;

case 'text align as start with showValue':
{
barcodeGenerator = SfBarcodeGenerator(
value: '7144111060113487',
textAlign: TextAlign.start,
showValue: true,
symbology: Codabar(),
);
}
break;

case 'set text style with all the properties':
{
barcodeGenerator = SfBarcodeGenerator(
value: '7144111060113487',
textSpacing: 10,
showValue: true,
backgroundColor: Colors.yellow,
barColor: Colors.green,
textAlign: TextAlign.right,
textStyle: const TextStyle(
fontSize: 20,
fontStyle: FontStyle.italic,
fontWeight: FontWeight.bold),
symbology: Codabar(),
);
}
break;

case 'set module with all properties':
{
barcodeGenerator = SfBarcodeGenerator(
value: '7144111060113487',
showValue: true,
textSpacing: 10,
backgroundColor: Colors.yellow,
barColor: Colors.green,
textAlign: TextAlign.end,
textStyle: const TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
symbology: Codabar(module: 2),
);
}
break;
}

return barcodeGenerator;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import 'codabar_testcases.dart';

/// Codabar test scripts
void codabarTestCases() {
codabarSamples();
}
Loading

0 comments on commit 132a0f1

Please sign in to comment.