修复白屏BUG、UI 边界溢出 BUG
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:arcx/app/app_theme.dart';
|
||||
import 'package:arcx/features/scoring/presentation/widgets/target_face_painter.dart';
|
||||
import 'package:arcx/features/scoring/presentation/widgets/hit_point_painter.dart';
|
||||
import 'package:arcx/features/stats/application/stats.dart';
|
||||
|
||||
class HeatmapCard extends StatelessWidget {
|
||||
@@ -26,21 +26,22 @@ class HeatmapCard extends StatelessWidget {
|
||||
Center(
|
||||
child: AspectRatio(
|
||||
aspectRatio: 1,
|
||||
child: hasHits
|
||||
? CustomPaint(
|
||||
painter: TargetFacePainter(
|
||||
hitPoints: stats.hitPoints,
|
||||
hitColor: AppTheme.hitPoint,
|
||||
),
|
||||
child: const SizedBox.expand(),
|
||||
)
|
||||
: CustomPaint(
|
||||
painter: TargetFacePainter(
|
||||
hitPoints: const [],
|
||||
showAllHits: false,
|
||||
),
|
||||
child: const SizedBox.expand(),
|
||||
child: Stack(
|
||||
fit: StackFit.expand,
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/images/target_face.png',
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
CustomPaint(
|
||||
painter: HitPointPainter(
|
||||
hitPoints: stats.hitPoints,
|
||||
hitColor: AppTheme.hitPoint,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
if (!hasHits)
|
||||
|
||||
Reference in New Issue
Block a user