Flutter overly_support showOverlayNotification: Multiple Notification windows stack on top of each other

Viewed 535

when using overly_support Library to support showOverlayNotification to show notifications , when the app receives multiple notifications at the same time Notification windows stack on top of each other
how to know if there are multiple notification are currently showing on the screen to put padding between them ? this is my code:

showOverlayNotification((context) {
      return Container(
        height: 115,
      margin: const EdgeInsets.symmetric(horizontal: 10,vertical: 60),
        child:Container(
          height: 115,
          child:Card(
        margin: const EdgeInsets.symmetric(horizontal: 0,vertical: 0),
          child:InkWell(
            onTap: () {},
            child: ListTile(

            leading:
                ClipOval(
                    child: CachedNetworkImage(
                      width: 60,
                      height: 60,
                      fit: BoxFit.cover,
                      imageUrl: "imageUrl",
                    ),
                ),

            title: Text("Li"),
            subtitle: Text("notification Text"),
            trailing: IconButton(
                icon: Icon(Icons.close),
                onPressed: () {
                  OverlaySupportEntry.of(context).dismiss();

                }),),),),),);
    }, duration: Duration(milliseconds: 10000));

this image is for notifications stacked above each other: enter image description here

and this is what i need multi notifications to be shown : enter image description here

0 Answers
Related