@@ -80,18 +80,17 @@ class PointerRouter {
80
80
InformationCollector collector;
81
81
assert (() {
82
82
collector = () sync * {
83
- yield DiagnosticsProperty <PointerEvent >('Event' , event, style: DiagnosticsTreeStyle .errorProperty);
83
+ yield DiagnosticsProperty <PointerRouter >('router' , this , level: DiagnosticLevel .debug);
84
+ yield DiagnosticsProperty <PointerRoute >('route' , route, level: DiagnosticLevel .debug);
85
+ yield DiagnosticsProperty <PointerEvent >('event' , event, level: DiagnosticLevel .debug);
84
86
};
85
87
return true ;
86
88
}());
87
- FlutterError .reportError (FlutterErrorDetailsForPointerRouter (
89
+ FlutterError .reportError (FlutterErrorDetails (
88
90
exception: exception,
89
91
stack: stack,
90
92
library: 'gesture library' ,
91
93
context: ErrorDescription ('while routing a pointer event' ),
92
- router: this ,
93
- route: route,
94
- event: event,
95
94
informationCollector: collector
96
95
));
97
96
}
@@ -126,48 +125,3 @@ class PointerRouter {
126
125
});
127
126
}
128
127
}
129
-
130
- /// Variant of [FlutterErrorDetails] with extra fields for the gestures
131
- /// library's pointer router ([PointerRouter] ).
132
- ///
133
- /// See also:
134
- ///
135
- /// * [FlutterErrorDetailsForPointerEventDispatcher] , which is also used
136
- /// by the gestures library.
137
- class FlutterErrorDetailsForPointerRouter extends FlutterErrorDetails {
138
- /// Creates a [FlutterErrorDetailsForPointerRouter] object with the given
139
- /// arguments setting the object's properties.
140
- ///
141
- /// The gestures library calls this constructor when catching an exception
142
- /// that will subsequently be reported using [FlutterError.onError] .
143
- const FlutterErrorDetailsForPointerRouter ({
144
- dynamic exception,
145
- StackTrace stack,
146
- String library,
147
- DiagnosticsNode context,
148
- this .router,
149
- this .route,
150
- this .event,
151
- InformationCollector informationCollector,
152
- bool silent = false ,
153
- }) : super (
154
- exception: exception,
155
- stack: stack,
156
- library: library,
157
- context: context,
158
- informationCollector: informationCollector,
159
- silent: silent,
160
- );
161
-
162
- /// The pointer router that caught the exception.
163
- ///
164
- /// In a typical application, this is the value of [GestureBinding.pointerRouter] on
165
- /// the binding ([GestureBinding.instance] ).
166
- final PointerRouter router;
167
-
168
- /// The callback that threw the exception.
169
- final PointerRoute route;
170
-
171
- /// The pointer event that was being routed when the exception was raised.
172
- final PointerEvent event;
173
- }
0 commit comments