Skip to content

fix: codelab example step01 Platform.is* call (#36126) #1053

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

Merged

Conversation

AdrienLemaire
Copy link
Contributor

@AdrienLemaire AdrienLemaire commented Aug 3, 2022

Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.
The codelab boring-to-beautiful fails with error Unsupported operation: Platform._operatingSystem

List which issues are fixed by this PR. For larger changes, raising an issue first helps
reduce redundant work.

Pre-launch Checklist

  • I read the Effective Dart: Style recently, and have followed its advice.
  • I signed the CLA.
  • I updated/added relevant documentation (doc comments with ///).
    • not necessary
  • All existing and new tests are passing.
    • no test suite available for the codelabs

If you need help, consider asking for advice on the #hackers-devrel channel on Discord.

@@ -13,7 +12,9 @@ Future setDesktopWindow() async {
void main() {
WidgetsFlutterBinding.ensureInitialized();

if (Platform.isWindows || Platform.isLinux || Platform.isMacOS) {
if (UniversalPlatform.isWindows ||
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed following this comment

@khanhnwin
Copy link
Contributor

khanhnwin commented Aug 3, 2022

Thanks @AdrienLemaire! I've gone ahead and added those changes to all of the step projects.

@khanhnwin khanhnwin merged commit 31cf152 into flutter:main Aug 3, 2022
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.

2 participants