In-App notification and custom alert box auto pop up

Widgets & Design

I must show an in-app notification when the app is in the foreground. Now in Flutterflow, I have designed a widget or component that would act as an alert box. I have given this name to it: lozy_connect_alert_notifcation and inAppNotificationData is a parameter which takes JSON input for the title and body of the notification. when a notification arrives from a Firebase push notification this widget will pop up automatically. Could you guide me to achieve this?

How to import the widget's path reference.

Error: Target of URI doesn't exist: 'package:lozy/lozy_main/service_provider/lozy_connect_alert_notifcation/lozy_connect_alert_notifcation_widget.dart'. Try creating the file referenced by the URI, or try using a URI for a file that does exist.

The function 'LozyConnectAlertNotifcationWidget' isn't defined. Try importing the library that defines 'LozyConnectAlertNotifcationWidget', correcting the name to the name of an existing function, or defining a function named 'LozyConnectAlertNotifcationWidget'.

// Automatic FlutterFlow imports
import '/backend/backend.dart';
import '/backend/schema/structs/index.dart';
import '/backend/schema/enums/enums.dart';
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/custom_code/actions/index.dart'; // Imports other custom actions
import '/flutter_flow/custom_functions.dart'; // Imports custom functions
import 'package:flutter/material.dart';
// Begin custom action code
// DO NOT REMOVE OR MODIFY THE CODE ABOVE!

import 'package:lozy/lozy_main/service_provider/lozy_connect_alert_notifcation/lozy_connect_alert_notifcation_widget.dart';

Future showInAppNotification(
  BuildContext context,
  dynamic notificationData,
) async {
  final notificationStruct = NotificationStruct.fromMap(notificationData);

  showDialog(
    context: context,
    builder: (BuildContext context) {
      return LozyConnectAlertNotifcationWidget(
        inAppNotificationData: notificationStruct,
      );
    },
  );
}
What have you tried so far?

So far took co-pilot help but not of use

Did you check FlutterFlow's Documentation for this topic?
Yes