Skip to content

Commit 7d59de1

Browse files
Move null check
1 parent 528af53 commit 7d59de1

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

flare_flutter/lib/flare.dart

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -796,17 +796,16 @@ class FlutterActorArtboard extends ActorArtboard {
796796
FlutterActorArtboard(FlutterActor actor) : super(actor);
797797

798798
void draw(ui.Canvas canvas) {
799-
if (drawableNodes == null || drawableNodes.isEmpty) {
800-
return;
801-
}
802799
if (clipContents) {
803800
canvas.save();
804801
AABB aabb = artboardAABB();
805802
canvas.clipRect(Rect.fromLTRB(aabb[0], aabb[1], aabb[2], aabb[3]));
806803
}
807-
for (final ActorDrawable drawable in drawableNodes) {
808-
if (drawable is FlutterActorDrawable) {
809-
(drawable as FlutterActorDrawable).draw(canvas);
804+
if (drawableNodes != null) {
805+
for (final ActorDrawable drawable in drawableNodes) {
806+
if (drawable is FlutterActorDrawable) {
807+
(drawable as FlutterActorDrawable).draw(canvas);
808+
}
810809
}
811810
}
812811
if (clipContents) {

0 commit comments

Comments
 (0)