This commit is contained in:
Hillel Coren 2019-08-23 06:51:29 +03:00
parent ef75eed55c
commit 4e4993e8f2
1 changed files with 2 additions and 1 deletions

View File

@ -13,9 +13,10 @@ class Keys {
Future<bool> isTablet(FlutterDriver driver) async {
final info =
await driver.getRenderObjectDiagnostics(find.byType('MaterialApp'));
final regExp = new RegExp(r'Size\(([\d\.]*), ([\d\.]*)');
final regExp = new RegExp(r'Size\(([\d\.]*), ([\d\.]*)');
final match = regExp.firstMatch(info.toString());
final width = double.parse(match.group(1));
final height = double.parse(match.group(2));