Skip to content

WindowMode Configuration #273

New issue

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

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

Already on GitHub? # to your account

Closed
ekasetiawans opened this issue Sep 26, 2019 · 4 comments
Closed

WindowMode Configuration #273

ekasetiawans opened this issue Sep 26, 2019 · 4 comments
Labels
question User questions

Comments

@ekasetiawans
Copy link

I want to add window mode configuration that allow user to select fullscreen mode or default mode.
I save the configuration in .json file then I want to load that file on application start and passing value to options variable. But, I have problem to achieve it, because I can't create func that returning flutter.windowMode.

@ekasetiawans
Copy link
Author

ekasetiawans commented Sep 26, 2019

I want something like this

var options = []flutter.Option{
flutter.WindowMode(getWindowModeFromConfig()),
...
}

func getWindowModeFromConfig() flutter.windowMode{
// reading .json file then returning flutter.windowMode depends to .json value
}

@ekasetiawans
Copy link
Author

Solved

I using flutter.Option as return type for getWindowModeFromConfig function instead of flutter.windowMode

@pchampio
Copy link
Member

pchampio commented Sep 26, 2019

@ekasetiawans can you share the code that reads the .json file and sets the flutter.WindowMode?

@pchampio pchampio added the question User questions label Sep 26, 2019
@ekasetiawans
Copy link
Author

yes, this is the code

https://github.com/ekasetiawans/go-flutter-json-config

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
question User questions
Development

No branches or pull requests

2 participants