ZebraDataWedge class

A Flutter plugin for interacting with Zebra DataWedge on Android devices.

This class provides a high-level API to configure and control Zebra's DataWedge service, which provides barcode scanning and data capture capabilities for Zebra mobile computers.

Example usage:

final zebra = ZebraDataWedge();

// Check if DataWedge is available
final available = await zebra.isAvailable();

// Listen to scan events
zebra.events.listen((event) {
  if (event.isScan) {
    print('Scanned: ${event.scanData}');
  }
});

// Create and configure a profile
await zebra.configureClassicBarcodeProfile(
  profileName: 'MyProfile',
  packageName: 'com.example.myapp',
);

Constructors

ZebraDataWedge({ZebraDataWedgePlatform? platform})
Creates a new ZebraDataWedge instance.

Properties

events Stream<DataWedgeEvent>
A stream of typed DataWedgeEvent objects.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scanStream Stream<Map<String, dynamic>>
A stream of raw scan data as Map<String, dynamic>.
no setter

Methods

applyProfileConfiguration(DataWedgeProfileConfiguration configuration, {String? commandTag, bool requestResult = true}) Future<void>
Applies a profile configuration (alias for setConfig).
cloneProfile({required String sourceProfileName, required String destinationProfileName, String? commandTag, bool requestResult = true}) Future<void>
Clones an existing profile to a new profile.
configureClassicBarcodeProfile({required String profileName, required String packageName, List<String> activityList = const <String>[DataWedgeApi.wildcard], String? intentAction, String intentCategory = DataWedgeApi.defaultIntentCategory, int intentDelivery = DataWedgeIntentDelivery.broadcast, bool registerDefaultNotifications = true, bool requestResult = true}) Future<void>
Configures a classic barcode scanning profile with sensible defaults.
configureProfile(String profileName) Future<void>
Creates or updates a DataWedge profile with the given profileName.
createProfile(String profileName, {String? commandTag, bool requestResult = true}) Future<void>
Creates a new DataWedge profile with the given profileName.
customNotifyBluetoothScanner(DataWedgeCustomNotificationRequest request, {String? commandTag, bool requestResult = true}) Future<void>
Sends a custom notification request to a Bluetooth scanner.
deleteAllDeletableProfiles({String? commandTag, bool requestResult = true}) Future<void>
Deletes all deletable DataWedge profiles.
deleteProfiles(List<String> profileNames, {String? commandTag, bool requestResult = true}) Future<void>
Deletes one or more DataWedge profiles.
disableScanner() Future<void>
Disables the barcode scanner.
enableScanner() Future<void>
Enables the barcode scanner.
enumerateScanners() Future<void>
Enumerates all available scanners on the device.
enumerateTriggers({String? commandTag, bool requestResult = true}) Future<void>
Enumerates all available trigger sources on the device.
enumerateWorkflows({String? commandTag, bool requestResult = true}) Future<void>
Enumerates all available workflows on the device.
exportConfig(DataWedgeExportConfigRequest request, {String? commandTag, bool requestResult = true}) Future<void>
Exports DataWedge configuration to files.
getActiveProfile() Future<void>
Retrieves the currently active DataWedge profile name.
getConfig({required String profileName, List<String>? pluginNames, List<DataWedgeProcessPluginRequest>? processPlugins, bool includeAppList = false, bool includeDataCapturePlus = false, bool includeEnterpriseKeyboard = false, String? scannerSelectionByIdentifier, String? commandTag, bool requestResult = true}) Future<void>
Retrieves the configuration of an existing DataWedge profile.
getDataWedgeStatus({String? commandTag, bool requestResult = true}) Future<void>
Retrieves the current DataWedge service status.
getDisabledAppList({String? commandTag, bool requestResult = true}) Future<void>
Retrieves the list of apps where DataWedge is disabled.
getIgnoreDisabledProfiles({String? commandTag, bool requestResult = true}) Future<void>
Retrieves whether DataWedge ignores disabled profiles.
getProfilesList() Future<void>
Retrieves the list of all DataWedge profiles.
getScannerStatus({String? commandTag, bool requestResult = true}) Future<void>
Retrieves the current scanner status.
getVersionInfo() Future<void>
Retrieves the DataWedge version information.
getWeight({String deviceIdentifier = DataWedgeScannerIdentifier.usbTgcsMp7000, String? commandTag, bool requestResult = true}) Future<void>
Retrieves the weight from a connected scale device.
importConfig(DataWedgeImportConfigRequest request, {String? commandTag, bool requestResult = true}) Future<void>
Imports DataWedge configuration from files.
isAvailable() Future<bool>
Checks if the Zebra DataWedge service is available on the device.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyBluetoothScanner(DataWedgeNotificationRequest request, {String? commandTag, bool requestResult = true}) Future<void>
Sends a notification request to a Bluetooth scanner.
registerForDefaultNotifications() Future<void>
Registers for all default notification types.
registerForNotification(String notificationType) Future<void>
Registers for notifications of the specified notificationType.
renameProfile({required String profileName, required String newProfileName, String? commandTag, bool requestResult = true}) Future<void>
Renames an existing profile.
resetDefaultProfile({String? commandTag, bool requestResult = true}) Future<void>
Resets the default profile to the DataWedge system default.
resumeScanner({String? commandTag, bool requestResult = true}) Future<void>
Resumes a suspended scanner plugin.
scannerInputPlugin(String action, {String? commandTag, bool requestResult = true}) Future<void>
Sends a generic scanner input plugin command.
sendCommand({required String command, dynamic value, String? commandTag, bool requestResult = true}) Future<void>
Sends a generic command to DataWedge.
sendCommandBundle({required String command, required Map<String, dynamic> value, String? commandTag, bool requestResult = true}) Future<void>
Sends a command with a Map value to DataWedge.
sendIntent({required Map<String, dynamic> extras, String? action, String? targetPackage, String? commandTag, bool requestResult = true, bool orderedBroadcast = false, bool includeApplicationPackage = false}) Future<void>
Sends a custom intent to DataWedge or another package.
setConfig(DataWedgeProfileConfiguration configuration, {String? commandTag, bool requestResult = true}) Future<void>
Applies a full profile configuration to DataWedge.
setDataWedgeEnabled(bool enabled, {String? commandTag, bool requestResult = true}) Future<void>
Enables or disables the DataWedge service.
setDefaultProfile(String profileName, {String? commandTag, bool requestResult = true}) Future<void>
Sets the specified profile as the default DataWedge profile.
setDisabledAppList(DataWedgeDisabledAppListRequest request, {String? commandTag, bool requestResult = true}) Future<void>
Sets the list of apps where DataWedge should be disabled.
setIgnoreDisabledProfiles(bool ignoreDisabledProfiles, {String? commandTag, bool requestResult = true}) Future<void>
Sets whether DataWedge should ignore disabled profiles.
setScaleToZero({String deviceIdentifier = DataWedgeScannerIdentifier.usbTgcsMp7000, String? commandTag, bool requestResult = true}) Future<void>
Sets the connected scale device to zero (tare).
softRfidTrigger({required String action, String? commandTag, bool requestResult = true}) Future<void>
Controls the software RFID trigger.
softScanTrigger({required String action, String? scannerSelectionByIdentifier, String? commandTag, bool requestResult = true}) Future<void>
Controls the software scan trigger with optional scanner selection.
softVoiceTrigger({required String action, String pluginName = DataWedgePluginName.voice, String? commandTag, bool requestResult = true}) Future<void>
Controls the software voice trigger for voice input workflows.
startSoftScan() Future<void>
Starts a software scan trigger (initiates barcode scanning).
stopSoftScan() Future<void>
Stops an ongoing software scan session.
suspendScanner({String? commandTag, bool requestResult = true}) Future<void>
Suspends the scanner plugin (temporarily disables scanning).
switchDataCapture({required String targetPlugin, Map<String, dynamic>? paramList, String? commandTag, bool requestResult = true, bool includeApplicationPackage = true}) Future<void>
Switches the active data capture plugin.
switchScannerByIdentifier(String scannerIdentifier, {String? commandTag, bool requestResult = true}) Future<void>
Switches to a scanner by its identifier string.
switchScannerByIndex(int scannerIndex, {String? commandTag, bool requestResult = true}) Future<void>
Switches to a scanner by its numeric index.
switchScannerParams({required Map<String, dynamic> parameters, String? scannerSelectionByIdentifier, String? commandTag, bool requestResult = true}) Future<void>
Updates scanner parameters for the currently active scanner.
switchToProfile(String profileName) Future<void>
Switches DataWedge to use the specified profileName.
toggleSoftScan() Future<void>
Toggles the software scan trigger state.
toString() String
A string representation of this object.
inherited
unregisterForNotification(String notificationType) Future<void>
Unregisters from notifications of the specified notificationType.

Operators

operator ==(Object other) bool
The equality operator.
inherited