Hi,
Two month ago I've started a flutter project. Unfortunatly I had to let it to work on professionnal stuff. back on my flutter project, I'm upgrading dependencies, passing bloc et flutter_bloc from 2.0 to 3.0, and SURPRISE ! When I try to run my project, It says that builder isn't defined here (and in other place, I use bloc A LOT) :
`
Future
await di.init();
BlocSupervisor.delegate = SimpleBlocDelegate();
runApp(BlocProvider
builder: (BuildContext context) {
return di.serviceLocator
},
child: const BlueKanGoApp(),
));
}
`
What happened? I can find in documentation that actually I've to use BlocBuilder instead of BlocProvider and use 'create' instead of 'builder'. Is it normal?
Thanks for your answer and all your work for Flutter community
Hi @Kobreizhyashi, the syntax changed a little, now you should pass a create function and not a builder.
Here's the doc: https://bloclibrary.dev/#/flutterbloccoreconcepts?id=blocprovider
I just saw that by downgrading my flutter_bloc version. got to handle this ! thanks for your (QUICK!) answer and sorry for the useless ticket.