Navigation

Mirrorfly Flutter UIKit Plugin is a set of prebuilt UI Widgets that allows you to easily integrate every widgets inside your application to acheive all the essential messaging features.

Navigator Observers#

The navigatorObservers property in the MaterialApp widget is used to add navigation observers to the app. These observers are notified of changes to the navigation stack, such as when a route is pushed or popped.

navigatorObservers: [MirrorFlyNavigationObserver()],

Note : MirrorFlyNavigationObserver is need to add as a navigation observer to the app.

onGenerateRoute#

The onGenerateRoute property in the MaterialApp widget is used to handle the generation of routes. It takes a function that returns a Route object based on the given RouteSettings.

onGenerateRoute: (settings) {
switch (settings.name) {
default:
return mirrorFlyRoute(settings);
}
}

In this example, the onGenerateRoute function checks the name of the route in settings and returns the appropriate route using the mirrorFlyRoute function.

Note : Need to add mirrorFlyRoute function to handle the route in Your MaterialApp.

Recent Chat List#

The DashboardView page enables you to integrate the UI of your mirrorfly recent chat view using DashboardViewArguments.

Navigator.pushNamed(context, Routes.dashboard,arguments: DashboardViewArguments());

Contacts#

The Contact page enables you to integrate the UI of your mirrorfly registered user list view using ContactListArguments. .

Navigator.pushNamed(context, Routes.contacts,arguments: ContactListArguments());

Single & Group Chat#

The ChatView widget enables you to integrate the UI of your mirrorfly Single / Group Chat View using ChatViewArguments.

ChatView(chatViewArguments: const ChatViewArguments(chatJid: REMOTE_JID));
Parameter nameTypeDescription
REMOTE_JIDStringJID of the Single User/Group

Note : You can also navigate to Chat Page using below code.

Navigator.pushNamed(context, Routes.chat,arguments: ChatViewArguments(chatJid: REMOTE_JID));

One-to-One / Group Reply#

Reply is a feature that allows users to reply to each other's messages in a group and one-to-one chat. Users can ask questions, give feedback or add context to a specific message without interrupting the conversation flow. A message reply refers to a group of messages and their replies.

replymessage

Profile Page#

Update Profile is a feature that allows users to update your profile.

Navigator.pushNamed(context, Routes.profile);