I am getting the unexpected null value error in the main page which the error shows in the main page and setState().

Widgets & Design

======== Exception caught by widgets library =======================================================

The following TypeErrorImpl was thrown building FoodPageBody(state: _FoodPageBodyState#64cc6):

Unexpected null value.

The relevant error-causing widget was:

FoodPageBody FoodPageBody:file:///C:/Users/91906/AndroidStudioProjects/food_delivery/lib/pages/home/main_food_page.dart:67:22

When the exception was thrown, this was the stack:

dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 297:3 throw_

dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 806:18 nullCheck

packages/get/get_state_manager/src/simple/get_state.dart 134:40 initState

packages/flutter/src/widgets/framework.dart 5611:55 [_firstBuild]

packages/flutter/src/widgets/framework.dart 5456:5 mount

packages/flutter/src/widgets/framework.dart 4335:15 inflateWidget

packages/flutter/src/widgets/framework.dart 6893:36 inflateWidget

packages/flutter/src/widgets/framework.dart 6905:32 mount

packages/flutter/src/widgets/framework.dart 4335:15 inflateWidget

packages/flutter/src/widgets/framework.dart 3846:18 updateChild

packages/flutter/src/widgets/framework.dart 5505:16 performRebuild

packages/flutter/src/widgets/framework.dart 5643:11 performRebuild

packages/flutter/src/widgets/framework.dart 5196:7 rebuild

packages/flutter/src/widgets/framework.dart 5462:5 [_firstBuild]

packages/flutter/src/widgets/framework.dart 5634:11 [_firstBuild]




this is the error which i'm getting while running the code.

What have you tried so far?

i am tried the getx value in main.dart file and i also ask gpt and searching the community according to related issue

Did you check FlutterFlow's Documentation for this topic?
No
1 reply