Skip to content

Commit

Permalink
fix: #19 solve no width found in ios release mode
Browse files Browse the repository at this point in the history
  • Loading branch information
danielwii committed Feb 5, 2021
1 parent 4bdfda8 commit 331ca97
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.4.6

* fix ios release version cannot calc widget width issue

## 0.4.5

* update README
Expand Down
1 change: 0 additions & 1 deletion example/.flutter-plugins-dependencies

This file was deleted.

1 change: 1 addition & 0 deletions example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
**/doc/api/
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.4.5"
version: "0.4.6"
flutter_test:
dependency: "direct dev"
description: flutter
Expand Down
2 changes: 2 additions & 0 deletions lib/flutter_barrage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,10 @@ class _BarrageState extends State<BarrageWall> with TickerProviderStateMixin {
widgetWidth = box?.size?.width;
}

// 通过计算出的 widget width 在判断弹幕完全移出了可视区域
if (box != null &&
RenderObject.debugActiveLayout == null &&
widgetWidth > 0 &&
animation.value > (fixedWidth + widgetWidth)) {
_lastBullets[nextChannel]?.updateWith(position: double.infinity);
return const SizedBox();
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_barrage
description: A new barrage package project. Used to send bullet(danmu) to a container.
version: 0.4.5
version: 0.4.6
homepage: https://github.com/danielwii/flutter_barrage.git

environment:
Expand Down

0 comments on commit 331ca97

Please sign in to comment.