Home > OS >  The argument type 'Widget Function(BuildContext, Object?)' can't be assigned to the p
The argument type 'Widget Function(BuildContext, Object?)' can't be assigned to the p

Time:09-22

   VxBuilder(
  
     builder: (context, _) {
              return '\$${_cart.totalPrice}'
                  .text
                  .xl4
                  .color(Theme.of(context).accentColor)
                  .make();
            },
            mutations: {RemoveMutation},
          ),

code is here

VxBuilder is having some issues when I upgrade it to 2.5.0

CodePudding user response:

From Documentation VxBuilder requires builder as

Function(BuildContext context, T store, VxStatus? status)

Therefore you need to pass three parameters in builder constructor.

  • Related