fix multiline FlutterError (#49280)

diff --git a/packages/flutter/lib/src/material/scaffold.dart b/packages/flutter/lib/src/material/scaffold.dart
index 866d600..47bc16f 100644
--- a/packages/flutter/lib/src/material/scaffold.dart
+++ b/packages/flutter/lib/src/material/scaffold.dart
@@ -261,7 +261,7 @@
       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;
diff --git a/packages/flutter/lib/src/material/tabs.dart b/packages/flutter/lib/src/material/tabs.dart
index 740c085..b14517b 100644
--- a/packages/flutter/lib/src/material/tabs.dart
+++ b/packages/flutter/lib/src/material/tabs.dart
@@ -1001,7 +1001,7 @@
     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 @@
     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.'
         );
       }
diff --git a/packages/flutter/lib/src/widgets/automatic_keep_alive.dart b/packages/flutter/lib/src/widgets/automatic_keep_alive.dart
index 81f61d1..d6711ce 100644
--- a/packages/flutter/lib/src/widgets/automatic_keep_alive.dart
+++ b/packages/flutter/lib/src/widgets/automatic_keep_alive.dart
@@ -145,7 +145,7 @@
       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.'