Skip to content

Commit cf3e68b

Browse files
Merge pull request #737 from SriramKiranSenthilkumar/master
Updated widget source files due to Flutter 3.0 Upgrade
2 parents 12067a4 + b767000 commit cf3e68b

File tree

572 files changed

+8916
-4570
lines changed

Some content is hidden

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

572 files changed

+8916
-4570
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Barcode example
2+
3+
How to render Syncfusion Flutter Barcode generator widget?
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Launch Screen Assets
2+
3+
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4+
5+
You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.

packages/syncfusion_flutter_barcodes/lib/src/barcode_generator/renderers/one_dimensional/codabar_renderer.dart

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ class CodabarRenderer extends SymbologyRenderer {
4242
value[i] == 'B' ||
4343
value[i] == 'C' ||
4444
value[i] == 'D') {
45-
throw 'The provided input cannot be encoded : ${value[i]}';
45+
throw ArgumentError(
46+
'The provided input cannot be encoded : ${value[i]}');
4647
}
4748
}
4849
return true;

packages/syncfusion_flutter_barcodes/lib/src/barcode_generator/renderers/one_dimensional/code128_renderer.dart

+2-1
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,8 @@ class Code128Renderer extends SymbologyRenderer {
437437
} else if (currentCharacter < 127) {
438438
return true;
439439
} else {
440-
throw 'The provided input cannot be encoded : ${value[i]}';
440+
throw ArgumentError(
441+
'The provided input cannot be encoded : ${value[i]}');
441442
}
442443
}
443444
return false;

