Skip to content

Commit

Permalink
fix: avoid useless LayoutBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexays committed Oct 18, 2023
1 parent bcc20a9 commit 9daa85e
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions lib/src/layer/circle_layer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,10 @@ class CircleLayer extends StatelessWidget {
Widget build(BuildContext context) {
final map = MapCamera.of(context);
return MobileLayerTransformer(
child: LayoutBuilder(
builder: (context, bc) {
final size = Size(bc.maxWidth, bc.maxHeight);
return CustomPaint(
painter: CirclePainter(circles, map),
size: size,
);
},
child: CustomPaint(
painter: CustomCirclePainter(squares, map),
size: Size(map.size.x, map.size.y),
isComplex: true,
),
);
}
Expand Down

0 comments on commit 9daa85e

Please sign in to comment.