Skip to content

Error happened when building Observer, but it was captured since disableErrorBoundaries==true #961

Description

@rkundnani

getting this error

Error happened when building Observer, but it was captured since disableErrorBoundaries==true

I/flutter (13988): No observables detected in the build method of Observer
I/flutter (13988): Observer constructed from: BondsWebWidgetState.build
package:cherry/…/components/webview_bonds_widget.dart:166

code :

widget class :

@override
 Widget build(BuildContext context) {
   return WillPopScope(
     onWillPop: _onBackPressed,
     child: Observer(
       builder:(context) { 
         return Scaffold(
         appBar:  viewModel.loadMessageFromNsdl ? AppBar() : null,
         body: Container(
           padding: const EdgeInsets.only(top: kToolbarHeight),
           height: MediaQuery.of(context).size.height,
           child: WebViewWidget(controller: _controller, gestureRecognizers: {
             Factory<DragGestureRecognizer>(
               () => VerticalDragGestureRecognizer(),
             ),
           }),
         ),
       );
        },
     ),
     );
 }

store class:

@observable
 bool loadMessageFromNsdl = false;

 @action
 void toShowAppBarFunction(bool toShowAppBar){
   loadMessageFromNsdl = toShowAppBar;
 }

Metadata

Metadata

Assignees

Labels

investigationNeeds some research and investigationquestionFurther information is requested

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions