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

[Windows] Fix set maximizable throwing an error #267

Merged
merged 2 commits into from Jan 3, 2023

Conversation

jcbinet
Copy link
Contributor

@jcbinet jcbinet commented Dec 28, 2022

An error is thrown when we call setMaximizable because we are using invokeListMethod, instead of invokeMethod.

  • Replace invokeListMethod with invokeMethod
  • Modify method to be asynchronous

Fixes #219

@damywise
Copy link
Contributor

My bad, I made a typo with autocomplete a few months ago when implementing setMaximizable.

@MahmoudKEA
Copy link

@jcbinet Please edit your commit to be asynchronous like this

Future<void> setMaximizable(bool isMaximizable) async {
    final Map<String, dynamic> arguments = {
      'isMaximizable': isMaximizable,
    };
    await _channel.invokeMethod('setMaximizable', arguments);
 }

@jcbinet
Copy link
Contributor Author

jcbinet commented Dec 30, 2022

@MahmoudKhalid Good catch! It's updated

@MahmoudKEA
Copy link

@MahmoudKhalid Good catch! It's updated

Good job, Thank you

@lijy91 lijy91 merged commit 65e681b into leanflutter:main Jan 3, 2023
obiwanzenobi pushed a commit to obiwanzenobi/window_manager that referenced this pull request May 25, 2023
* [windows] Fix set maximizable throwing an error

* fix: setMaximizable method as async
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

Successfully merging this pull request may close these issues.

[Windows] setMaximizable throw a cast error
4 participants