This is from: https://firebase.google.com/codelabs/firebase-get-to-know-flutter#1
void main() {
runApp(
ChangeNotifierProvider(
create: (context) => ApplicationState(),
builder: (context, _) => App(),
),
);
}
That's flutter's website so I thought code is trustworthy which means perhaps create
and builder
both are required.
This answer: https://stackoverflow.com/a/59101137/462608.
says that builder
is depreciated and create
should be used instead.
But the above code is using create and builder both. What is the use of this builder here when create is also there? How are builder and create different from each other?