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

outdated

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 '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!);
}
4
likes
0
pub points
34%
popularity

Publisher

verified publisheraspose.cloud

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

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

http

More

Packages that depend on aspose_barcode_cloud