getGroupIdFromBuildContext static method

Object? getGroupIdFromBuildContext(
  1. BuildContext? context
)

Implementation

static Object? getGroupIdFromBuildContext(BuildContext? context) {
  if (context == null) return null;

  final route = ModalRoute.of(context);
  if (route is NopPageRouteMixin) {
    final settings = route.nopSettings;

    return settings.group;
  }
  Log.e('route <${route.runtimeType}> is not NopPageRouteMixin.');

  return null;
}