apply lint prefer_void_to_null in dev/ (#22661)
This commit is contained in:
committed by
GitHub
parent
89c5ace117
commit
d340e2f229
@@ -36,14 +36,14 @@ void main() {
|
||||
|
||||
test('waitForAbsent should resolve when text "present" disappears', () async {
|
||||
// Begin waiting for it to disappear
|
||||
final Completer<Null> whenWaitForAbsentResolves = Completer<Null>();
|
||||
final Completer<void> whenWaitForAbsentResolves = Completer<void>();
|
||||
driver.waitForAbsent(presentText).then(
|
||||
whenWaitForAbsentResolves.complete,
|
||||
onError: whenWaitForAbsentResolves.completeError,
|
||||
);
|
||||
|
||||
// Wait 1 second then make it disappear
|
||||
await Future<Null>.delayed(const Duration(seconds: 1));
|
||||
await Future<void>.delayed(const Duration(seconds: 1));
|
||||
await driver.tap(find.byValueKey('togglePresent'));
|
||||
|
||||
// Ensure waitForAbsent resolves
|
||||
@@ -61,14 +61,14 @@ void main() {
|
||||
|
||||
test('waitFor should resolve when text "present" reappears', () async {
|
||||
// Begin waiting for it to reappear
|
||||
final Completer<Null> whenWaitForResolves = Completer<Null>();
|
||||
final Completer<void> whenWaitForResolves = Completer<void>();
|
||||
driver.waitFor(presentText).then(
|
||||
whenWaitForResolves.complete,
|
||||
onError: whenWaitForResolves.completeError,
|
||||
);
|
||||
|
||||
// Wait 1 second then make it appear
|
||||
await Future<Null>.delayed(const Duration(seconds: 1));
|
||||
await Future<void>.delayed(const Duration(seconds: 1));
|
||||
await driver.tap(find.byValueKey('togglePresent'));
|
||||
|
||||
// Ensure waitFor resolves
|
||||
|
||||
@@ -33,7 +33,7 @@ void main() {
|
||||
final SerializableFinder defaultTextField = find.byValueKey(keys.kDefaultTextField);
|
||||
await driver.waitFor(defaultTextField);
|
||||
await driver.tap(defaultTextField);
|
||||
await Future<Null>.delayed(const Duration(seconds: 1));
|
||||
await Future<void>.delayed(const Duration(seconds: 1));
|
||||
|
||||
// Measure the height with keyboard displayed.
|
||||
final String heightWithKeyboardShown = await driver.getText(heightText);
|
||||
@@ -43,7 +43,7 @@ void main() {
|
||||
final SerializableFinder unfocusButton = find.byValueKey(keys.kUnfocusButton);
|
||||
await driver.waitFor(unfocusButton);
|
||||
await driver.tap(unfocusButton);
|
||||
await Future<Null>.delayed(const Duration(seconds: 1));
|
||||
await Future<void>.delayed(const Duration(seconds: 1));
|
||||
|
||||
// Measure the final height.
|
||||
final String endHeight = await driver.getText(heightText);
|
||||
|
||||
@@ -41,7 +41,7 @@ void main() {
|
||||
|
||||
// Bring up keyboard
|
||||
await driver.tap(textFieldFinder);
|
||||
await Future<Null>.delayed(const Duration(seconds: 1));
|
||||
await Future<void>.delayed(const Duration(seconds: 1));
|
||||
|
||||
// Ensure that TextField is visible again
|
||||
await driver.waitFor(textFieldFinder);
|
||||
|
||||
Reference in New Issue
Block a user