Home > Back-end >  How can i solve this Viewport.dart problem?
How can i solve this Viewport.dart problem?

Time:10-23

When I am trying to run project always show me this problem. I dont know why I face this problem. If anyone know , Or any way to solve the problem - just tell me please. How can I solve this probelm.

When I am trying to run project always show me this problem. I dont know why I face this problem.

If anyone know , Or any way to solve the problem - just tell me please.

How can I solve this probelm.

   Launching lib\main.dart on vivo 1820 in debug mode...
    lib\main.dart:1
    : Error: Expected ';' after this.
    ../…/rendering/viewport.dart:1375
                    ErrorSummary('Vertical viewport was given unbounded height.'),
                                                                                ^
    : Error: Expected an identifier, but got ','.
    ../…/rendering/viewport.dart:1375
    Try inserting an identifier before ','.
                    ErrorSummary('Vertical viewport was given unbounded height.'),
                                                                                 ^
    : Error: Expected ';' after this.
    ../…/rendering/viewport.dart:1375
                    ErrorSummary('Vertical viewport was given unbounded height.'),
                                                                                 ^
    : Error: Unexpected token ','.
    ../…/rendering/viewport.dart:1375
                    ErrorSummary('Vertical viewport was given unbounded height.'),
                                                                                 ^
    
    : Error: Expected ';' after this.
    ../…/rendering/viewport.dart:1381
                    ),
                    ^
    : Error: Expected an identifier, but got ','.
    ../…/rendering/viewport.dart:1381
    Try inserting an identifier before ','.
                    ),
    : Error: Expected an identifier, but got ','.
    ../…/rendering/viewport.dart:1381
    Try inserting an identifier before ','.
                    ),
                     ^
    : Error: Expected ';' after this.
    ../…/rendering/viewport.dart:1381
                    ),
                     ^
    : Error: Unexpected token ','.
    ../…/rendering/viewport.dart:1381
                    ),
                     ^
    3
    
    FAILURE: Build failed with an exception.
    
    * Where:
    Script 'C:\Users\ramja\Documents\DartConfig\flutterSDK\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1005
    
    * What went wrong:
    Execution failed for task ':app:compileFlutterBuildDebug'.
    > Process 'command 'C:\Users\ramja\Documents\DartConfig\flutterSDK\flutter\bin\flutter.bat'' finished with non-zero exit value 1
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
    
    * Get more help at https://help.gradle.org
    
    BUILD FAILED in 2m 0s
    Exception: Gradle task assembleDebug failed with exit code 1
    Exited (sigterm)

CodePudding user response:

Use ; instead of ,

 ErrorSummary('Vertical viewport was given unbounded height.');

CodePudding user response:

view port error of unbound height generally comes when you don't define any height for your flexible widget. Put your flexible widget inside SizedBox or container with height. Hope this will solve your problem.

  • Related