Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no such module 'screen_retriever' #17

Closed
TheGlorySaint opened this issue Nov 24, 2023 · 2 comments
Closed

no such module 'screen_retriever' #17

TheGlorySaint opened this issue Nov 24, 2023 · 2 comments

Comments

@TheGlorySaint
Copy link

TheGlorySaint commented Nov 24, 2023

Dear leanflutter Org,

I want to use your window_manger plugin, but I get the following error when running the application.

/Users/USER/Documents/Development/privat/REPO/macos/Flutter/GeneratedPluginRegistrant.swift:8:8: error: no such module 'screen_retriever'
import screen_retriever

I have followed the installation instruction with adding window_manager 0.3.7 to the pubspec.yaml. In the main.dart i also added ensureInitialized. Attatched is my main.dart file. I have looked into the GeneratedPluginRegistrant file, there is the import screen_retriever added as well as the import window_manager. Also tried pod install --repo-update in the ./macOS path. flutter clean does also not help.

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await windowManager.ensureInitialized();

  try {
    if (Platform.isWindows || Platform.isMacOS) {
      var windowOptions = const WindowOptions(size: Size(800, 600));

      await windowManager.waitUntilReadyToShow(windowOptions, () async {
        await windowManager.show();
        await windowManager.focus();
      });
    }

    setupServices();

    logger(message: 'Waiting for services');

    await services.allReady();

    runApp(const MainApp());
  } catch (error) {
    logger(message: '$error');
  }
}
@0renlyhuang
Copy link

0renlyhuang commented Nov 25, 2023

do you solve this issue? I got the same error😰
image

@lijy91
Copy link
Member

lijy91 commented Aug 18, 2024

Please run flutter run -d macos in the terminal before opening Xcode

@lijy91 lijy91 closed this as completed Aug 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants