Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rkundnani opened this issue Nov 24, 2023 · 1 comment
Assignees
Labels
investigation Needs some research and investigation question Further information is requested

Comments

@rkundnani
Copy link

rkundnani commented Nov 24, 2023

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;
 }
@amondnet
Copy link
Collaborator

amondnet commented Dec 14, 2023

@rkundnani

appBar:  viewModel.loadMessageFromNsdl ? AppBar() : null,

Are there any other conditions on this line?
Could it be related to the �this issue?

@amondnet amondnet self-assigned this Dec 19, 2023
@amondnet amondnet added question Further information is requested investigation Needs some research and investigation labels Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigation Needs some research and investigation question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants