Unverified Commit d127f2c9 authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

Fix nullability for some routing related stuff (#67675)

parent 4042eb97
......@@ -2225,7 +2225,7 @@ class FollowerLayer extends ContainerLayer {
Matrix4? _invertedTransform;
bool _inverseDirty = true;
Offset? _transformOffset<S extends Object>(Offset localPosition) {
Offset? _transformOffset(Offset localPosition) {
if (_inverseDirty) {
_invertedTransform = Matrix4.tryInvert(getLastTransform()!);
_inverseDirty = false;
......@@ -2245,7 +2245,7 @@ class FollowerLayer extends ContainerLayer {
}
return false;
}
final Offset? transformedOffset = _transformOffset<S>(localPosition);
final Offset? transformedOffset = _transformOffset(localPosition);
if (transformedOffset == null) {
return false;
}
......
......@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:io';
import 'dart:ui';
......@@ -737,7 +736,7 @@ class RawKeyboard {
}
@immutable
class _ModifierSidePair extends Object {
class _ModifierSidePair {
const _ModifierSidePair(this.modifier, this.side);
final ModifierKey modifier;
......
......@@ -131,7 +131,6 @@ class Draggable<T extends Object> extends StatefulWidget {
assert(maxSimultaneousDrags == null || maxSimultaneousDrags >= 0),
super(key: key);
/// The data that will be dropped by this draggable.
final T? data;
......
......@@ -881,7 +881,7 @@ abstract class ModalRoute<T> extends TransitionRoute<T> with LocalHistoryRoute<T
/// The given [BuildContext] will be rebuilt if the state of the route changes
/// while it is visible (specifically, if [isCurrent] or [canPop] change value).
@optionalTypeArgs
static ModalRoute<T>? of<T extends Object>(BuildContext context) {
static ModalRoute<T>? of<T extends Object?>(BuildContext context) {
final _ModalScopeStatus? widget = context.dependOnInheritedWidgetOfExactType<_ModalScopeStatus>();
return widget?.route as ModalRoute<T>?;
}
......@@ -1818,7 +1818,7 @@ class _DialogRoute<T> extends PopupRoute<T> {
///
/// * [showDialog], which displays a Material-style dialog.
/// * [showCupertinoDialog], which displays an iOS-style dialog.
Future<T> showGeneralDialog<T extends Object>({
Future<T> showGeneralDialog<T extends Object?>({
required BuildContext context,
required RoutePageBuilder pageBuilder,
bool barrierDismissible = false,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment