jaumard / flare_splash_screen

Facilitator for having a Splash Screen with a Flare animation
MIT License
95 stars 20 forks source link

Animation stops when creating the next screen #13

Closed maxouille closed 4 years ago

maxouille commented 4 years ago

Hi!

I'm using your package and it's great !

I load data from a database during until (this works fine) and then, I push a new route to my HomeScreen which is a screen with a Google Map and clusters of markers (clustering_google_map package).

There is some weird behavior but maybe it's normal. When the loading is done, the animation freezes. I suppose it's during the building of the new StatefulWidget.

Here is my implementation of the Splashscreen :

@override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Wily - Paris',
      home: SplashScreen.navigate(
          name: 'assets/splash_anim.flr',
          next: (context) => HomeScreen(),
          until: () async {
            await loadData(context);
            print("after load data");
          },
          startAnimation: 'pulse',
          loopAnimation: 'pulse',
          endAnimation: 'pulse',
          backgroundColor: Color(0xffffffff)
      )
    );
  }

And my HomeScreen displays a Map Screen. The init of my MapScreen is :

@override
  initState() {
    print("init state in MapScreen");
    initPlatformState();
    print("after plateformstate init");
    initClustering();
    super.initState();
  }

The animation stops before the print("init state in MapScreen");. And I don't know what my emulator is doing during that time (up to 4 seconds)...

There is no errors but there is the logcat:

D/EGL_emulation(12288): eglMakeCurrent: 0x7d3a2cc5f280: ver 3 0 (tinfo 0x7d3a2cc25660)
D/skia    (12288): Shader compilation error
D/skia    (12288): ------------------------
D/skia    (12288): Errors:
D/skia    (12288): 
I/flutter (12288): Retrieved meta data from opendata.paris.fr
I/flutter (12288): 2019-11-09 14:00:38.000
I/flutter (12288): No date changes
I/flutter (12288): DBHelper: init database for the first time it is accessed
I/flutter (12288): DBHelper: init database
I/flutter (12288): Get all toilets from Database and save them to globals...
I/flutter (12288): after load data /!\ Animation stops here !
I/flutter (12288): init state in HomeScreen
I/flutter (12288): init state in MapScreen
I/flutter (12288): after plateformstate init
I/flutter (12288): MapScreen: init clusteringHelper
D/        (12288): HostConnection::get() New Host Connection established 0x7d3a2e84b000, tid 12303
I/zzbz    (12288): Making Creator dynamically
W/com.wily(12288): Unsupported class loader
W/com.wily(12288): Skipping duplicate class check due to unsupported classloader
I/DynamiteModule(12288): Considering local module com.google.android.gms.maps_dynamite:0 and remote module com.google.android.gms.maps_dynamite:221
I/DynamiteModule(12288): Selected remote version of com.google.android.gms.maps_dynamite, version >= 221
V/DynamiteModule(12288): Dynamite loader version >= 2, using loadModule2NoCrashUtils
W/ChimeraDebugLogger(12288): Singleton logger instance not set.
W/com.wily(12288): Unsupported class loader
W/com.wily(12288): Skipping duplicate class check due to unsupported classloader
I/Google Maps Android API(12288): Google Play services client version: 12451000
I/Google Maps Android API(12288): Google Play services package version: 19275041
W/com.wily(12288): Accessing hidden field Ljava/nio/Buffer;->address:J (light greylist, reflection)
D/NetworkSecurityConfig(12288): No Network Security Config specified, using platform default
I/flutter (12288): DBHelper: get not 

Thx

maxouille commented 4 years ago

The emulator was my problem. Sorry