embedding flutter in a web app (memory management)

56 Views Asked by At

I've embedded a flutter app in an angular dart web app. While testing, I've put print statements in the "create" and "dispose" of my providers and am only seeing the create messages each time I open the page that has the embedded flutter app. I'm having a hard time finding documentation for this. Does anyone here have experience with that, or can point me to some best practices for embedded flutter memory management?

my test is very simple.

class MyApp extends StatefulWidget

...

@override
  Widget build(BuildContext context) {
    return Provider(
      create: (context) { 
        print('MyApp: create domain');
        return AppDomain(repo: createRepository());
      }, 
      dispose: (context, value) {
        print('MyApp: dispose domain');
        return value.dispose();
      },
      child: MaterialApp( ... )
0

There are 0 best solutions below