Aspose.BarCode Cloud SDK for Dart

  • API version: 3.0
  • SDK version: 0.22.11

This SDK allows you to work with Aspose.BarCode for Cloud REST APIs in your Dart or Flutter applications quickly and easily

Demo applications

Scan QRGenerate BarcodeRecognize Barcode
ScanQRGenerateRecognize
Generate Wi-Fi QREmbed BarcodeScan Barcode
Wi-FiQREmbedScan

Aspose.BarCode for Cloud is a REST API for Linear, 2D and postal barcode generation and recognition in the cloud. API recognizes and generates barcode images in a variety of formats. Barcode REST API allows to specify barcode image attributes like image width, height, border style and output image format in order to customize the generation process. Developers can also specify the barcode type and text attributes such as text location and font styles in order to suit the application requirements.

This repository contains Aspose.BarCode Cloud SDK for Dart source code. This SDK allows you to work with Aspose.BarCode for Cloud REST APIs in your Dart or Flutter applications quickly and easily.

To use these SDKs, you will need Client Id and Client Secret which can be looked up at Aspose Cloud Dashboard (free registration in Aspose Cloud is required for this).

Prerequisites

To use Aspose.BarCode Cloud SDK for Dart you need to register an account with Aspose Cloud and lookup/create Client Secret and SID at Cloud Dashboard. There is a free quota available. For more details, see Aspose Cloud Pricing.

Requirements

Dart 2.12.0 or later

Installation & Usage

Add this dependency to your pubspec.yaml:

dependencies:
  aspose_barcode_cloud: 0.22.11

Sample usage

Generate an image with barcode and then recognize it

The examples below show how you can generate QR barcode and save it into a local file and then recognize using aspose_barcode_cloud:

import 'package:aspose_barcode_cloud/api.dart' as barcode;

import 'dart:typed_data';
import 'dart:io';

import 'package:http/http.dart';

Future<void> main() async {
  const fileName = "qr.png";
  // Setup
  var apiClient = barcode.ApiClient(
    clientId: "Client Id from https://dashboard.aspose.cloud/applications",
    clientSecret:
        "Client Secret from https://dashboard.aspose.cloud/applications",
  );
  var api = barcode.BarcodeApi(apiClient);

  // Generate image with barcode
  Uint8List? generated =
      await api.getBarcodeGenerate("QR", "text", textLocation: "None");
  // Save generated image to file
  await new File(fileName).writeAsBytes(generated!);
  print("Generated image saved to " + fileName);

  // Recognize generated image
  var formFile = MultipartFile.fromBytes("image", generated.toList(),
      filename: "barcode.png");
  barcode.BarcodeResponseList? recognized =
      await api.postBarcodeRecognizeFromUrlOrContent(image: formFile);

  print("Recognized Type: " + recognized!.barcodes![0].type!);
  print("Recognized Value: " + recognized.barcodes![0].barcodeValue!);
}

Dependencies

  • http: '>=0.13.0 <0.14.0'

Licensing

All Aspose.BarCode for Cloud SDKs, helper scripts and templates are licensed under MIT License.

Resources

Documentation for API Endpoints

All URIs are relative to api.aspose.cloud/v3.0

ClassMethodHTTP requestDescription
BarcodeApigetBarcodeGenerateGET /barcode/generateGenerate barcode.
BarcodeApigetBarcodeRecognizeGET /barcode/{name}/recognizeRecognize barcode from a file on server.
BarcodeApipostBarcodeRecognizeFromUrlOrContentPOST /barcode/recognizeRecognize barcode from an url or from request body. Request body can contain raw data bytes of the image or encoded with base64.
BarcodeApipostGenerateMultiplePOST /barcode/generateMultipleGenerate multiple barcodes and return in response stream
BarcodeApiputBarcodeGenerateFilePUT /barcode/{name}/generateGenerate barcode and save on server (from query params or from file with json or xml content)
BarcodeApiputBarcodeRecognizeFromBodyPUT /barcode/{name}/recognizeRecognition of a barcode from file on server with parameters in body.
BarcodeApiputGenerateMultiplePUT /barcode/{name}/generateMultipleGenerate image with multiple barcodes and put new file on server
FileApicopyFilePUT /barcode/storage/file/copy/{srcPath}Copy file
FileApideleteFileDELETE /barcode/storage/file/{path}Delete file
FileApidownloadFileGET /barcode/storage/file/{path}Download file
FileApimoveFilePUT /barcode/storage/file/move/{srcPath}Move file
FileApiuploadFilePUT /barcode/storage/file/{path}Upload file
FolderApicopyFolderPUT /barcode/storage/folder/copy/{srcPath}Copy folder
FolderApicreateFolderPUT /barcode/storage/folder/{path}Create the folder
FolderApideleteFolderDELETE /barcode/storage/folder/{path}Delete folder
FolderApigetFilesListGET /barcode/storage/folder/{path}Get all files and folders within a folder
FolderApimoveFolderPUT /barcode/storage/folder/move/{srcPath}Move folder
StorageApigetDiscUsageGET /barcode/storage/discGet disc usage
StorageApigetFileVersionsGET /barcode/storage/version/{path}Get file versions
StorageApiobjectExistsGET /barcode/storage/exist/{path}Check if file or folder exists
StorageApistorageExistsGET /barcode/storage/{storageName}/existCheck if storage exists

Documentation For Models

Libraries

aspose_barcode_cloud.api