byKeyValueString static method

String byKeyValueString(
  1. String key
)

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

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

Implementation

static String byKeyValueString(String key) {
  return base64.encode(utf8.encode(json.encode({
    'finderType': 'ByValueKey',
    'keyValueString': key,
    'keyValueType': 'String'
  }).toString()));
}