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

Added TargetPlatform #9

Merged
merged 1 commit into from Jul 18, 2020
Merged

Conversation

nilsreichardt
Copy link
Contributor

Sometimes you need to show different widgets for the platforms. To achieve this, you can use Theme.of(context).platform == TargetPlatform.isAndroid. But this is a little bit long. So I added this methods:

context.platform => TragetPlatform
context.isAndroid => bool
context.isIOS => bool
context.isWindows => bool
context.isMacOS => bool
context.isLinux => bool
context.isFuchsia => bool

Short questions: context.isIOS or context.isIOs? context.isMacOS or context.isMacOs?

@pedromassango pedromassango merged commit 0a38852 into pedromassango:master Jul 18, 2020
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.

None yet

2 participants