koukibadr / Elegant-Notification

https://pub.dev/packages/elegant_notification
MIT License
46 stars 30 forks source link

Notification not showing when using rootNavigatorKey.currentContext! #122

Open Trung15010802 opened 5 months ago

Trung15010802 commented 5 months ago
  ElegantNotification.success(
                        width: 300,
                        height: 80,
                        position: Alignment.bottomRight,
                        stackedOptions: StackedOptions(
                          key: 'above',
                          type: StackedType.above,
                        ),
                        description: Text(
                          maxLines: 2,
                          style: const TextStyle(
                            color: Colors.black,
                          ),
                          'description',
                        ),
                        title: Text(
                          style: const TextStyle(
                            fontWeight: FontWeight.bold,
                            color: Colors.black,
                            overflow: TextOverflow.ellipsis,
                          ),
                          'title',
                        ),
                      ).show(rootNavigatorKey.currentContext!);