This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:math'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter_test/flutter_test.dart'; | |
extension TestingHelpers on WidgetTester { | |
/// Helper method for tapping a finder, and for optionally choosing the index | |
/// if the finder finds multiple and if we should scroll to before tapping. | |
Future<void> tapFinder( | |
Finder finder, { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension NotNullFunctionCall<T> on void Function(T) { | |
void maybeCall(T? value) { | |
if (value != null) { | |
return this.call(value); | |
} | |
} | |
} | |
void navigateTo(int index) { | |
print('The index is: $index'); |