aspose_barcode_cloud 4.25.3 copy "aspose_barcode_cloud: ^4.25.3" to clipboard
aspose_barcode_cloud: ^4.25.3 copied to clipboard

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

example/main.dart

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

import 'package:aspose_barcode_cloud/aspose_barcode_cloud.dart';

Future<void> main() async {
  const fileName = "qr.png";

  final client = ApiClient(Configuration(
    clientId: "Client Id from https://dashboard.aspose.cloud/applications",
    clientSecret:
        "Client Secret from https://dashboard.aspose.cloud/applications",
    // For testing only
    accessToken: Platform.environment["TEST_CONFIGURATION_ACCESS_TOKEN"],
  ));

  final genApi = GenerateApi(client);
  final scanApi = ScanApi(client);
  // Generate image with barcode
  final Uint8List generated =
      await genApi.generate(EncodeBarcodeType.QR, "text");

  // Save generated image to file
  File(fileName).writeAsBytesSync(generated);
  print("Generated image saved to '$fileName'");

  // Recognize generated image

  final BarcodeResponseList recognized = await scanApi.scanMultipart(generated);

  if (recognized.barcodes.isNotEmpty) {
    print("Recognized Type: ${recognized.barcodes[0].type!}");
    print("Recognized Value: ${recognized.barcodes[0].barcodeValue!}");
  } else {
    print("No barcode found");
  }
}
copied to clipboard
4
likes
160
points
443
downloads

Publisher

verified publisheraspose.cloud

Weekly Downloads

2024.09.13 - 2025.03.28

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

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

http

More

Packages that depend on aspose_barcode_cloud