android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: t = android.view.SurfaceControl$Transaction@b92fda8 fN = 20 android.view.SyncRtSurfaceTransactionApplier.applyTransaction:94 android.view.SyncRtSurfaceTransactionApplier.lambda$scheduleApply$0$SyncRtSurfaceTransactionApplier:71 android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ
I/IMM_LC (15388): showSoftInput(View,I)
I/IMM_LC (15388): ssi() - flag : 0 view : com.example.guess_my_number reason = SHOW_SOFT_INPUT
I/IMM_LC (15388): ssi() view is not EditText
D/InsetsController(15388): show(ime(), fromIme=true)
I/IMM_LC (15388): showSoftInput(View,I)
I/IMM_LC (15388): ssi() - flag : 0 view : com.example.guess_my_number reason = SHOW_SOFT_INPUT
I/IMM_LC (15388): ssi() view is not EditText
D/InsetsController(15388): show(ime(), fromIme=true)
I/ViewRootImpl@78173e7[MainActivity](15388): ViewPostIme pointer 0
I/ViewRootImpl@78173e7[MainActivity](15388): ViewPostIme pointer 1
════════ Exception caught by widgets library ═══════════════════════════════════
The following assertion was thrown building Container(bg: BoxDecoration(gradient: LinearGradient(begin: Alignment.topLeft, end: Alignment.bottomRight, colors: [Color(0xffffd700), Color(0xffffecb3)], tileMode: TileMode.clamp)), constraints: BoxConstraints(biggest)):
dependOnInheritedWidgetOfExactType() or dependOnInheritedElement() was called before _GameScreenState.initState() completed.
When an inherited widget changes, for example if the value of Theme.of() changes, its dependent widgets are rebuilt. If the dependent widget's reference to the inherited widget is in a constructor or an initState() method, then the rebuilt dependent widget will not reflect the changes in the inherited widget.
Typically references to inherited widgets should occur in widget build() methods. Alternatively, initialization based on inherited widgets can be placed in the didChangeDependencies method, which is called after initState and whenever the dependencies change thereafter.
The relevant error-causing widget was:
Container Container:file:///D:/Flutter-Project/guess_my_number/lib/gradient_container.dart:38:12
When the exception was thrown, this was the stack:
#0 StatefulElement.dependOnInheritedElement. (package:flutter/src/widgets/framework.dart:5720:9)
#1 StatefulElement.dependOnInheritedElement (package:flutter/src/widgets/framework.dart:5763:6)
#2 Element.dependOnInheritedWidgetOfExactType (package:flutter/src/widgets/framework.dart:4779:14)
#3 Localizations.of (package:flutter/src/widgets/localizations.dart:529:48)
#4 debugCheckHasMaterialLocalizations. (package:flutter/src/material/debug.dart:92:23)
#5 debugCheckHasMaterialLocalizations (package:flutter/src/material/debug.dart:113:4)
#6 showDialog (package:flutter/src/material/dialog.dart:1426:10)
#7 _GameScreenState._showAlert (package:guess_my_number/game_screen.dart:106:5)
#8 _GameScreenState._checkGuess (package:guess_my_number/game_screen.dart:100:7)
#9 _GameScreenState.initState. (package:guess_my_number/game_screen.dart:35:9)
#10 State.setState (package:flutter/src/widgets/framework.dart:1203:30)
#11 _GameScreenState.initState (package:guess_my_number/game_screen.dart:31:7)
#12 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:5618:55)
#13 ComponentElement.mount (package:flutter/src/widgets/framework.dart:5463:5)
#14 Element.inflateWidget (package:flutter/src/widgets/framework.dart:4340:16)
#15 Element.updateChild (package:flutter/src/widgets/framework.dart:3843:20)
#16 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6776:14)
#17 Element.updateChild (package:flutter/src/widgets/framework.dart:3827:15)
#18 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6776:14)
#19 Element.updateChild (package:flutter/src/widgets/framework.dart:3827:15)
#20 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6776:14)
#21 Element.updateChild (package:flutter/src/widgets/framework.dart:3827:15)
#22 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5512:16)
#23 Element.rebuild (package:flutter/src/widgets/framework.dart:5203:7)
#24 StatelessElement.update (package:flutter/src/widgets/framework.dart:5563:5)
#25 Element.updateChild (package:flutter/src/widgets/framework.dart:3827:15)
#26 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5512:16)
#27 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5650:11)
#28 Element.rebuild (package:flutter/src/widgets/framework.dart:5203:7)
#29 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2905:19)
#30 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:1136:21)
#31 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:443:5)
#32 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1392:15)
#33 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1313:9)
#34 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1171:5)
#35 _invoke (dart:ui/hooks.dart:312:13)
#36 PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:419:5)
#37 _drawFrame (dart:ui/hooks.dart:283:31)
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
Each child must be laid out exactly once.
The relevant error-causing widget was:
════════════════════════════════════════════════════════════════════════════════
D/InputMethodManager(15388): startInputInner - Id : 0
I/InputMethodManager(15388): startInputInner - mService.startInputOrWindowGainedFocus
D/InsetsController(15388): show(ime(), fromIme=true)
I/IMM_LC (15388): hsifw() - flags=0, caller=android.view.inputmethod.InputMethodManager.hideSoftInputFromWindow:1846 android.view.inputmethod.InputMethodManager.hideSoftInputFromWindow:1815 io.flutter.plugin.editing.TextInputPlugin.hideTextInput:401 io.flutter.plugin.editing.TextInputPlugin.access$300:39 io.flutter.plugin.editing.TextInputPlugin$1.hide:101
I/IMM_LC (15388): hideSoftInputFromWindow - mService.hideSoftInput
D/InsetsSourceConsumer(15388): setRequestedVisible: visible=false, type=19, host=com.example.guess_my_number/com.example.guess_my_number.MainActivity, from=android.view.InsetsSourceConsumer.hide:253 android.view.ImeInsetsSourceConsumer.hide:68 android.view.ImeInsetsSourceConsumer.hide:74 android.view.InsetsController.hideDirectly:1473 android.view.InsetsController.controlAnimationUnchecked:1139 android.view.InsetsController.applyAnimation:1456 android.view.InsetsController.applyAnimation:1437 android.view.InsetsController.hide:1006 android.view.ViewRootImpl$ViewRootHandler.handleMessageImpl:6482 android.view.ViewRootImpl$ViewRootHandler.handleMessage:6403
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: t = android.view.SurfaceControl$Transaction@7781c9f fN = 21 android.view.SyncRtSurfaceTransactionApplier.applyTransaction:94 android.view.SyncRtSurfaceTransactionApplier.lambda$scheduleApply$0$SyncRtSurfaceTransactionApplier:71 android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ
D/InsetsSourceConsumer(15388): ensureControlAlpha: for ITYPE_NAVIGATION_BAR on com.example.guess_my_number/com.example.guess_my_number.MainActivity
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: t = android.view.SurfaceControl$Transaction@ff579b5 fN = 22 android.view.SyncRtSurfaceTransactionApplier.applyTransaction:94 android.view.SyncRtSurfaceTransactionApplier.lambda$scheduleApply$0$SyncRtSurfaceTransactionApplier:71 android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: t = android.view.SurfaceControl$Transaction@d98284a fN = 23 android.view.SyncRtSurfaceTransactionApplier.applyTransaction:94 android.view.SyncRtSurfaceTransactionApplier.lambda$scheduleApply$0$SyncRtSurfaceTransactionApplier:71 android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: t = android.view.SurfaceControl$Transaction@94be3bb fN = 24 android.view.SyncRtSurfaceTransactionApplier.applyTransaction:94 android.view.SyncRtSurfaceTransactionApplier.lambda$scheduleApply$0$SyncRtSurfaceTransactionApplier:71 android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: t = android.view.SurfaceControl$Transaction@25520d8 fN = 25 android.view.SyncRtSurfaceTransactionApplier.applyTransaction:94 android.view.SyncRtSurfaceTransactionApplier.lambda$scheduleApply$0$SyncRtSurfaceTransactionApplier:71 android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: t = android.view.SurfaceControl$Transaction@d50fc31 fN = 26 android.view.SyncRtSurfaceTransactionApplier.applyTransaction:94 android.view.SyncRtSurfaceTransactionApplier.lambda$scheduleApply$0$SyncRtSurfaceTransactionApplier:71 android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: t = android.view.SurfaceControl$Transaction@7387f16 fN = 27 android.view.SyncRtSurfaceTransactionApplier.applyTransaction:94 android.view.SyncRtSurfaceTransactionApplier.lambda$scheduleApply$0$SyncRtSurfaceTransactionApplier:71 android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: t = android.view.SurfaceControl$Transaction@acb0097 fN = 28 android.view.SyncRtSurfaceTransactionApplier.applyTransaction:94 android.view.SyncRtSurfaceTransactionApplier.lambda$scheduleApply$0$SyncRtSurfaceTransactionApplier:71 android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ
════════ Exception caught by rendering library ═════════════════════════════════
Each child must be laid out exactly once.
The relevant error-causing widget was:
════════════════════════════════════════════════════════════════════════════════
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: t = android.view.SurfaceControl$Transaction@e677284 fN = 29 android.view.SyncRtSurfaceTransactionApplier.applyTransaction:94 android.view.SyncRtSurfaceTransactionApplier.lambda$scheduleApply$0$SyncRtSurfaceTransactionApplier:71 android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: t = android.view.SurfaceControl$Transaction@d082a6d fN = 30 android.view.SyncRtSurfaceTransactionApplier.applyTransaction:94 android.view.SyncRtSurfaceTransactionApplier.lambda$scheduleApply$0$SyncRtSurfaceTransactionApplier:71 android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: t = android.view.SurfaceControl$Transaction@6b576a2 fN = 31 android.view.SyncRtSurfaceTransactionApplier.applyTransaction:94 android.view.SyncRtSurfaceTransactionApplier.lambda$scheduleApply$0$SyncRtSurfaceTransactionApplier:71 android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: t = android.view.SurfaceControl$Transaction@8b50f33 fN = 32 android.view.SyncRtSurfaceTransactionApplier.applyTransaction:94 android.view.SyncRtSurfaceTransactionApplier.lambda$scheduleApply$0$SyncRtSurfaceTransactionApplier:71 android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: t = android.view.SurfaceControl$Transaction@42b32f0 fN = 33 android.view.SyncRtSurfaceTransactionApplier.applyTransaction:94 android.view.SyncRtSurfaceTransactionApplier.lambda$scheduleApply$0$SyncRtSurfaceTransactionApplier:71 android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: t = android.view.SurfaceControl$Transaction@58a0069 fN = 34 android.view.SyncRtSurfaceTransactionApplier.applyTransaction:94 android.view.SyncRtSurfaceTransactionApplier.lambda$scheduleApply$0$SyncRtSurfaceTransactionApplier:71 android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: t = android.view.SurfaceControl$Transaction@2185aee fN = 35 android.view.SyncRtSurfaceTransactionApplier.applyTransaction:94 android.view.SyncRtSurfaceTransactionApplier.lambda$scheduleApply$0$SyncRtSurfaceTransactionApplier:71 android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: t = android.view.SurfaceControl$Transaction@2276b8f fN = 36 android.view.SyncRtSurfaceTransactionApplier.applyTransaction:94 android.view.SyncRtSurfaceTransactionApplier.lambda$scheduleApply$0$SyncRtSurfaceTransactionApplier:71 android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ
I/IMM_LC (15388): notifyImeHidden
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: t = android.view.SurfaceControl$Transaction@d288e1c fN = 37 android.view.SyncRtSurfaceTransactionApplier.applyTransaction:94 android.view.SyncRtSurfaceTransactionApplier.lambda$scheduleApply$0$SyncRtSurfaceTransactionApplier:71 android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4
I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ
════════ Exception caught by rendering library ═════════════════════════════════
Each child must be laid out exactly once.
The relevant error-causing widget was:
════════════════════════════════════════════════════════════════════════════════
Однажды я попытался взять весь виджет внутри SafeArea, а затем удалить его, установив высоту с помощью sizebox внутри Expanded, оба не сработали.
Я новичок в Flutter и изучаю его, это один из проектов, над которыми я работаю, есть идеи, что вызывает проблему и как ее исправить
P.S: Спасибо за ответ
class GameScreen extends StatefulWidget { final TextEditingController userNumber; const GameScreen({super.key, required this.userNumber});
@override State createState() => _GameScreenState(); }
class _GameScreenState extends State { String? displayNumber; int? opponentsGuess; int? correctNumber; int totalTries = 1; int min = 0; int max = 100; List tries = []; final Random _random = Random();
void _updateMinMax() { setState(() { if (correctNumber != null) { min = 0; max = 100; } }); }
void incNumber() { if (correctNumber == null || opponentsGuess == null) return; if (opponentsGuess! < correctNumber!) { setState(() { min = opponentsGuess!; opponentsGuess = _generateRandomNumber(); totalTries++; }); _checkGuess(); } else { _showAlert("Do not lie!", "Your guess is too high!"); } }
void decNumber() { if (correctNumber == null || opponentsGuess == null) return; if (opponentsGuess! > correctNumber!) { setState(() { max = opponentsGuess!; opponentsGuess = _generateRandomNumber(); totalTries++; }); _checkGuess(); } else { _showAlert("Do not lie!", "Your guess is too low!"); } }
int _generateRandomNumber() { return _random.nextInt(max - min + 1) + min; }
void _checkGuess() { if (opponentsGuess == correctNumber) { tries.add("The opponent tries times:#$totalTries"); _showAlert("Success!", "The opponent guessed the correct number!, Total Tries=$totalTries"); } else { _showAlert( "Guess updated", "The opponent's new guess is $opponentsGuess"); } }
void main() { runApp( const MaterialApp( home: Scaffold( body: GradientContainer( firstColor: Color.fromARGB(255, 255, 215, 0), secondColor: Color.fromARGB(255, 255, 236, 179), ), ), ), ); } [/code] когда я пытаюсь запустить его, я получаю эту ошибку, и на экране ничего не отображается [code]android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4 I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: t = android.view.SurfaceControl$Transaction@b92fda8 fN = 20 android.view.SyncRtSurfaceTransactionApplier.applyTransaction:94 android.view.SyncRtSurfaceTransactionApplier.lambda$scheduleApply$0$SyncRtSurfaceTransactionApplier:71 android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4 I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ I/IMM_LC (15388): showSoftInput(View,I) I/IMM_LC (15388): ssi() - flag : 0 view : com.example.guess_my_number reason = SHOW_SOFT_INPUT I/IMM_LC (15388): ssi() view is not EditText D/InsetsController(15388): show(ime(), fromIme=true) I/IMM_LC (15388): showSoftInput(View,I) I/IMM_LC (15388): ssi() - flag : 0 view : com.example.guess_my_number reason = SHOW_SOFT_INPUT I/IMM_LC (15388): ssi() view is not EditText D/InsetsController(15388): show(ime(), fromIme=true) I/ViewRootImpl@78173e7[MainActivity](15388): ViewPostIme pointer 0 I/ViewRootImpl@78173e7[MainActivity](15388): ViewPostIme pointer 1
════════ Exception caught by widgets library ═══════════════════════════════════ The following assertion was thrown building Container(bg: BoxDecoration(gradient: LinearGradient(begin: Alignment.topLeft, end: Alignment.bottomRight, colors: [Color(0xffffd700), Color(0xffffecb3)], tileMode: TileMode.clamp)), constraints: BoxConstraints(biggest)): dependOnInheritedWidgetOfExactType() or dependOnInheritedElement() was called before _GameScreenState.initState() completed. When an inherited widget changes, for example if the value of Theme.of() changes, its dependent widgets are rebuilt. If the dependent widget's reference to the inherited widget is in a constructor or an initState() method, then the rebuilt dependent widget will not reflect the changes in the inherited widget. Typically references to inherited widgets should occur in widget build() methods. Alternatively, initialization based on inherited widgets can be placed in the didChangeDependencies method, which is called after initState and whenever the dependencies change thereafter.
The relevant error-causing widget was: Container Container:file:///D:/Flutter-Project/guess_my_number/lib/gradient_container.dart:38:12
════════ Exception caught by rendering library ═════════════════════════════════ Each child must be laid out exactly once. The relevant error-causing widget was: ════════════════════════════════════════════════════════════════════════════════ D/InputMethodManager(15388): startInputInner - Id : 0 I/InputMethodManager(15388): startInputInner - mService.startInputOrWindowGainedFocus D/InsetsController(15388): show(ime(), fromIme=true) I/IMM_LC (15388): hsifw() - flags=0, caller=android.view.inputmethod.InputMethodManager.hideSoftInputFromWindow:1846 android.view.inputmethod.InputMethodManager.hideSoftInputFromWindow:1815 io.flutter.plugin.editing.TextInputPlugin.hideTextInput:401 io.flutter.plugin.editing.TextInputPlugin.access$300:39 io.flutter.plugin.editing.TextInputPlugin$1.hide:101 I/IMM_LC (15388): hideSoftInputFromWindow - mService.hideSoftInput D/InsetsSourceConsumer(15388): setRequestedVisible: visible=false, type=19, host=com.example.guess_my_number/com.example.guess_my_number.MainActivity, from=android.view.InsetsSourceConsumer.hide:253 android.view.ImeInsetsSourceConsumer.hide:68 android.view.ImeInsetsSourceConsumer.hide:74 android.view.InsetsController.hideDirectly:1473 android.view.InsetsController.controlAnimationUnchecked:1139 android.view.InsetsController.applyAnimation:1456 android.view.InsetsController.applyAnimation:1437 android.view.InsetsController.hide:1006 android.view.ViewRootImpl$ViewRootHandler.handleMessageImpl:6482 android.view.ViewRootImpl$ViewRootHandler.handleMessage:6403 I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: t = android.view.SurfaceControl$Transaction@7781c9f fN = 21 android.view.SyncRtSurfaceTransactionApplier.applyTransaction:94 android.view.SyncRtSurfaceTransactionApplier.lambda$scheduleApply$0$SyncRtSurfaceTransactionApplier:71 android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4 I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ D/InsetsSourceConsumer(15388): ensureControlAlpha: for ITYPE_NAVIGATION_BAR on com.example.guess_my_number/com.example.guess_my_number.MainActivity I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: t = android.view.SurfaceControl$Transaction@ff579b5 fN = 22 android.view.SyncRtSurfaceTransactionApplier.applyTransaction:94 android.view.SyncRtSurfaceTransactionApplier.lambda$scheduleApply$0$SyncRtSurfaceTransactionApplier:71 android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4 I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: t = android.view.SurfaceControl$Transaction@d98284a fN = 23 android.view.SyncRtSurfaceTransactionApplier.applyTransaction:94 android.view.SyncRtSurfaceTransactionApplier.lambda$scheduleApply$0$SyncRtSurfaceTransactionApplier:71 android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4 I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: t = android.view.SurfaceControl$Transaction@94be3bb fN = 24 android.view.SyncRtSurfaceTransactionApplier.applyTransaction:94 android.view.SyncRtSurfaceTransactionApplier.lambda$scheduleApply$0$SyncRtSurfaceTransactionApplier:71 android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4 I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: t = android.view.SurfaceControl$Transaction@25520d8 fN = 25 android.view.SyncRtSurfaceTransactionApplier.applyTransaction:94 android.view.SyncRtSurfaceTransactionApplier.lambda$scheduleApply$0$SyncRtSurfaceTransactionApplier:71 android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4 I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: t = android.view.SurfaceControl$Transaction@d50fc31 fN = 26 android.view.SyncRtSurfaceTransactionApplier.applyTransaction:94 android.view.SyncRtSurfaceTransactionApplier.lambda$scheduleApply$0$SyncRtSurfaceTransactionApplier:71 android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4 I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: t = android.view.SurfaceControl$Transaction@7387f16 fN = 27 android.view.SyncRtSurfaceTransactionApplier.applyTransaction:94 android.view.SyncRtSurfaceTransactionApplier.lambda$scheduleApply$0$SyncRtSurfaceTransactionApplier:71 android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4 I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: t = android.view.SurfaceControl$Transaction@acb0097 fN = 28 android.view.SyncRtSurfaceTransactionApplier.applyTransaction:94 android.view.SyncRtSurfaceTransactionApplier.lambda$scheduleApply$0$SyncRtSurfaceTransactionApplier:71 android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4 I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ
════════ Exception caught by rendering library ═════════════════════════════════ Each child must be laid out exactly once. The relevant error-causing widget was: ════════════════════════════════════════════════════════════════════════════════ I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: t = android.view.SurfaceControl$Transaction@e677284 fN = 29 android.view.SyncRtSurfaceTransactionApplier.applyTransaction:94 android.view.SyncRtSurfaceTransactionApplier.lambda$scheduleApply$0$SyncRtSurfaceTransactionApplier:71 android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4 I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: t = android.view.SurfaceControl$Transaction@d082a6d fN = 30 android.view.SyncRtSurfaceTransactionApplier.applyTransaction:94 android.view.SyncRtSurfaceTransactionApplier.lambda$scheduleApply$0$SyncRtSurfaceTransactionApplier:71 android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4 I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: t = android.view.SurfaceControl$Transaction@6b576a2 fN = 31 android.view.SyncRtSurfaceTransactionApplier.applyTransaction:94 android.view.SyncRtSurfaceTransactionApplier.lambda$scheduleApply$0$SyncRtSurfaceTransactionApplier:71 android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4 I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: t = android.view.SurfaceControl$Transaction@8b50f33 fN = 32 android.view.SyncRtSurfaceTransactionApplier.applyTransaction:94 android.view.SyncRtSurfaceTransactionApplier.lambda$scheduleApply$0$SyncRtSurfaceTransactionApplier:71 android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4 I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: t = android.view.SurfaceControl$Transaction@42b32f0 fN = 33 android.view.SyncRtSurfaceTransactionApplier.applyTransaction:94 android.view.SyncRtSurfaceTransactionApplier.lambda$scheduleApply$0$SyncRtSurfaceTransactionApplier:71 android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4 I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: t = android.view.SurfaceControl$Transaction@58a0069 fN = 34 android.view.SyncRtSurfaceTransactionApplier.applyTransaction:94 android.view.SyncRtSurfaceTransactionApplier.lambda$scheduleApply$0$SyncRtSurfaceTransactionApplier:71 android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4 I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: t = android.view.SurfaceControl$Transaction@2185aee fN = 35 android.view.SyncRtSurfaceTransactionApplier.applyTransaction:94 android.view.SyncRtSurfaceTransactionApplier.lambda$scheduleApply$0$SyncRtSurfaceTransactionApplier:71 android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4 I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: t = android.view.SurfaceControl$Transaction@2276b8f fN = 36 android.view.SyncRtSurfaceTransactionApplier.applyTransaction:94 android.view.SyncRtSurfaceTransactionApplier.lambda$scheduleApply$0$SyncRtSurfaceTransactionApplier:71 android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4 I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ I/IMM_LC (15388): notifyImeHidden I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: t = android.view.SurfaceControl$Transaction@d288e1c fN = 37 android.view.SyncRtSurfaceTransactionApplier.applyTransaction:94 android.view.SyncRtSurfaceTransactionApplier.lambda$scheduleApply$0$SyncRtSurfaceTransactionApplier:71 android.view.SyncRtSurfaceTransactionApplier$$ExternalSyntheticLambda0.onFrameDraw:4 I/ViewRootImpl@78173e7[MainActivity](15388): mWNT: merge t to BBQ
════════ Exception caught by rendering library ═════════════════════════════════ Each child must be laid out exactly once. The relevant error-causing widget was: ════════════════════════════════════════════════════════════════════════════════ [/code] Однажды я попытался взять весь виджет внутри SafeArea, а затем удалить его, установив высоту с помощью sizebox внутри Expanded, оба не сработали. Я новичок в Flutter и изучаю его, это один из проектов, над которыми я работаю, есть идеи, что вызывает проблему и как ее исправить P.S: Спасибо за ответ