-
Notifications
You must be signed in to change notification settings - Fork 808
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved all the widgets release source
- Loading branch information
1 parent
cd0b01d
commit 132a0f1
Showing
647 changed files
with
142,413 additions
and
6,230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
packages/syncfusion_flutter_barcodes/lib/src/barcode_generator/theme.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]; | ||
} |
132 changes: 132 additions & 0 deletions
132
packages/syncfusion_flutter_barcodes/lib/src/test/codabar_testcases/codabar_samples.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
6 changes: 6 additions & 0 deletions
6
packages/syncfusion_flutter_barcodes/lib/src/test/codabar_testcases/codabar_test.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import 'codabar_testcases.dart'; | ||
|
||
/// Codabar test scripts | ||
void codabarTestCases() { | ||
codabarSamples(); | ||
} |
Oops, something went wrong.