packages/syncfusion_flutter_barcodes/lib/src/barcode_generator/renderers/one_dimensional/code128a_renderer.dart

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ class Code128ARenderer extends Code128Renderer {
1010
bool getIsValidateInput(String value) {
1111
for (int i = 0; i < value.length; i++) {
1212
if (!code128ACharacterSets.contains(value[i])) {
13-
throw 'The provided input cannot be encoded : ${value[i]}';
13+
throw ArgumentError(
14+
'The provided input cannot be encoded : ${value[i]}');
1415
}
1516
}
1617
return true;

packages/syncfusion_flutter_barcodes/lib/src/barcode_generator/renderers/one_dimensional/code128b_renderer.dart

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ class Code128BRenderer extends Code128Renderer {
1010
bool getIsValidateInput(String value) {
1111
for (int i = 0; i < value.length; i++) {
1212
if (!code128BCharacterSets.contains(value[i])) {
13-
throw 'The provided input cannot be encoded : ${value[i]}';
13+
throw ArgumentError(
14+
'The provided input cannot be encoded : ${value[i]}');
1415
}
1516
}
1617
return true;

packages/syncfusion_flutter_barcodes/lib/src/barcode_generator/renderers/one_dimensional/code128c_renderer.dart

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ class Code128CRenderer extends Code128Renderer {
1010
bool getIsValidateInput(String value) {
1111
for (int i = 0; i < value.length; i++) {
1212
if (!code128CCharacterSets.contains(value[i])) {
13-
throw 'The provided input cannot be encoded : ${value[i]}';
13+
throw ArgumentError(
14+
'The provided input cannot be encoded : ${value[i]}');
1415
}
1516
}
1617
return true;

packages/syncfusion_flutter_barcodes/lib/src/barcode_generator/renderers/one_dimensional/code39_extended_renderer.dart

+2-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ class Code39ExtendedRenderer extends Code39Renderer {
145145
bool getIsValidateInput(String value) {
146146
for (int i = 0; i < value.length; i++) {
147147
if (value[i].codeUnitAt(0) > 127) {
148-
throw 'The provided input cannot be encoded : ${value[i]}';
148+
throw ArgumentError(
149+
'The provided input cannot be encoded : ${value[i]}');
149150
}
150151
}
151152
return true;

packages/syncfusion_flutter_barcodes/lib/src/barcode_generator/renderers/one_dimensional/code39_renderer.dart

+2-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ class Code39Renderer extends SymbologyRenderer {
6868
bool getIsValidateInput(String value) {
6969
for (int i = 0; i < value.length; i++) {
7070
if (!_character.contains(value[i])) {
71-
throw 'The provided input cannot be encoded : ${value[i]}';
71+
throw ArgumentError(
72+
'The provided input cannot be encoded : ${value[i]}');
7273
}
7374
}
7475
return true;

packages/syncfusion_flutter_barcodes/lib/src/barcode_generator/renderers/one_dimensional/code93_renderer.dart

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ class Code93Renderer extends SymbologyRenderer {
1717
bool getIsValidateInput(String value) {
1818
for (int i = 0; i < value.length; i++) {
1919
if (!_character.contains(value[i])) {
20-
throw 'The provided input cannot be encoded : ${value[i]}';
20+
throw ArgumentError(
21+
'The provided input cannot be encoded : ${value[i]}');
2122
}
2223
}
2324
return true;

packages/syncfusion_flutter_barcodes/lib/src/barcode_generator/renderers/one_dimensional/ean13_renderer.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ class EAN13Renderer extends SymbologyRenderer {
1818
if (int.parse(value[12]) == _getCheckSumData(value)) {
1919
_encodedValue = value;
2020
} else {
21-
throw 'Invalid check digit at the trailing end. '
21+
throw ArgumentError('Invalid check digit at the trailing end. '
2222
'Provide the valid check digit or remove it. '
23-
'Since, it has been calculated automatically.';
23+
'Since, it has been calculated automatically.');
2424
}
2525
} else if (value.contains(RegExp(r'^(?=.*?[0-9]).{12}$'))) {
2626
_encodedValue = value + _getCheckSumData(value).toString();
2727
} else {
28-
throw 'EAN13 supports only numeric characters. '
28+
throw ArgumentError('EAN13 supports only numeric characters. '
2929
'The provided value should have 12 digits (without check digit) or'
30-
' with 13 digits.';
30+
' with 13 digits.');
3131
}
3232
return true;
3333
}

packages/syncfusion_flutter_barcodes/lib/src/barcode_generator/renderers/one_dimensional/ean8_renderer.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ class EAN8Renderer extends SymbologyRenderer {
1717
if (int.parse(value[7]) == _getCheckSumData(value)) {
1818
_encodedValue = value;
1919
} else {
20-
throw 'Invalid check digit at the trailing end. '
20+
throw ArgumentError('Invalid check digit at the trailing end. '
2121
'Provide the valid check digit or remove it. '
22-
'Since, it has been calculated automatically.';
22+
'Since, it has been calculated automatically.');
2323
}
2424
} else if (value.contains(RegExp(r'^(?=.*?[0-9]).{7}$'))) {
2525
_encodedValue = value + _getCheckSumData(value).toString();
2626
} else {
27-
throw 'EAN8 supports only numeric characters.'
27+
throw ArgumentError('EAN8 supports only numeric characters.'
2828
' The provided value should have 7 digits (without check digit)'
29-
' or with 8 digits.';
29+
' or with 8 digits.');
3030
}
3131
return true;
3232
}

packages/syncfusion_flutter_barcodes/lib/src/barcode_generator/renderers/one_dimensional/upca_renderer.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ class UPCARenderer extends SymbologyRenderer {
2020
if (int.parse(value[11]) == _getCheckSumData(value)) {
2121
_encodedValue = value;
2222
} else {
23-
throw 'Invalid check digit at the trailing end.'
23+
throw ArgumentError('Invalid check digit at the trailing end.'
2424
' Provide the valid check digit or remove it.'
25-
' Since, it has been calculated automatically.';
25+
' Since, it has been calculated automatically.');
2626
}
2727
} else {
28-
throw 'UPCA supports only numeric characters. '
28+
throw ArgumentError('UPCA supports only numeric characters. '
2929
'The provided value should have 11 digits (without check digit) '
30-
'or with 12 digits.';
30+
'or with 12 digits.');
3131
}
3232
return true;
3333
}

packages/syncfusion_flutter_barcodes/lib/src/barcode_generator/renderers/one_dimensional/upce_renderer.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ class UPCERenderer extends SymbologyRenderer {
1717
if (value.contains(RegExp(r'^(?=.*?[0-9]).{6}$'))) {
1818
return true;
1919
}
20-
throw 'UPCE supports only numeric characters. '
21-
'The provided value should have 6 digits.';
20+
throw ArgumentError('UPCE supports only numeric characters. '
21+
'The provided value should have 6 digits.');
2222
}
2323

2424
/// This is quite a large method. This method could not be

packages/syncfusion_flutter_barcodes/lib/src/barcode_generator/renderers/two_dimensional/datamatrix_renderer.dart

+9-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import 'dart:convert' show utf8;
22
import 'package:flutter/material.dart';
33
import 'package:flutter/rendering.dart';
4-
import 'package:syncfusion_flutter_barcodes/barcodes.dart';
4+
import '../../../../barcodes.dart';
55
import '../../utils/helper.dart';
66
import '../one_dimensional/symbology_base_renderer.dart';
77

@@ -690,6 +690,7 @@ class DataMatrixRenderer extends SymbologyRenderer {
690690

691691
length = codewords.length;
692692
while (length < dataCWLength) {
693+
// ignore: no_leading_underscores_for_local_identifiers
693694
int _value = 129 + (((length + 1) * 149) % 253) + 1;
694695
if (_value > 254) {
695696
_value -= 254;
@@ -858,7 +859,7 @@ class DataMatrixRenderer extends SymbologyRenderer {
858859
}
859860

860861
if (bIndex != 0) {
861-
throw 'Error in error correction code generation!';
862+
throw ArgumentError('Error in error correction code generation!');
862863
}
863864
}
864865
}
@@ -912,11 +913,12 @@ class DataMatrixRenderer extends SymbologyRenderer {
912913
_encodedCodeword = List<int>.from(temp);
913914
dataLength = codeword.length;
914915
} else if (_symbolAttribute.dataCodeWords == 0) {
915-
throw 'Data cannot be encoded as barcode';
916+
throw ArgumentError('Data cannot be encoded as barcode');
916917
} else if (_symbolAttribute.dataCodeWords! < dataLength) {
917918
final String symbolRow = _symbolAttribute.symbolRow.toString();
918919
final String symbolColumn = _symbolAttribute.symbolColumn.toString();
919-
throw 'Data too long for $symbolRow x $symbolColumn barcode.';
920+
throw ArgumentError(
921+
'Data too long for $symbolRow x $symbolColumn barcode.');
920922
}
921923
}
922924

@@ -991,7 +993,8 @@ class DataMatrixRenderer extends SymbologyRenderer {
991993

992994
if (actualEncoding == DataMatrixEncoding.asciiNumeric &&
993995
_dataMatrixSymbology.encoding != actualEncoding) {
994-
throw 'Data contains invalid characters and cannot be encoded as ASCIINumeric.';
996+
throw ArgumentError(
997+
'Data contains invalid characters and cannot be encoded as ASCIINumeric.');
995998
}
996999

9971000
_encoding = actualEncoding;
@@ -1100,7 +1103,7 @@ class DataMatrixRenderer extends SymbologyRenderer {
11001103
text: span,
11011104
textDirection: TextDirection.ltr,
11021105
textAlign: textAlign);
1103-
textPainter.layout(minWidth: 0, maxWidth: size.width);
1106+
textPainter.layout(maxWidth: size.width);
11041107
double x;
11051108
double y;
11061109
switch (textAlign) {

packages/syncfusion_flutter_barcodes/lib/src/barcode_generator/renderers/two_dimensional/qr_code_renderer.dart

+7-4
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,8 @@ class QRCodeRenderer extends SymbologyRenderer {
947947
_errorCorrectionLevel, _codeVersion);
948948
}
949949
if (capacity < _encodedText.length) {
950-
throw 'The input value length is greater than version capacity';
950+
throw ArgumentError(
951+
'The input value length is greater than version capacity');
951952
}
952953
} else {
953954
int capacityLow = 0,
@@ -992,7 +993,8 @@ class QRCodeRenderer extends SymbologyRenderer {
992993
} else if (capacityLow > _encodedText.length) {
993994
_errorCorrectionLevel = ErrorCorrectionLevel.low;
994995
} else {
995-
throw 'The input value length is greater than version capacity';
996+
throw ArgumentError(
997+
'The input value length is greater than version capacity');
996998
}
997999
}
9981000
}
@@ -1626,7 +1628,8 @@ class QRCodeRenderer extends SymbologyRenderer {
16261628
_encodedText[i].codeUnitAt(0) <= 382) {
16271629
/// European Encoding
16281630
} else {
1629-
throw 'The provided input value contains non-convertible characters';
1631+
throw ArgumentError(
1632+
'The provided input value contains non-convertible characters');
16301633
}
16311634

16321635
final List<bool?> numberInBool = _getIntToBoolArray(number, 8);
@@ -1926,7 +1929,7 @@ class QRCodeRenderer extends SymbologyRenderer {
19261929
text: span,
19271930
textDirection: TextDirection.ltr,
19281931
textAlign: textAlign);
1929-
textPainter.layout(minWidth: 0, maxWidth: size.width);
1932+
textPainter.layout(maxWidth: size.width);
19301933
double x;
19311934
double y;
19321935
switch (textAlign) {

packages/syncfusion_flutter_barcodes/lib/src/barcode_generator/renderers/two_dimensional/qr_code_values.dart

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// ignore_for_file: no_default_cases
2+
13
import '../../utils/enum.dart';
24
import '../../utils/helper.dart';
35

@@ -780,6 +782,7 @@ class QRCodeValue {
780782
break;
781783
}
782784

785+
// ignore: no_leading_underscores_for_local_identifiers
783786
final int _version = getVersionNumber(codeVersion);
784787
return capacity[_version - 1];
785788
}

packages/syncfusion_flutter_barcodes/pubspec.yaml

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: syncfusion_flutter_barcodes
22
description: Flutter Barcodes generator library is used to generate and display data in the machine-readable, industry-standard 1D and 2D barcodes.
3-
version: 20.1.47
3+
version: 18.3.35
44
homepage: https://github.com/syncfusion/flutter-widgets/tree/master/packages/syncfusion_flutter_barcodes
55

66
environment:
@@ -10,7 +10,15 @@ dependencies:
1010
flutter:
1111
sdk: flutter
1212
syncfusion_flutter_core:
13-
path: ../syncfusion_flutter_core
13+
git:
14+
url: https://SyncfusionBuild:[email protected]/essential-studio/flutter-core
15+
path: syncfusion_flutter_core
16+
branch: hotfix/20.1.0.47_Vol1
17+
ref: hotfix/20.1.0.47_Vol1
18+
19+
dev_dependencies:
20+
flutter_test:
21+
sdk: flutter
1422

1523
flutter:
1624

packages/syncfusion_flutter_calendar/CHANGELOG.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
## [20.1.0.47]
1+
## [20.1.0.48] - 04/12/2022
2+
**Bug fixes**
3+
* Now, the recurrence and spanned icons will be displayed properly when the recurrence appointment is spanned in the flutter event calendar.
4+
* Now, the header icon will not be overlapped while hiding the calendar header.
5+
6+
## [20.1.0.47] - 04/04/2022
27
**Features**
38
* Provided support for the number of days in view, it is used to customize the days count in the flutter event calendar.
49
* Provided support for recurring appointments on the last day of month in the flutter event calendar.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# example
2+
3+
A new Flutter application.
4+
5+
## Getting Started
6+
7+
This project is a starting point for a Flutter application.
8+
9+
A few resources to get you started if this is your first Flutter project:
10+
11+
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12+
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
13+
14+
For help getting started with Flutter, view our
15+
[online documentation](https://flutter.dev/docs), which offers tutorials,
16+
samples, guidance on mobile development, and a full API reference.

0 commit comments

Comments
 (0)