I've inherited an existing more or less working Flutter app I need to maintain. I have some basic Flutter knowledge, but I'm not an expert.
The app uses StatelessWidget, but then it defines a state...what is going on? Can someone please help. See the code below.
class MyApp extends StatelessWidget {
...
}
void main() async{
...
runApp(
ChangeNotifierProvider(
child: MyApp(),
create: (_) => AppState(),
),
);
}
Update: I mistakenly assumed that the class AppState makes it "stateful" in some way, but it is defined as "class AppState extends ChangeNotifier". But then this AppState class does contain some information (e.g. in-app-purchase related info) which is being filling in during the app's execution, so it is "kinda stateful".