Skip to content
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

SpriteWidget gets zero height #1575

Closed
bryantgtx opened this issue Apr 26, 2022 · 0 comments · Fixed by #1760
Closed

SpriteWidget gets zero height #1575

bryantgtx opened this issue Apr 26, 2022 · 0 comments · Fixed by #1760
Labels
bug fix available A PR fixing this bug is available and waiting for a review

Comments

@bryantgtx
Copy link

Current bug behaviour

When creating a SpriteWidget in a Row, the widget gets a height of zero

Expected behaviour

A non-zero height

Steps to reproduce

Using the sample code, run the program, click the button marked "Append". Each click will add a playing card to a "hand". The Row control above the buttons will always show five images. There will be zero to five SpriteWidgets, with empty spaces filled by a placeholder Image widget. After the first click, the first position in the Row will change from an Image widget to a SpriteWidget. Note that the Image widget gets a height, but the SpriteWidget does not.

You can use the buttons to add or remove cards, but the other buttons are really only needed for a different bug.

Flutter doctor output

[√] Flutter (Channel stable, 2.8.1, on Microsoft Windows [Version 10.0.19042.1645], locale en-US)
    • Flutter version 2.8.1 at D:\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 77d935af4d (4 months ago), 2021-12-16 08:37:33 -0800
    • Engine revision 890a5fca2e
    • Dart version 2.15.1

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at C:\Users\greg_000\AppData\Local\Android\sdk
    • Platform android-31, build-tools 30.0.3
    • Java binary at: C:\Program Files\Android\Android Studio1\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    X Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.9.1)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.9.31105.61
    • Windows 10 SDK version 10.0.18362.0

[√] Android Studio (version 4.0)
    • Android Studio at C:\Users\greg_000\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\193.6514223
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] Android Studio (version 2020.3)
    • Android Studio at C:\Program Files\Android\Android Studio1
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[√] IntelliJ IDEA Ultimate Edition (version 2020.1)
    • IntelliJ at C:\Users\greg_000\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\201.7846.76
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart

[√] VS Code (version 1.66.2)
    • VS Code at C:\Users\greg_000\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.38.1

[√] Connected device (4 available)
    • Android SDK built for x86 (mobile) • emulator-5554 • android-x86    • Android 11 (API 30) (emulator)
    • Windows (desktop)                  • windows       • windows-x64    • Microsoft Windows [Version 10.0.19042.1645]
    • Chrome (web)                       • chrome        • web-javascript • Google Chrome 100.0.4896.127
    • Edge (web)                         • edge          • web-javascript • Microsoft Edge 98.0.1108.62

More environment information

  • Flame version: 1.1.1
  • Platform affected: android
  • Platform version affected: android 11

Log information

none

More information

repo linked above

@bryantgtx bryantgtx added the bug label Apr 26, 2022
@st-pasha st-pasha added the fix available A PR fixing this bug is available and waiting for a review label Jun 29, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug fix available A PR fixing this bug is available and waiting for a review
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants