gabrielpatricksouza / image_network

MIT License
12 stars 14 forks source link

Unable to create enough overlay surfaces #20

Open Scount opened 1 year ago

Scount commented 1 year ago

Hi everyone,

i am getting following error message in the console:

Flutter was unable to create enough overlay surfaces. This is usually caused by too many platform views being displayed at once. You may experience incorrect rendering.

I am trying to show images in a list. They are shown there but if i open a Drawer from the right, some images are shown above this drawer.

Drawer closed and list is visible:

image

Drawer open and list should be behind the drawer:

image

Code example of the list:

Container(
        height: 1000,
        child: ListView.builder(
            itemCount: 10,
            itemBuilder: (itemBuilder, index) {
              return ImageNetwork(
                image:
                    'https://www.shutterstock.com/image-photo/metallic-3d-image-abstract-futuristic-600w-2288785777.jpg',
                height: 36,
                width: 36,
                duration: 1500,
                curve: Curves.easeIn,
                onPointer: true,
                debugPrint: false,
                fullScreen: false,
                fitAndroidIos: BoxFit.cover,
                fitWeb: BoxFitWeb.cover,
                borderRadius: BorderRadius.circular(70),
                onLoading: const CircularProgressIndicator(
                  color: Colors.indigoAccent,
                ),
                onError: const Icon(
                  Icons.error,
                  color: Colors.red,
                ),
                onTap: () {
                  debugPrint("©gabriel_patrick_souza");
                },
              );
            }),
      ),

So if anyone has an idea how this could be fixed, feel free to share :)

T-P-F commented 12 months ago

Caught this, perhaps it will help:

Flutter was unable to create enough overlay surfaces. This is usually caused by too many platform views being displayed at once. You may experience incorrect rendering.
Error: Assertion failed: org-dartlang-sdk:///lib/_engine/engine/canvaskit/surface_factory.dart:149:12
_cache.contains(surface)
is not true
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 294:49      throw_
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 35:3        assertFailed
lib/_engine/engine/canvaskit/surface_factory.dart 149:35                          isLive
lib/_engine/engine/canvaskit/surface.dart 277:16                                  [_contextLostListener]
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 574:37  _checkAndCall
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 579:39  dcall