Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

SpriteButton.placedInsets is not used

Đang mở Phù hợp với người mới
#4,067 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
92/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
dart, flutter
Lĩnh vực
frontend

Hướng nghiên cứu

Mở main/packages/flame/lib/src/widgets/sprite_button.dart và kiểm tra việc xây dựng từ SpriteButton sang InternalSpriteButton quanh dòng 234-235. Xác minh cách pressedInsets được truyền vào và cách nó ảnh hưởng đến vị trí của nhãn khi được nhấn. Hoàn tất khi một giá trị pressedInsets tùy chỉnh làm thay đổi chuyển động của nhãn khi widget được nhấn; chạy các kiểm tra Flutter liên quan nếu có.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug
What happened?

the perameter placedInsets on the SpriteButton widget is not passed to InternalSpriteButton. This results in custom insets not being applies when a SpriteButton is pressed.

What do you expect?

when passing a custom value for pressedInsets into a SpriteButton widget the way that the label moves when the button is pressed should be altered, it is not.

How can we reproduce this?

create a SpriteButton widget and pass in any value of pressedInsets, that value has no effect on how the label is moved when the button is pressed.

What steps should take to fix this?

add
pressedInsets: pressedInsets
between lines 234 and 235 in main/packages/flame/lib/src/widgets/sprite_button.dart

Do have an example of where the bug occurs?

No response

Relevant log output

Execute in a terminal and put output into the code block below

Output of: flutter doctor -v

Affected platforms

All

Other information

No response

Are you interested in working on a PR for this?
  • I want to work on this
Ngôn ngữ chính
Dart
Star
10.8k
Fork
1k
Merge trung bình
2 ngày 10 giờ
Pull request đã merge (30 ngày)
19

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của flame-engine/flame

Tất cả issue của flame-engine/flame

Issue tương tự

Thêm issue về Dart

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.