diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 67bee5e..d96d1c9 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -22,7 +22,7 @@ jobs: dart test chmod +x scripts/* ./scripts/run_snippets.sh - git checkout scripts qr.png Pdf417.png + git checkout scripts test_data env: TEST_CONFIGURATION_ACCESS_TOKEN: ${{ secrets.TEST_CONFIGURATION_ACCESS_TOKEN }} diff --git a/.pubignore b/.pubignore new file mode 100644 index 0000000..783ddee --- /dev/null +++ b/.pubignore @@ -0,0 +1,4 @@ +snippets/ +test_data/ +scripts/ +Makefile \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ee642f..f53b0d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## 4.25.5 + +* May 2025 Release + ## 4.25.4 * April 2025 Release diff --git a/Makefile b/Makefile index fec625f..fa4a443 100644 --- a/Makefile +++ b/Makefile @@ -35,6 +35,7 @@ insert-example: .PHONY: update update: dart pub upgrade + dart pub outdated .PHONY: cover cover: diff --git a/README.md b/README.md index ffaf2d4..25a0ace 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Dart test](https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-dart/actions/workflows/dart.yml/badge.svg?branch=main)](https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-dart/actions/workflows/dart.yml) - API version: 4.0 -- SDK version: 4.25.4 +- SDK version: 4.25.5 ## SDK and API Version Compatibility: @@ -39,7 +39,7 @@ Add this dependency to your *pubspec.yaml*: ```yaml dependencies: - aspose_barcode_cloud: 4.25.4 + aspose_barcode_cloud: 4.25.5 ``` ## Sample usage @@ -55,7 +55,7 @@ import 'dart:typed_data'; import 'package:aspose_barcode_cloud/aspose_barcode_cloud.dart'; Future main() async { - const fileName = "qr.png"; + final fileName = "test_data${Platform.pathSeparator}qr.png"; final client = ApiClient(Configuration( clientId: "Client Id from https://dashboard.aspose.cloud/applications", diff --git a/doc/api/GenerateApi.md b/doc/api/GenerateApi.md index b3be2e6..2dbe5e2 100644 --- a/doc/api/GenerateApi.md +++ b/doc/api/GenerateApi.md @@ -25,16 +25,16 @@ Name | Type | Description | Notes ---- | ---- | ------------ | ----- **barcodeType** | [**EncodeBarcodeType**](.md)| Type of barcode to generate. | **data** | **String**| String represents data to encode | - **dataType** | [**EncodeDataType**](.md)| Type of data to encode. Default value: StringData. | [optional] - **imageFormat** | [**BarcodeImageFormat**](.md)| Barcode output image format. Default value: png | [optional] - **textLocation** | [**CodeLocation**](.md)| Specify the displaying Text Location, set to CodeLocation.None to hide CodeText. Default value: Depends on BarcodeType. CodeLocation.Below for 1D Barcodes. CodeLocation.None for 2D Barcodes. | [optional] - **foregroundColor** | **String**| Specify the displaying bars and content Color. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: Black. | [optional] [default to 'Black'] - **backgroundColor** | **String**| Background color of the barcode image. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: White. | [optional] [default to 'White'] + **dataType** | [**EncodeDataType**](.md)| Type of data to encode. Default value: StringData. | [optional] + **imageFormat** | [**BarcodeImageFormat**](.md)| Barcode output image format. Default value: png | [optional] + **textLocation** | [**CodeLocation**](.md)| Specify the displaying Text Location, set to CodeLocation.None to hide CodeText. Default value: Depends on BarcodeType. CodeLocation.Below for 1D Barcodes. CodeLocation.None for 2D Barcodes. | [optional] + **foregroundColor** | **String**| Specify the displaying bars and content Color. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: Black. | [optional] [default to 'Black'] + **backgroundColor** | **String**| Background color of the barcode image. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: White. | [optional] [default to 'White'] **units** | [**GraphicsUnit**](.md)| Common Units for all measuring in query. Default units: pixel. | [optional] - **resolution** | **double**| Resolution of the BarCode image. One value for both dimensions. Default value: 96 dpi. Decimal separator is dot. | [optional] - **imageHeight** | **double**| Height of the barcode image in given units. Default units: pixel. Decimal separator is dot. | [optional] - **imageWidth** | **double**| Width of the barcode image in given units. Default units: pixel. Decimal separator is dot. | [optional] - **rotationAngle** | **int**| BarCode image rotation angle, measured in degree, e.g. RotationAngle = 0 or RotationAngle = 360 means no rotation. If RotationAngle NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image. Default value: 0. | [optional] + **resolution** | **double**| Resolution of the BarCode image. One value for both dimensions. Default value: 96 dpi. Decimal separator is dot. | [optional] + **imageHeight** | **double**| Height of the barcode image in given units. Default units: pixel. Decimal separator is dot. | [optional] + **imageWidth** | **double**| Width of the barcode image in given units. Default units: pixel. Decimal separator is dot. | [optional] + **rotationAngle** | **int**| BarCode image rotation angle, measured in degree, e.g. RotationAngle = 0 or RotationAngle = 360 means no rotation. If RotationAngle NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image. Default value: 0. | [optional] ### Return type @@ -89,13 +89,13 @@ Name | Type | Description | Notes **dataType** | [**EncodeDataType**](EncodeDataType.md)| | [optional] **imageFormat** | [**BarcodeImageFormat**](BarcodeImageFormat.md)| | [optional] **textLocation** | [**CodeLocation**](CodeLocation.md)| | [optional] - **foregroundColor** | **String**| Specify the displaying bars and content Color. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: Black. | [optional] [default to 'Black'] - **backgroundColor** | **String**| Background color of the barcode image. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: White. | [optional] [default to 'White'] + **foregroundColor** | **String**| Specify the displaying bars and content Color. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: Black. | [optional] [default to 'Black'] + **backgroundColor** | **String**| Background color of the barcode image. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: White. | [optional] [default to 'White'] **units** | [**GraphicsUnit**](GraphicsUnit.md)| | [optional] - **resolution** | **double**| Resolution of the BarCode image. One value for both dimensions. Default value: 96 dpi. Decimal separator is dot. | [optional] - **imageHeight** | **double**| Height of the barcode image in given units. Default units: pixel. Decimal separator is dot. | [optional] - **imageWidth** | **double**| Width of the barcode image in given units. Default units: pixel. Decimal separator is dot. | [optional] - **rotationAngle** | **int**| BarCode image rotation angle, measured in degree, e.g. RotationAngle = 0 or RotationAngle = 360 means no rotation. If RotationAngle NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image. Default value: 0. | [optional] + **resolution** | **double**| Resolution of the BarCode image. One value for both dimensions. Default value: 96 dpi. Decimal separator is dot. | [optional] + **imageHeight** | **double**| Height of the barcode image in given units. Default units: pixel. Decimal separator is dot. | [optional] + **imageWidth** | **double**| Width of the barcode image in given units. Default units: pixel. Decimal separator is dot. | [optional] + **rotationAngle** | **int**| BarCode image rotation angle, measured in degree, e.g. RotationAngle = 0 or RotationAngle = 360 means no rotation. If RotationAngle NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image. Default value: 0. | [optional] ### Return type diff --git a/doc/models/BarcodeImageParams.md b/doc/models/BarcodeImageParams.md index be1cfad..97b0a80 100644 --- a/doc/models/BarcodeImageParams.md +++ b/doc/models/BarcodeImageParams.md @@ -13,11 +13,11 @@ Name | Type | Description | Notes ---- | ---- | ----------- | ----- **imageFormat** | [**BarcodeImageFormat**](BarcodeImageFormat.md) | | [optional] **textLocation** | [**CodeLocation**](CodeLocation.md) | | [optional] -**foregroundColor** | **String** | Specify the displaying bars and content Color. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: Black. | [optional] [default to 'Black'] -**backgroundColor** | **String** | Background color of the barcode image. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: White. | [optional] [default to 'White'] +**foregroundColor** | **String** | Specify the displaying bars and content Color. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: Black. | [optional] [default to 'Black'] +**backgroundColor** | **String** | Background color of the barcode image. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: White. | [optional] [default to 'White'] **units** | [**GraphicsUnit**](GraphicsUnit.md) | | [optional] -**resolution** | **double** | Resolution of the BarCode image. One value for both dimensions. Default value: 96 dpi. Decimal separator is dot. | [optional] -**imageHeight** | **double** | Height of the barcode image in given units. Default units: pixel. Decimal separator is dot. | [optional] -**imageWidth** | **double** | Width of the barcode image in given units. Default units: pixel. Decimal separator is dot. | [optional] -**rotationAngle** | **int** | BarCode image rotation angle, measured in degree, e.g. RotationAngle = 0 or RotationAngle = 360 means no rotation. If RotationAngle NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image. Default value: 0. | [optional] +**resolution** | **double** | Resolution of the BarCode image. One value for both dimensions. Default value: 96 dpi. Decimal separator is dot. | [optional] +**imageHeight** | **double** | Height of the barcode image in given units. Default units: pixel. Decimal separator is dot. | [optional] +**imageWidth** | **double** | Width of the barcode image in given units. Default units: pixel. Decimal separator is dot. | [optional] +**rotationAngle** | **int** | BarCode image rotation angle, measured in degree, e.g. RotationAngle = 0 or RotationAngle = 360 means no rotation. If RotationAngle NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image. Default value: 0. | [optional] diff --git a/example/main.dart b/example/main.dart index c9235b7..8541dca 100644 --- a/example/main.dart +++ b/example/main.dart @@ -4,7 +4,7 @@ import 'dart:typed_data'; import 'package:aspose_barcode_cloud/aspose_barcode_cloud.dart'; Future main() async { - const fileName = "qr.png"; + final fileName = "test_data${Platform.pathSeparator}qr.png"; final client = ApiClient(Configuration( clientId: "Client Id from https://dashboard.aspose.cloud/applications", diff --git a/lib/src/api_client.dart b/lib/src/api_client.dart index 36687d8..5c84dd1 100644 --- a/lib/src/api_client.dart +++ b/lib/src/api_client.dart @@ -10,7 +10,7 @@ import 'api_helper.dart'; import 'auth/authentication.dart'; /// Current SDK Version -const SDK_VERSION = "4.25.4"; +const SDK_VERSION = "4.25.5"; /// ApiClient is responsible for making HTTP requests to the API. class ApiClient { diff --git a/lib/src/configuration.dart b/lib/src/configuration.dart index 8cbe569..da75bdb 100644 --- a/lib/src/configuration.dart +++ b/lib/src/configuration.dart @@ -75,7 +75,7 @@ class Configuration { } /// Load configuration from environment variables - static fromEnv({String prefix = ""}) { + static Configuration fromEnv({String prefix = ""}) { final accessToken = Platform.environment["${prefix}ACCESS_TOKEN"]; return Configuration( accessToken: accessToken, diff --git a/lib/src/model/barcode_image_params.dart b/lib/src/model/barcode_image_params.dart index 053d9a2..c686110 100644 --- a/lib/src/model/barcode_image_params.dart +++ b/lib/src/model/barcode_image_params.dart @@ -12,11 +12,11 @@ class BarcodeImageParams { //enum textLocationEnum { Below, Above, None, }; CodeLocation? textLocation; - /// Specify the displaying bars and content Color. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: Black. + /// Specify the displaying bars and content Color. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: Black. String? foregroundColor; - /// Background color of the barcode image. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: White. + /// Background color of the barcode image. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: White. String? backgroundColor; @@ -24,19 +24,19 @@ class BarcodeImageParams { //enum unitsEnum { Pixel, Point, Inch, Millimeter, }; GraphicsUnit? units; - /// Resolution of the BarCode image. One value for both dimensions. Default value: 96 dpi. Decimal separator is dot. + /// Resolution of the BarCode image. One value for both dimensions. Default value: 96 dpi. Decimal separator is dot. double? resolution; - /// Height of the barcode image in given units. Default units: pixel. Decimal separator is dot. + /// Height of the barcode image in given units. Default units: pixel. Decimal separator is dot. double? imageHeight; - /// Width of the barcode image in given units. Default units: pixel. Decimal separator is dot. + /// Width of the barcode image in given units. Default units: pixel. Decimal separator is dot. double? imageWidth; - /// BarCode image rotation angle, measured in degree, e.g. RotationAngle = 0 or RotationAngle = 360 means no rotation. If RotationAngle NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image. Default value: 0. + /// BarCode image rotation angle, measured in degree, e.g. RotationAngle = 0 or RotationAngle = 360 means no rotation. If RotationAngle NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image. Default value: 0. int? rotationAngle; diff --git a/pubspec.yaml b/pubspec.yaml index 0ed0a6d..aac1a92 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: aspose_barcode_cloud description: This SDK allows you to work with Aspose.BarCode for Cloud REST APIs in your Dart or Flutter applications quickly and easily -version: 4.25.4 +version: 4.25.5 homepage: https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-dart platforms: @@ -17,5 +17,5 @@ dependencies: http: '>=0.13.0 <2.0.0' dev_dependencies: - lints: ^5.1.1 + lints: ^6.0.0 test: ^1.25.1 diff --git a/snippets/generate/appearance/generate_body.dart b/snippets/generate/appearance/generate_body.dart index 021ee0d..7713b1e 100644 --- a/snippets/generate/appearance/generate_body.dart +++ b/snippets/generate/appearance/generate_body.dart @@ -22,7 +22,7 @@ Future main() async { final generateApi = GenerateApi(apiClient); final file = File( - "${Directory.current.path}${Platform.pathSeparator}Code39.jpeg", + "${Directory.current.path}${Platform.pathSeparator}test_data${Platform.pathSeparator}Code39.jpeg", ); final imageParams = BarcodeImageParams() diff --git a/snippets/generate/appearance/generate_get.dart b/snippets/generate/appearance/generate_get.dart index 24e1085..3cc96e6 100644 --- a/snippets/generate/appearance/generate_get.dart +++ b/snippets/generate/appearance/generate_get.dart @@ -21,7 +21,8 @@ Future main() async { final apiClient = ApiClient(configuration); final generateApi = GenerateApi(apiClient); - final fileName = '${Directory.current.path}${Platform.pathSeparator}qr.png'; + final fileName = + '${Directory.current.path}${Platform.pathSeparator}test_data${Platform.pathSeparator}qr.png'; final Uint8List response = await generateApi.generate( EncodeBarcodeType.QR, "Aspose.BarCode.Cloud", diff --git a/snippets/generate/appearance/generate_multipart.dart b/snippets/generate/appearance/generate_multipart.dart index 3231718..2c43c78 100644 --- a/snippets/generate/appearance/generate_multipart.dart +++ b/snippets/generate/appearance/generate_multipart.dart @@ -22,7 +22,7 @@ Future main() async { final generateApi = GenerateApi(apiClient); final file = File( - "${Directory.current.path}${Platform.pathSeparator}Pdf417.svg", + "${Directory.current.path}${Platform.pathSeparator}test_data${Platform.pathSeparator}Pdf417.svg", ); final Uint8List barcodeStream = await generateApi.generateMultipart( diff --git a/snippets/generate/save/generate_body.dart b/snippets/generate/save/generate_body.dart index 7405fd5..a402bc5 100644 --- a/snippets/generate/save/generate_body.dart +++ b/snippets/generate/save/generate_body.dart @@ -18,7 +18,7 @@ Configuration makeConfiguration() { Future main() async { final fileName = - "${Directory.current.path}${Platform.pathSeparator}Pdf417.png"; + "${Directory.current.path}${Platform.pathSeparator}test_data${Platform.pathSeparator}Pdf417.png"; final configuration = makeConfiguration(); final apiClient = ApiClient(configuration); diff --git a/snippets/generate/save/generate_get.dart b/snippets/generate/save/generate_get.dart index 7e9d1aa..0874829 100644 --- a/snippets/generate/save/generate_get.dart +++ b/snippets/generate/save/generate_get.dart @@ -21,7 +21,7 @@ Future main() async { final generateApi = GenerateApi(apiClient); final fileName = - "${Directory.current.path}${Platform.pathSeparator}Code128.jpeg"; + "${Directory.current.path}${Platform.pathSeparator}test_data${Platform.pathSeparator}Code128.jpeg"; final Uint8List response = await generateApi.generate( EncodeBarcodeType.Code128, "Aspose.BarCode.Cloud"); diff --git a/snippets/generate/save/generate_multipart.dart b/snippets/generate/save/generate_multipart.dart index 4980441..b04c4c5 100644 --- a/snippets/generate/save/generate_multipart.dart +++ b/snippets/generate/save/generate_multipart.dart @@ -18,7 +18,7 @@ Configuration makeConfiguration() { Future main() async { final fileName = - "${Directory.current.path}${Platform.pathSeparator}Pdf417.png"; + "${Directory.current.path}${Platform.pathSeparator}test_data${Platform.pathSeparator}Pdf417.png"; final configuration = makeConfiguration(); final apiClient = ApiClient(configuration); final generateApi = GenerateApi(apiClient); diff --git a/snippets/generate/set_colorscheme/generate_body.dart b/snippets/generate/set_colorscheme/generate_body.dart index e35b135..d2afabf 100644 --- a/snippets/generate/set_colorscheme/generate_body.dart +++ b/snippets/generate/set_colorscheme/generate_body.dart @@ -22,7 +22,7 @@ Future main() async { final generateApi = GenerateApi(apiClient); final file = File( - "${Directory.current.path}${Platform.pathSeparator}Pdf417.png", + "${Directory.current.path}${Platform.pathSeparator}test_data${Platform.pathSeparator}Pdf417.png", ); final imageParams = BarcodeImageParams(); diff --git a/snippets/generate/set_colorscheme/generate_get.dart b/snippets/generate/set_colorscheme/generate_get.dart index 41f8382..b2979bb 100644 --- a/snippets/generate/set_colorscheme/generate_get.dart +++ b/snippets/generate/set_colorscheme/generate_get.dart @@ -20,7 +20,8 @@ Future main() async { final apiClient = ApiClient(configuration); final generateApi = GenerateApi(apiClient); - final fileName = "${Directory.current.path}${Platform.pathSeparator}qr.png"; + final fileName = + "${Directory.current.path}${Platform.pathSeparator}test_data${Platform.pathSeparator}qr.png"; final Uint8List response = await generateApi.generate( EncodeBarcodeType.QR, diff --git a/snippets/generate/set_colorscheme/generate_multipart.dart b/snippets/generate/set_colorscheme/generate_multipart.dart index 181977b..cb369c5 100644 --- a/snippets/generate/set_colorscheme/generate_multipart.dart +++ b/snippets/generate/set_colorscheme/generate_multipart.dart @@ -22,7 +22,7 @@ Future main() async { final generateApi = GenerateApi(apiClient); final fileName = - '${Directory.current.path}${Platform.pathSeparator}Code39.png'; + '${Directory.current.path}${Platform.pathSeparator}test_data${Platform.pathSeparator}Code39.png'; final Uint8List response = await generateApi.generateMultipart( EncodeBarcodeType.Code39, "Aspose", diff --git a/snippets/generate/set_size/generate_body.dart b/snippets/generate/set_size/generate_body.dart index 97cd1b5..84e4134 100644 --- a/snippets/generate/set_size/generate_body.dart +++ b/snippets/generate/set_size/generate_body.dart @@ -22,7 +22,7 @@ Future main() async { final generateApi = GenerateApi(apiClient); final file = File( - "${Directory.current.path}${Platform.pathSeparator}Pdf417.png", + "${Directory.current.path}${Platform.pathSeparator}test_data${Platform.pathSeparator}Pdf417.png", ); final generateParams = GenerateParams( diff --git a/snippets/generate/set_size/generate_get.dart b/snippets/generate/set_size/generate_get.dart index b2de806..d730991 100644 --- a/snippets/generate/set_size/generate_get.dart +++ b/snippets/generate/set_size/generate_get.dart @@ -21,7 +21,8 @@ Future main() async { final apiClient = ApiClient(configuration); final generateApi = GenerateApi(apiClient); - final fileName = '${Directory.current.path}${Platform.pathSeparator}qr.png'; + final fileName = + '${Directory.current.path}${Platform.pathSeparator}test_data${Platform.pathSeparator}qr.png'; final Uint8List response = await generateApi.generate( EncodeBarcodeType.QR, diff --git a/snippets/generate/set_size/generate_multipart.dart b/snippets/generate/set_size/generate_multipart.dart index 7ad6dae..364ef10 100644 --- a/snippets/generate/set_size/generate_multipart.dart +++ b/snippets/generate/set_size/generate_multipart.dart @@ -22,7 +22,7 @@ Future main() async { final generateApi = GenerateApi(apiClient); final fileName = - '${Directory.current.path}${Platform.pathSeparator}aztec.png'; + '${Directory.current.path}${Platform.pathSeparator}test_data${Platform.pathSeparator}aztec.png'; final Uint8List response = await generateApi.generateMultipart( EncodeBarcodeType.Aztec, "Aspose.BarCode.Cloud", diff --git a/snippets/generate/set_text/generate_body.dart b/snippets/generate/set_text/generate_body.dart index 8d3f856..11ab584 100644 --- a/snippets/generate/set_text/generate_body.dart +++ b/snippets/generate/set_text/generate_body.dart @@ -18,7 +18,7 @@ Configuration makeConfiguration() { Future main() async { final fileName = - "${Directory.current.path}${Platform.pathSeparator}Pdf417.png"; + "${Directory.current.path}${Platform.pathSeparator}test_data${Platform.pathSeparator}Pdf417.png"; final configuration = makeConfiguration(); final apiClient = ApiClient(configuration); diff --git a/snippets/generate/set_text/generate_get.dart b/snippets/generate/set_text/generate_get.dart index 399c5c9..af59505 100644 --- a/snippets/generate/set_text/generate_get.dart +++ b/snippets/generate/set_text/generate_get.dart @@ -16,7 +16,8 @@ Configuration makeConfiguration() { } Future main() async { - final fileName = "${Directory.current.path}${Platform.pathSeparator}qr.png"; + final fileName = + "${Directory.current.path}${Platform.pathSeparator}test_data${Platform.pathSeparator}qr.png"; final configuration = makeConfiguration(); final apiClient = ApiClient(configuration); final generateApi = GenerateApi(apiClient); diff --git a/snippets/generate/set_text/generate_multipart.dart b/snippets/generate/set_text/generate_multipart.dart index 94922d4..720e704 100644 --- a/snippets/generate/set_text/generate_multipart.dart +++ b/snippets/generate/set_text/generate_multipart.dart @@ -18,7 +18,7 @@ Configuration makeConfiguration() { Future main() async { final fileName = - "${Directory.current.path}${Platform.pathSeparator}Code128.png"; + "${Directory.current.path}${Platform.pathSeparator}test_data${Platform.pathSeparator}Code128.png"; final configuration = makeConfiguration(); final apiClient = ApiClient(configuration); final generateApi = GenerateApi(apiClient); diff --git a/snippets/read/set_image_kind/recognize_body.dart b/snippets/read/set_image_kind/recognize_body.dart index 11f75c6..2f45c3e 100644 --- a/snippets/read/set_image_kind/recognize_body.dart +++ b/snippets/read/set_image_kind/recognize_body.dart @@ -20,10 +20,10 @@ Future main() async { final config = makeConfiguration(); final recognizeApi = RecognizeApi(ApiClient(config)); - final fileName = - File("${Directory.current.path}${Platform.pathSeparator}aztec.png") - .absolute - .path; + final fileName = File( + "${Directory.current.path}${Platform.pathSeparator}test_data${Platform.pathSeparator}aztec.png") + .absolute + .path; final fileBytes = File(fileName).readAsBytesSync(); final imageBase64 = base64Encode(fileBytes); diff --git a/snippets/read/set_image_kind/recognize_multipart.dart b/snippets/read/set_image_kind/recognize_multipart.dart index 33c365f..aae0c27 100644 --- a/snippets/read/set_image_kind/recognize_multipart.dart +++ b/snippets/read/set_image_kind/recognize_multipart.dart @@ -18,9 +18,9 @@ Future main() async { final config = makeConfiguration(); final recognizeApi = RecognizeApi(ApiClient(config)); - final file = - await File("${Directory.current.path}${Platform.pathSeparator}Pdf417.png") - .readAsBytes(); + final file = await File( + "${Directory.current.path}${Platform.pathSeparator}test_data${Platform.pathSeparator}Pdf417.png") + .readAsBytes(); final BarcodeResponseList result = await recognizeApi.recognizeMultipart( DecodeBarcodeType.MostCommonlyUsed, file); diff --git a/snippets/read/set_quality/recognize_body.dart b/snippets/read/set_quality/recognize_body.dart index 38e9beb..db7e43d 100644 --- a/snippets/read/set_quality/recognize_body.dart +++ b/snippets/read/set_quality/recognize_body.dart @@ -20,10 +20,10 @@ Future main() async { final config = makeConfiguration(); final recognizeApi = RecognizeApi(ApiClient(config)); - final fileName = - File("${Directory.current.path}${Platform.pathSeparator}Pdf417.png") - .absolute - .path; + final fileName = File( + "${Directory.current.path}${Platform.pathSeparator}test_data${Platform.pathSeparator}Pdf417.png") + .absolute + .path; final fileBytes = File(fileName).readAsBytesSync(); final imageBase64 = base64Encode(fileBytes); diff --git a/snippets/read/set_quality/recognize_multipart.dart b/snippets/read/set_quality/recognize_multipart.dart index 163d5fa..5e2f523 100644 --- a/snippets/read/set_quality/recognize_multipart.dart +++ b/snippets/read/set_quality/recognize_multipart.dart @@ -19,9 +19,9 @@ Future main() async { final config = makeConfiguration(); final recognizeApi = RecognizeApi(ApiClient(config)); - final file = - await File("${Directory.current.path}${Platform.pathSeparator}aztec.png") - .readAsBytes(); + final file = await File( + "${Directory.current.path}${Platform.pathSeparator}test_data${Platform.pathSeparator}aztec.png") + .readAsBytes(); final BarcodeResponseList result = await recognizeApi.recognizeMultipart(DecodeBarcodeType.Aztec, file); diff --git a/snippets/read/set_source/recognize_body.dart b/snippets/read/set_source/recognize_body.dart index 805a5c1..46d03c6 100644 --- a/snippets/read/set_source/recognize_body.dart +++ b/snippets/read/set_source/recognize_body.dart @@ -20,10 +20,10 @@ Future main() async { final config = makeConfiguration(); final recognizeApi = RecognizeApi(ApiClient(config)); - final fileName = - File("${Directory.current.path}${Platform.pathSeparator}qr.png") - .absolute - .path; + final fileName = File( + "${Directory.current.path}${Platform.pathSeparator}test_data${Platform.pathSeparator}qr.png") + .absolute + .path; final fileBytes = File(fileName).readAsBytesSync(); final imageBase64 = base64Encode(fileBytes); diff --git a/snippets/read/set_source/recognize_multipart.dart b/snippets/read/set_source/recognize_multipart.dart index 9ddf201..b47664a 100644 --- a/snippets/read/set_source/recognize_multipart.dart +++ b/snippets/read/set_source/recognize_multipart.dart @@ -19,9 +19,9 @@ Future main() async { final config = makeConfiguration(); final recognizeApi = RecognizeApi(ApiClient(config)); - final file = - await File('${Directory.current.path}${Platform.pathSeparator}qr.png') - .readAsBytes(); + final file = await File( + '${Directory.current.path}${Platform.pathSeparator}test_data${Platform.pathSeparator}qr.png') + .readAsBytes(); final BarcodeResponseList result = await recognizeApi.recognizeMultipart(DecodeBarcodeType.QR, file); diff --git a/snippets/read/set_source/scan_body.dart b/snippets/read/set_source/scan_body.dart index 1e6ca94..143edb3 100644 --- a/snippets/read/set_source/scan_body.dart +++ b/snippets/read/set_source/scan_body.dart @@ -19,10 +19,10 @@ Future main() async { final config = makeConfiguration(); final scanApi = ScanApi(ApiClient(config)); - final fileName = - File("${Directory.current.path}${Platform.pathSeparator}qr.png") - .absolute - .path; + final fileName = File( + "${Directory.current.path}${Platform.pathSeparator}test_data${Platform.pathSeparator}qr.png") + .absolute + .path; final fileBytes = File(fileName).readAsBytesSync(); final imageBase64 = base64Encode(fileBytes); diff --git a/snippets/read/set_source/scan_multipart.dart b/snippets/read/set_source/scan_multipart.dart index e58a864..18e0120 100644 --- a/snippets/read/set_source/scan_multipart.dart +++ b/snippets/read/set_source/scan_multipart.dart @@ -19,9 +19,9 @@ Future main() async { final config = makeConfiguration(); final scanApi = ScanApi(ApiClient(config)); - final file = - await File("${Directory.current.path}${Platform.pathSeparator}qr.png") - .readAsBytes(); + final file = await File( + "${Directory.current.path}${Platform.pathSeparator}test_data${Platform.pathSeparator}qr.png") + .readAsBytes(); final BarcodeResponseList result = await scanApi.scanMultipart(file); diff --git a/snippets/read/set_target_types/recognize_body.dart b/snippets/read/set_target_types/recognize_body.dart index b5abaa3..f195217 100644 --- a/snippets/read/set_target_types/recognize_body.dart +++ b/snippets/read/set_target_types/recognize_body.dart @@ -21,7 +21,7 @@ Future main() async { final recognizeApi = RecognizeApi(ApiClient(config)); final fileName = File( - "${Directory.current.path}${Platform.pathSeparator}qr_and_code128.png") + "${Directory.current.path}${Platform.pathSeparator}test_data${Platform.pathSeparator}qr_and_code128.png") .absolute .path; final fileBytes = File(fileName).readAsBytesSync(); diff --git a/snippets/read/set_target_types/recognize_multipart.dart b/snippets/read/set_target_types/recognize_multipart.dart index d617385..4dd7995 100644 --- a/snippets/read/set_target_types/recognize_multipart.dart +++ b/snippets/read/set_target_types/recognize_multipart.dart @@ -19,9 +19,9 @@ Future main() async { final config = makeConfiguration(); final recognizeApi = RecognizeApi(ApiClient(config)); - final file = - await File("${Directory.current.path}${Platform.pathSeparator}Pdf417.png") - .readAsBytes(); + final file = await File( + "${Directory.current.path}${Platform.pathSeparator}test_data${Platform.pathSeparator}Pdf417.png") + .readAsBytes(); final BarcodeResponseList result = await recognizeApi.recognizeMultipart(DecodeBarcodeType.Pdf417, file); diff --git a/test/recognize_api_test.dart b/test/recognize_api_test.dart index a43639c..b0acb8d 100644 --- a/test/recognize_api_test.dart +++ b/test/recognize_api_test.dart @@ -6,7 +6,7 @@ import 'dart:convert'; import 'test_config.dart'; void main() { - final fileToRecognize = "qr.png"; + final fileToRecognize = "test_data${Platform.pathSeparator}qr.png"; test('.recognizeMultipart', () async { final barcode = await File(fileToRecognize).readAsBytes(); diff --git a/test/scan_api_test.dart b/test/scan_api_test.dart index 8f93f0c..f5049ff 100644 --- a/test/scan_api_test.dart +++ b/test/scan_api_test.dart @@ -6,7 +6,8 @@ import 'dart:convert'; import 'test_config.dart'; void main() { - final fileToRecognize = "qr_and_code128.png"; + final fileToRecognize = + "test_data${Platform.pathSeparator}qr_and_code128.png"; test( '.scanBarcodes can scan 2 type', diff --git a/Code128.jpeg b/test_data/Code128.jpeg similarity index 100% rename from Code128.jpeg rename to test_data/Code128.jpeg diff --git a/Code128.png b/test_data/Code128.png similarity index 100% rename from Code128.png rename to test_data/Code128.png diff --git a/Code39.jpeg b/test_data/Code39.jpeg similarity index 100% rename from Code39.jpeg rename to test_data/Code39.jpeg diff --git a/Code39.jpg b/test_data/Code39.jpg similarity index 100% rename from Code39.jpg rename to test_data/Code39.jpg diff --git a/Code39.png b/test_data/Code39.png similarity index 100% rename from Code39.png rename to test_data/Code39.png diff --git a/Pdf417.png b/test_data/Pdf417.png similarity index 100% rename from Pdf417.png rename to test_data/Pdf417.png diff --git a/Pdf417.svg b/test_data/Pdf417.svg similarity index 100% rename from Pdf417.svg rename to test_data/Pdf417.svg diff --git a/aztec.png b/test_data/aztec.png similarity index 100% rename from aztec.png rename to test_data/aztec.png diff --git a/qr.png b/test_data/qr.png similarity index 100% rename from qr.png rename to test_data/qr.png diff --git a/qr_and_code128.png b/test_data/qr_and_code128.png similarity index 100% rename from qr_and_code128.png rename to test_data/qr_and_code128.png