showProfilesMenu method

Future<void> showProfilesMenu()

Show the language menu. This should be callable from many parts of the app, so it is appropriately handled by the model.

Implementation

Future<void> showProfilesMenu() async {
  List<String> models = await getModelList();
  String initialModel = lastSelectedModel ?? models.first;

  await showDialog(
    barrierDismissible: true,
    context: navigatorKey.currentContext!,
    builder: (context) => ProfilesDialogPage(
      models: models,
      initialModel: initialModel,
    ),
  );

  notifyListeners();
}