ficou feio
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:playmaker/classe/theme.dart';
|
||||
import 'package:playmaker/controllers/placar_controller.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:playmaker/classe/theme.dart';
|
||||
import 'package:playmaker/controllers/placar_controller.dart';
|
||||
@@ -91,6 +88,11 @@ class ActionButtonsPanel extends StatelessWidget {
|
||||
bool isPointBtn = label == "1" || label == "2" || label == "3" || label == "M1" || label == "M2" || label == "M3";
|
||||
bool isRebBtn = label == "O" || label == "D";
|
||||
bool isBlkBtn = label == "BLK";
|
||||
|
||||
// Identificadores para as imagens
|
||||
bool isStlBtn = label == "STL";
|
||||
bool isAstBtn = label == "AST";
|
||||
bool isTovBtn = label == "TOV";
|
||||
|
||||
if (isPointBtn) {
|
||||
content = Stack(
|
||||
@@ -112,24 +114,24 @@ class ActionButtonsPanel extends StatelessWidget {
|
||||
children: [
|
||||
Center(
|
||||
child: SizedBox(
|
||||
width: size * 0.80,
|
||||
height: size * 0.80,
|
||||
width: size * 0.75,
|
||||
height: size * 0.75,
|
||||
child: CustomPaint(painter: HoopIconPainter()),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: size * -0.05, // Mantido no topo conforme solicitado
|
||||
top: size * -0.05,
|
||||
right: size * 0.05,
|
||||
child: Stack(
|
||||
children: [
|
||||
Text(label, style: TextStyle(
|
||||
fontSize: size * 0.48, // Tamanho aumentado conforme código anterior
|
||||
fontSize: size * 0.48,
|
||||
fontWeight: FontWeight.w900,
|
||||
foreground: Paint()..style = PaintingStyle.stroke..strokeWidth = size * 0.07..color = Colors.black,
|
||||
decoration: TextDecoration.none
|
||||
)),
|
||||
Text(label, style: TextStyle(
|
||||
fontSize: size * 0.48, // Tamanho aumentado conforme código anterior
|
||||
fontSize: size * 0.48,
|
||||
fontWeight: FontWeight.w900,
|
||||
color: Colors.white,
|
||||
decoration: TextDecoration.none
|
||||
@@ -154,7 +156,38 @@ class ActionButtonsPanel extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
);
|
||||
} else {
|
||||
}
|
||||
// Botão de Roubo de Bola (Steal)
|
||||
else if (isStlBtn) {
|
||||
content = Center(
|
||||
child: Image.asset(
|
||||
'assets/stl.png',
|
||||
width: size * 1,
|
||||
|
||||
),
|
||||
);
|
||||
}
|
||||
// Botão de Assistência (Assist)
|
||||
else if (isAstBtn) {
|
||||
content = Center(
|
||||
child: Image.asset(
|
||||
'assets/assit.png',
|
||||
width: size * 1,
|
||||
|
||||
),
|
||||
);
|
||||
}
|
||||
// Botão de Turnover (Bola com X)
|
||||
else if (isTovBtn) {
|
||||
content = Center(
|
||||
child: Image.asset(
|
||||
'assets/tov.png',
|
||||
width: size * 1,
|
||||
|
||||
),
|
||||
);
|
||||
}
|
||||
else {
|
||||
content = Text(label, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: size * 0.35, decoration: TextDecoration.none));
|
||||
}
|
||||
|
||||
@@ -164,7 +197,7 @@ class ActionButtonsPanel extends StatelessWidget {
|
||||
children: [
|
||||
Container(
|
||||
width: size, height: size,
|
||||
decoration: (isPointBtn || isBlkBtn || isRebBtn)
|
||||
decoration: (isPointBtn || isBlkBtn || isRebBtn || isStlBtn || isAstBtn || isTovBtn)
|
||||
? const BoxDecoration(color: Colors.transparent)
|
||||
: BoxDecoration(gradient: RadialGradient(colors: [color.withOpacity(0.7), color], radius: 0.8), shape: BoxShape.circle, boxShadow: [BoxShadow(color: Colors.black38, blurRadius: 6 * sf, offset: Offset(0, 3 * sf))]),
|
||||
alignment: Alignment.center,
|
||||
@@ -176,9 +209,6 @@ class ActionButtonsPanel extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
|
||||
// =====================================================================
|
||||
// PAINTER DA CESTA (MAIOR E PRETO)
|
||||
// =====================================================================
|
||||
class HoopIconPainter extends CustomPainter {
|
||||
@override
|
||||
void paint(Canvas canvas, Size size) {
|
||||
@@ -192,7 +222,6 @@ class HoopIconPainter extends CustomPainter {
|
||||
..strokeCap = StrokeCap.round
|
||||
..strokeJoin = StrokeJoin.round;
|
||||
|
||||
// 1. Tabela Grande
|
||||
canvas.drawRRect(
|
||||
RRect.fromRectAndRadius(
|
||||
Rect.fromLTRB(w * 0.02, h * 0.02, w * 0.98, h * 0.70),
|
||||
@@ -201,13 +230,11 @@ class HoopIconPainter extends CustomPainter {
|
||||
paint
|
||||
);
|
||||
|
||||
// 2. Quadrado do Alvo
|
||||
canvas.drawRect(
|
||||
Rect.fromLTRB(w * 0.28, h * 0.30, w * 0.72, h * 0.70),
|
||||
paint
|
||||
);
|
||||
|
||||
// 3. Aro (Laranja)
|
||||
final Paint rimPaint = Paint()
|
||||
..color = Colors.orange
|
||||
..style = PaintingStyle.stroke
|
||||
@@ -220,7 +247,6 @@ class HoopIconPainter extends CustomPainter {
|
||||
rimPaint
|
||||
);
|
||||
|
||||
// 4. Rede
|
||||
final Paint netPaint = Paint()
|
||||
..color = Colors.black
|
||||
..style = PaintingStyle.stroke
|
||||
@@ -229,7 +255,7 @@ class HoopIconPainter extends CustomPainter {
|
||||
canvas.drawLine(Offset(w * 0.25, h * 0.75), Offset(w * 0.40, h * 0.98), netPaint);
|
||||
canvas.drawLine(Offset(w * 0.75, h * 0.75), Offset(w * 0.60, h * 0.98), netPaint);
|
||||
canvas.drawLine(Offset(w * 0.40, h * 0.75), Offset(w * 0.30, h * 0.98), netPaint);
|
||||
canvas.drawLine(Offset(w * 0.60, h * 0.75), Offset(w * 0.70, h * 0.98), netPaint);
|
||||
canvas.drawLine(Offset(w * 0.55, h * 0.75), Offset(w * 0.65, h * 0.98), netPaint);
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user