Button Assert Failed Child Already Added It Can t Be Added Again
Howdy @danagbemava-nc ,
Thank you for your response and thank yous for your assist. Much appreciated.
Below is the minimal code sample :
main.sprint
import 'sprint:ui'; import 'package:flutter/material.dart'; import 'package:flutter/services.sprint'; import 'package:flutter_error/page2.dart'; void primary() { // this function makes application e'er run in portrait mode WidgetsFlutterBinding.ensureInitialized(); SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]) .then((_) { runApp(MyApp()); }); } class MyCustomScrollBehavior extends MaterialScrollBehavior { // Override behavior methods and getters like dragDevices @override Gear up<PointerDeviceKind> get dragDevices => { PointerDeviceKind.touch, PointerDeviceKind.mouse, // etc. }; } course MyApp extends StatelessWidget { // This widget is the root of your application. @override Widget build(BuildContext context) { return MaterialApp( scrollBehavior: MyCustomScrollBehavior(), title: 'Master Folio', home: MyHome(), ); } } class MyHome extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text('Primary Folio') ), torso: Container( child: Center( child: TextButton( child: Text('Go to page two'), onPressed: () { Navigator.push button(context, MaterialPageRoute(builder: (context) => Page2())); }, ), ), ) ); } } page2.sprint
import 'packet:flutter/material.dart'; form Page2 extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.white, appBar: AppBar( title: Text('Page ii') ), body: Container( child: Center( child: Text('Page 2'), ), ) ); } } And then i write command "palpitate run -d chrome --verbose" on the last and i practice hot restart by pressing "r".
After i do a hot restart, then the dorsum button on the browser can be clicked. And i click back button on the browser afterwards I go to page 2, not back button on the AppBar because sometimes i don't use AppBar on my Flutter Awarding.
below is the total issue :
D:\FlutterProjects\flutter_error>flutter run -d chrome --verbose [ +67 ms] executing: [D:\flutter/] git -c log.showSignature=imitation log -n 1 --pretty=format:%H [ +426 ms] Exit code 0 from: git -c log.showSignature=false log -due north 1 --pretty=format:%H [ +1 ms] 4cc385b4b84ac2f816d939a49ea1f328c4e0b48e [ +1 ms] executing: [D:\flutter/] git tag --points-at 4cc385b4b84ac2f816d939a49ea1f328c4e0b48e [ +61 ms] Exit code 0 from: git tag --points-at 4cc385b4b84ac2f816d939a49ea1f328c4e0b48e [ ] ii.5.0 [ +9 ms] executing: [D:\flutter/] git rev-parse --abbrev-ref --symbolic @{u} [ +35 ms] Leave lawmaking 0 from: git rev-parse --abbrev-ref --symbolic @{u} [ ] origin/stable [ ] executing: [D:\flutter/] git ls-remote --go-url origin [ +31 ms] Leave code 0 from: git ls-remote --get-url origin [ ] https://github.com/flutter/flutter.git [ +111 ms] executing: [D:\flutter/] git rev-parse --abbrev-ref Head [ +34 ms] Exit code 0 from: git rev-parse --abbrev-ref Head [ +one ms] stable [ +68 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ +1 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is non required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is non required, skipping update. [ ] Antiquity Example of 'FlutterWebSdk' is not required, skipping update. [ +iv ms] Antiquity Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ +ane ms] Artifact Example of 'WindowsUwpEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] Artifact Example of 'LinuxEngineArtifacts' is non required, skipping update. [ ] Artifact Example of 'LinuxFuchsiaSDKArtifacts' is non required, skipping update. [ ] Artifact Example of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] Antiquity Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] Antiquity Case of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ +86 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ ] Antiquity Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is non required, skipping update. [ +2 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update. [ ] Antiquity Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] Antiquity Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] Artifact Example of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Case of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] Antiquity Instance of 'FlutterRunnerDebugSymbols' is non required, skipping update. [ +68 ms] Skipping pub get: version lucifer. [ +106 ms] Generating D:\FlutterProjects\flutter_error\android\app\src\chief\java\io\flutter\plugins\GeneratedPluginRegistrant.java [ +111 ms] Launching lib\main.dart on Chrome in debug mode... [ +108 ms] Updating assets [ +64 ms] Waiting for connectedness from debug service on Chrome... [ +87 ms] <- reset [ +x ms] D:\flutter\bin\cache\dart-sdk\bin\dart.exe --disable-sprint-dev D:\palpitate\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root D:\palpitate\bin\cache\flutter_web_sdk/ --incremental --target=dartdevc --debugger-module-names --experimental-emit-debug-metadata -DFLUTTER_WEB_AUTO_DETECT=true --output-dill C:\Users\Mathiu\AppData\Local\Temp\flutter_tools.80359ec0\flutter_tool.779a475d\app.dill --libraries-spec file:///D:/flutter/bin/cache/flutter_web_sdk/libraries.json --packages D:\FlutterProjects\flutter_error\.dart_tool\package_config.json -Ddart.vm.profile=imitation -Ddart.vm.production=faux --enable-asserts --track-widget-cosmos --filesystem-root C:\Users\Mathiu\AppData\Local\Temp\flutter_tools.80359ec0\flutter_tools.f3f91ddc --filesystem-scheme org-dartlang-app --initialize-from-dill build\b1b715402d823b7fd5c2b68d2edcb2ce.cache.dill.runway.dill --platform file:///D:/flutter/bin/enshroud/flutter_web_sdk/kernel/flutter_ddc_sdk_sound.dill --audio-null-safety [ +11 ms] <- compile org-dartlang-app:/web_entrypoint.dart [+13673 ms] Waiting for connection from debug service on Chrome... (completed in 13.8s) [ +2 ms] Synced 26.2MB. [ +1 ms] <- accept [ ] Caching compiled dill [ +366 ms] [CHROME]: [ +1 ms] [CHROME]:DevTools listening on ws://127.0.0.1:51065/devtools/browser/79fb406d-c28a-4b76-b55c-17188d1ee883 [ +499 ms] DwdsInjector: Received request for entrypoint at http://localhost:51012/main_module.bootstrap.js [ +7 ms] MetadataProvider: Loading debug metadata... [ +12 ms] MetadataProvider: Loaded debug metadata (sound zilch safety) [ +6 ms] DwdsInjector: Injected debugging metadata for entrypoint at http://localhost:51012/main_module.bootstrap.js [+1826 ms] ChromeProxyService: Initializing expression compiler for main_module.bootstrap.js with sound nil safety: true [ +56 ms] DevHandler: Debug service listening on ws://127.0.0.1:53619/pFOTIf6h-nM=/ws [ +20 ms] This app is linked to the debug service: ws://127.0.0.1:53619/pFOTIf6h-nM=/ws [ +8 ms] Debug service listening on ws://127.0.0.1:53619/pFOTIf6h-nM=/ws [ +1 ms] Running with sound null safety [ +3 ms] To hot restart changes while running, press "r" or "R". [ ] For a more detailed assistance message, press "h". To quit, press "q". [ +2 ms] An Observatory debugger and profiler on Chrome is available at: http://127.0.0.one:53619/pFOTIf6h-nM= [ +519 ms] DevTools activation throttled until 2021-09-sixteen 22:56:59.512663. [+1135 ms] The Flutter DevTools debugger and profiler on Chrome is bachelor at: http://127.0.0.1:9104?uri=http://127.0.0.1:53619/pFOTIf6h-nM= [+5481 ms] Performing hot restart... [ +3 ms] Initializing file store [ +8 ms] Skipping target: gen_localizations [ +iii ms] Skipping target: gen_dart_plugin_registrant [ +1 ms] Skipping target: _composite [ +2 ms] consummate [ +29 ms] Scanned through 523 files in 28ms [ +ane ms] Waiting for connection from debug service on Chrome... [ +1 ms] <- recompile org-dartlang-app:/web_entrypoint.dart 8229da02-cf3f-44ff-bc5d-538f01e50d3a [ ] <- 8229da02-cf3f-44ff-bc5d-538f01e50d3a [ +14 ms] Waiting for connection from debug service on Chrome... (completed in 15ms) [ +i ms] Synced 0.0MB. [ ] <- take [ +3 ms] DwdsVmClient: Attempting a hot restart [ +1 ms] DwdsVmClient: Attempting to disable breakpoints and resume the isolate [ +852 ms] DwdsVmClient: Successfully disabled breakpoints and resumed the isolate [ +one ms] DwdsVmClient: Attempting to get execution context ID. [ ] DwdsVmClient: Got execution context ID. [ ] DwdsVmClient: Issuing $dartHotRestart request. [ +32 ms] ChromeProxyService: Initializing expression compiler for main_module.bootstrap.js with sound null safety: true [ +20 ms] DwdsVmClient: $dartHotRestart request consummate. [ +1 ms] DwdsVmClient: Waiting for Isolate Start event. [ +2 ms] DwdsVmClient: Successful hot restart [ +7 ms] Performing hot restart... (completed in 993ms) [ +1 ms] Restarted application in 996ms. [+26396 ms] Error: Assertion failed: org-dartlang-sdk:///flutter_web_sdk/lib/_engine/engine/navigation/history.sprint:311:14 _userProvidedRouteName != null is not true at Object.throw_ [as throw] (http://localhost:51012/dart_sdk.js:5061:11) at Object.assertFailed (http://localhost:51012/dart_sdk.js:4986:15) at _engine.SingleEntryBrowserHistory.new.onPopState (http://localhost:51012/dart_sdk.js:159565:59) [ +ten ms] Mistake: Exclamation failed: org-dartlang-sdk:///flutter_web_sdk/lib/_engine/engine/navigation/history.dart:266:12 _isOriginEntry(state) is not true at Object.throw_ [equally throw] (http://localhost:51012/dart_sdk.js:5061:eleven) at Object.assertFailed (http://localhost:51012/dart_sdk.js:4986:15) at _engine.SingleEntryBrowserHistory.new.[_unwrapOriginState] (http://localhost:51012/dart_sdk.js:159541:74) at _engine.SingleEntryBrowserHistory.new.tearDown (http://localhost:51012/dart_sdk.js:159598:79) at tearDown.next (<anonymous>) at http://localhost:51012/dart_sdk.js:38640:33 at _RootZone.runUnary (http://localhost:51012/dart_sdk.js:38511:59) at _FutureListener.thenAwait.handleValue (http://localhost:51012/dart_sdk.js:33713:29) at handleValueCallback (http://localhost:51012/dart_sdk.js:34265:49) at Function._propagateToListeners (http://localhost:51012/dart_sdk.js:34303:17) at _Future.new.[_completeWithValue] (http://localhost:51012/dart_sdk.js:34151:23) at async._AsyncCallbackEntry.new.callback (http://localhost:51012/dart_sdk.js:34172:35) at Object._microtaskLoop (http://localhost:51012/dart_sdk.js:38778:13) at _startMicrotaskLoop (http://localhost:51012/dart_sdk.js:38784:thirteen) at http://localhost:51012/dart_sdk.js:34519:nine
Give thanks you and best regards
orozcothismillond.blogspot.com
Source: https://github.com/flutter/flutter/issues/90031
0 Response to "Button Assert Failed Child Already Added It Can t Be Added Again"
Post a Comment