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

Make currentUniversalPlatform accessible #27

Open
scopendo opened this issue Jan 31, 2024 · 1 comment
Open

Make currentUniversalPlatform accessible #27

scopendo opened this issue Jan 31, 2024 · 1 comment

Comments

@scopendo
Copy link

Currently currentUniversalPlatform is internal to the universal_platform.dart package, requiring the use of the UniversalPlatform.isXXX booleans.

It would be useful if currentUniversalPlatform was exported so that apps could use a switch statement:

final xxx = switch (currentUniversalPlatform` {
  UniversalPlatformType.Web => 'web',
  UniversalPlatformType.IOS => 'ios',
  UniversalPlatformType.Android => 'android',
  _ => 'something else',
};
@scopendo
Copy link
Author

I was going to add a PR for this but can see that it's already exported on the master branch. Is it possible to publish an updated version to pub.dev?

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