Commit 4fd19aa1 authored by Alexandre Ardhuin's avatar Alexandre Ardhuin Committed by Flutter GitHub Bot

fix multiline FlutterError (#49280)

parent 3b1ad168
...@@ -261,7 +261,7 @@ class _ScaffoldGeometryNotifier extends ChangeNotifier implements ValueListenabl ...@@ -261,7 +261,7 @@ class _ScaffoldGeometryNotifier extends ChangeNotifier implements ValueListenabl
if (renderObject == null || !renderObject.owner.debugDoingPaint) if (renderObject == null || !renderObject.owner.debugDoingPaint)
throw FlutterError( throw FlutterError(
'Scaffold.geometryOf() must only be accessed during the paint phase.\n' '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.' 'its value is computed during the animation and layout phases prior to painting.'
); );
return true; return true;
......
...@@ -1001,7 +1001,7 @@ class _TabBarState extends State<TabBar> { ...@@ -1001,7 +1001,7 @@ class _TabBarState extends State<TabBar> {
assert(() { assert(() {
if (_controller.length != widget.tabs.length) { if (_controller.length != widget.tabs.length) {
throw FlutterError( 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.' 'number of tabs (${widget.tabs.length}) present in TabBar\'s tabs property.'
); );
} }
...@@ -1326,7 +1326,7 @@ class _TabBarViewState extends State<TabBarView> { ...@@ -1326,7 +1326,7 @@ class _TabBarViewState extends State<TabBarView> {
assert(() { assert(() {
if (_controller.length != widget.children.length) { if (_controller.length != widget.children.length) {
throw FlutterError( 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.' 'number of tabs (${widget.children.length}) present in TabBar\'s tabs property.'
); );
} }
......
...@@ -145,7 +145,7 @@ class _AutomaticKeepAliveState extends State<AutomaticKeepAlive> { ...@@ -145,7 +145,7 @@ class _AutomaticKeepAliveState extends State<AutomaticKeepAlive> {
assert(() { assert(() {
if (!mounted) { if (!mounted) {
throw FlutterError( 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 ' 'Widgets should always trigger their KeepAliveNotification handle when they are '
'deactivated, so that they (or their handle) do not send spurious events later ' 'deactivated, so that they (or their handle) do not send spurious events later '
'when they are no longer in the tree.' 'when they are no longer in the tree.'
......
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