Enable avoid_implementing_value_types lint (#91078)

This commit is contained in:
Ian Hickson
2021-10-04 13:48:04 -07:00
committed by GitHub
parent 7b8a3c1bcd
commit 2bab6514b0
30 changed files with 202 additions and 134 deletions

View File

@@ -123,8 +123,8 @@ void main() {
]),
...<PointerEventRecord>[
for (Duration t = const Duration(milliseconds: 5);
t < const Duration(milliseconds: 80);
t += const Duration(milliseconds: 16))
t < const Duration(milliseconds: 80);
t += const Duration(milliseconds: 16))
PointerEventRecord(t, <PointerEvent>[
PointerMoveEvent(
timeStamp: t - const Duration(milliseconds: 1),
@@ -149,7 +149,7 @@ void main() {
expect(timeDiffs.length, records.length);
for (final Duration diff in timeDiffs) {
// Allow some freedom of time delay in real world.
assert(diff.inMilliseconds > -1);
assert(diff.inMilliseconds > -1, 'timeDiffs were: $timeDiffs (offending time was ${diff.inMilliseconds}ms)');
}
const String b = '$kSecondaryMouseButton';

View File

@@ -249,46 +249,6 @@ class FakeWindowPadding implements WindowPadding {
final double bottom;
}
class FakeAccessibilityFeatures implements AccessibilityFeatures {
const FakeAccessibilityFeatures({
this.accessibleNavigation = false,
this.invertColors = false,
this.disableAnimations = false,
this.boldText = false,
this.reduceMotion = false,
this.highContrast = false,
});
@override
final bool accessibleNavigation;
@override
final bool invertColors;
@override
final bool disableAnimations;
@override
final bool boldText;
@override
final bool reduceMotion;
@override
final bool highContrast;
/// This gives us some grace time when the dart:ui side adds something to
/// [AccessibilityFeatures], and makes things easier when we do rolls to
/// give us time to catch up.
///
/// If you would like to add to this class, changes must first be made in the
/// engine, followed by the framework.
@override
dynamic noSuchMethod(Invocation invocation) {
return null;
}
}
class TestObserver with WidgetsBindingObserver {
List<Locale>? locales;
Locale? locale;