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

window_size getWindowInfo error #799

Closed
625859257 opened this issue Sep 18, 2020 · 1 comment
Closed

window_size getWindowInfo error #799

625859257 opened this issue Sep 18, 2020 · 1 comment

Comments

@625859257
Copy link

625859257 commented Sep 18, 2020

i have update window_size to the newest ,but when i getWindowInfo the package has error
like :

Describe the bug

[ +133 ms] [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: NoSuchMethodError: Class 'bool' has no
instance method '[]'.
[   +2 ms] Receiver: true
[   +1 ms] Tried calling: []("frame")
[        ] #0      Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
[        ] #1      WindowSizeChannel.getWindowInfo (package:window_size/src/window_size_channel.dart:140:53)
[        ] <asynchronous suspension>
[        ] #2      getWindowInfo (package:window_size/src/window_size_utils.dart:40:43)
[        ] #3      main (package:moon_jsq/main.dart:52:30)
[        ] #4      _runMainZoned.<anonymous closure>.<anonymous closure> (dart:ui/hooks.dart:231:25)
[        ] #5      _rootRun (dart:async/zone.dart:1190:13)
[        ] #6      _CustomZone.run (dart:async/zone.dart:1093:19)
[        ] #7      _runZoned (dart:async/zone.dart:1630:10)
[        ] #8      runZonedGuarded (dart:async/zone.dart:1618:12)
[        ] #9      _runMainZoned.<anonymous closure> (dart:ui/hooks.dart:223:5)
[        ] #10     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:301:19)
[        ] #11     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)

Doctor Output

[√] Flutter (Channel master, 1.22.0-10.0.pre.221, on Microsoft Windows [Version 10.0.18362.1082], locale zh-CN)
    • Flutter version 1.22.0-10.0.pre.221 at E:\BaiduNetdiskDownload\flutter
    • Framework revision fa646339d6 (26 hours ago), 2020-09-16 17:47:04 -0700
    • Engine revision 933f811d94
    • Dart version 2.10.0 (build 2.10.0-135.0.dev)
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn


[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at E:\android-dev\android-sdk
    • Platform android-29, build-tools 29.0.3
    • ANDROID_HOME = E:\android-dev\android-sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
    • All Android licenses accepted.

[√] Visual Studio - develop for Windows (Visual Studio Professional 2019 16.6.2)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional
    • Visual Studio Professional 2019 version 16.6.30204.135
    • Windows 10 SDK version 10.0.19041.0

[!] Android Studio (version 3.6)
    • Android Studio at C:\Program Files\Android\Android Studio
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

[√] VS Code, 64-bit edition (version 1.47.0)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 3.14.1

[√] Connected device (1 available)
    • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.18362.1082]

! Doctor found issues in 1 category.
@stuartmorgan
Copy link
Collaborator

There is no codepath in the Windows plugin implementation that can return a boolean for getWindowInfo. Please provide the window_size entry from your pubspec.yaml, because I don't see how you could get this error with the current code.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants