What You'll Learn

  1. Download Android Studio
  2. Install Flutter SDK

If on Mac:

  1. Install xCode

Mobile platforms supported:

Install air_brother

flutter pub add air_brother

In order to scan we'll first need to find the scanner on our network.

    Future<List<Connector>> _fetchDevices = AirBrother.getNetworkDevices(5000);

The scanner parameters control the offer a detailed way to configured the scanning process. In this example we'll only show the basic paramters needed to scan a page.

    // This is the list where the paths for the scanned files will be placed.
    List<String> outScannedPaths = [];
    // Scan Parameters are used to configure your scanner.
    ScanParameters scanParams = ScanParameters();
    // In this case we want a scan in a paper of size A6
    scanParams.documentSize = MediaSize.A6;

Once configured we can proceed to performing the scanning operation. Once complete the outScannedPaths list will include the paths to the scanned pages.

    // When a scan is completed we get a JobState which could be an error if
    // something failed.
    JobState jobState = await connector.performScan(scanParams, outScannedPaths);