bySemanticsLabel static method

String bySemanticsLabel(
  1. String label
)

Returns base64 encoded string as a finder for appium-flutter-driver with the given label. https://github.com/truongsinh/appium-flutter-driver#finders

var finder = AppiumFlutterFinder.bySemanticsLabel('simple')
var element = driver.getElement(finder);
await element.click();  // Do actions against the element

Implementation

static String bySemanticsLabel(String label) {
  return base64.encode(utf8.encode(json.encode({
    'finderType': 'BySemanticsLabel',
    'isRegExp': false,
    'label': label
  }).toString()));
}