chat method
- ChatId id, {
- RouteAs mode = RouteAs.replace,
- ChatItemId? itemId,
- ChatDirectLinkSlug? link,
Changes router location to the Routes.chats page.
If push is true, then location is pushed to the router location stack.
Implementation
void chat(
ChatId id, {
RouteAs mode = RouteAs.replace,
ChatItemId? itemId,
ChatDirectLinkSlug? link,
}) {
switch (mode) {
case RouteAs.insteadOfLast:
routes.removeLast();
push('${Routes.chats}/$id');
break;
case RouteAs.replace:
go('${Routes.chats}/$id');
break;
case RouteAs.push:
push('${Routes.chats}/$id');
break;
}
arguments = {'itemId': itemId, 'link': link};
}