@@ -192,33 +192,29 @@ class _CupertinoTabViewState extends State<CupertinoTabView> {
192192 Route <dynamic > _onUnknownRoute (RouteSettings settings) {
193193 assert (() {
194194 if (widget.onUnknownRoute == null ) {
195- throw FlutterError .fromParts (< DiagnosticsNode > [
196- ErrorSummary ('Could not find a generator for route $settings in the $runtimeType .' ),
197- ErrorDescription (
198- 'Generators for routes are searched for in the following order:\n '
199- ' 1. For the "/" route, the "builder" property, if non-null, is used.\n '
200- ' 2. Otherwise, the "routes" table is used, if it has an entry for '
201- 'the route.\n '
202- ' 3. Otherwise, onGenerateRoute is called. It should return a '
203- 'non-null value for any valid route not handled by "builder" and "routes".\n '
204- ' 4. Finally if all else fails onUnknownRoute is called.\n '
205- 'Unfortunately, onUnknownRoute was not set.'
206- )
207- ]);
195+ throw FlutterError (
196+ 'Could not find a generator for route $settings in the $runtimeType .\n '
197+ 'Generators for routes are searched for in the following order:\n '
198+ ' 1. For the "/" route, the "builder" property, if non-null, is used.\n '
199+ ' 2. Otherwise, the "routes" table is used, if it has an entry for '
200+ 'the route.\n '
201+ ' 3. Otherwise, onGenerateRoute is called. It should return a '
202+ 'non-null value for any valid route not handled by "builder" and "routes".\n '
203+ ' 4. Finally if all else fails onUnknownRoute is called.\n '
204+ 'Unfortunately, onUnknownRoute was not set.'
205+ );
208206 }
209207 return true ;
210208 }());
211209 final Route <dynamic > result = widget.onUnknownRoute (settings);
212210 assert (() {
213211 if (result == null ) {
214- throw FlutterError .fromParts (< DiagnosticsNode > [
215- ErrorSummary ('The onUnknownRoute callback returned null.' ),
216- ErrorDescription (
217- 'When the $runtimeType requested the route $settings from its '
218- 'onUnknownRoute callback, the callback returned null. Such callbacks '
219- 'must never return null.'
220- )
221- ]);
212+ throw FlutterError (
213+ 'The onUnknownRoute callback returned null.\n '
214+ 'When the $runtimeType requested the route $settings from its '
215+ 'onUnknownRoute callback, the callback returned null. Such callbacks '
216+ 'must never return null.'
217+ );
222218 }
223219 return true ;
224220 }());
0 commit comments