fix multiline FlutterError (#49280)

This commit is contained in:
Alexandre Ardhuin 2020-01-22 22:03:03 +01:00 committed by Flutter GitHub Bot
parent 3b1ad168c9
commit 4fd19aa189
3 changed files with 4 additions and 4 deletions

View File

@ -261,7 +261,7 @@ class _ScaffoldGeometryNotifier extends ChangeNotifier implements ValueListenabl
if (renderObject == null || !renderObject.owner.debugDoingPaint)
throw FlutterError(
'Scaffold.geometryOf() must only be accessed during the paint phase.\n'
'The ScaffoldGeometry is only available during the paint phase, because\n'
'The ScaffoldGeometry is only available during the paint phase, because '
'its value is computed during the animation and layout phases prior to painting.'
);
return true;

View File

@ -1001,7 +1001,7 @@ class _TabBarState extends State<TabBar> {
assert(() {
if (_controller.length != widget.tabs.length) {
throw FlutterError(
'Controller\'s length property (${_controller.length}) does not match the \n'
'Controller\'s length property (${_controller.length}) does not match the '
'number of tabs (${widget.tabs.length}) present in TabBar\'s tabs property.'
);
}
@ -1326,7 +1326,7 @@ class _TabBarViewState extends State<TabBarView> {
assert(() {
if (_controller.length != widget.children.length) {
throw FlutterError(
'Controller\'s length property (${_controller.length}) does not match the \n'
'Controller\'s length property (${_controller.length}) does not match the '
'number of tabs (${widget.children.length}) present in TabBar\'s tabs property.'
);
}

View File

@ -145,7 +145,7 @@ class _AutomaticKeepAliveState extends State<AutomaticKeepAlive> {
assert(() {
if (!mounted) {
throw FlutterError(
'AutomaticKeepAlive handle triggered after AutomaticKeepAlive was disposed. '
'AutomaticKeepAlive handle triggered after AutomaticKeepAlive was disposed.\n'
'Widgets should always trigger their KeepAliveNotification handle when they are '
'deactivated, so that they (or their handle) do not send spurious events later '
'when they are no longer in the tree.'