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

An unexpected CMD opens and stops working #27

Open
DomingoMG opened this issue Nov 3, 2020 · 0 comments
Open

An unexpected CMD opens and stops working #27

DomingoMG opened this issue Nov 3, 2020 · 0 comments

Comments

@DomingoMG
Copy link

DomingoMG commented Nov 3, 2020

I have a note document open on my computer. ( NOTEPAD.EXE ).

I turn the application into launch mode.

flutter build windows

When I run the .exe and press the button it does it perfectly, but a cmd appears on the screen that disappears instantly.

But once the button is pressed it no longer works, hope someone can help me, thank you very much.

void killNotepad() async {
    String killNotepad = 'taskkill /im "notepad.exe" /F';    
    try {
      await run(killNotepad, throwOnError: false, runInShell: false);
    }catch(e){
      print('error');
    }
  }
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

1 participant