0

This is my Tree: enter image description here

This is the code for the build function:

    return Scaffold(
  resizeToAvoidBottomInset: false,
  body: Scrollbar(
    isAlwaysShown: true,
    controller: controller,
    child: ListView(
      controller: controller,
      children: <Widget>[
        Container(
          color: model.cardThemeColor,
          height: 600,
        )
      ],
    ),
  ),
);

code from MyApp:

    @override
  Widget build(BuildContext context) {
    return WillPopScope(
      onWillPop: () async {
        return Future.value(false);
      },
      child: Navigator(
        key: navigatorKey,
        observers: [
          FirebaseAnalyticsObserver(analytics: analytics),
        ],
        pages: [
          MaterialPage(child: getFirstScreen()),
        ],
        onPopPage: (route, result) {
          if (!route.didPop(result)) return false;
          show404 = false;
          notifyListeners();
          return true;
        },
      ),
    );
  }

and:

  Widget getFirstScreen() {
  return prov.Provider<CalendarAppointmentScreenBloc>(
    create: (c) => CalendarAppointmentScreenBloc(),
    child: prov.Consumer<CalendarAppointmentScreenBloc>(
      builder: (__, bloc, _) => CalendarAppointmentScreen(
        bloc: bloc,
        analytics: analytics,
      ),
    ),
  );

}

If I remove the 'isAlwaysShown', I don't have the error. The error appears after the build function completes. I don't explicitly call the controller's functions.

4
  • 1
    Hi There. You gotta post more code. As of now, there is nothing wrong with what you have posted. Commented May 14, 2021 at 17:52
  • @NisanthReddy Thanks, I added more code. Commented May 14, 2021 at 17:56
  • It is still not sufficient. Add full code for the Widget which has the Scaffold( resizeToAvoidBottomInset: false, Commented May 14, 2021 at 18:00
  • @NisanthReddy This is the full code. I removed the child from the container and still get the error. This is Flutter Web, if it makes a difference. Commented May 14, 2021 at 18:03

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.