popToGroupsView static method

dynamic popToGroupsView(
  1. BuildContext context, {
  2. ChatUIKitRouteBackModel? model,
})

返回到群组列表页面,如果没找到,则返回根页面

Implementation

static popToGroupsView(
  BuildContext context, {
  ChatUIKitRouteBackModel? model,
}) {
  _lastBackModel = model;
  Navigator.of(context).popUntil((route) {
    return route.settings.name == ChatUIKitRouteNames.groupsView ||
        route.isFirst;
  });
}