cor e nomes dos botoes
This commit is contained in:
@@ -8,88 +8,109 @@ import 'package:playmaker/controllers/placar_controller.dart';
|
|||||||
class ActionButtonsPanel extends StatelessWidget {
|
class ActionButtonsPanel extends StatelessWidget {
|
||||||
final PlacarController controller;
|
final PlacarController controller;
|
||||||
final double sf;
|
final double sf;
|
||||||
|
|
||||||
const ActionButtonsPanel({super.key, required this.controller, required this.sf});
|
const ActionButtonsPanel({super.key, required this.controller, required this.sf});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final double baseSize = 58 * sf;
|
final double baseSize = 58 * sf;
|
||||||
final double feedSize = 73 * sf;
|
final double feedSize = 73 * sf;
|
||||||
final double gap = 5 * sf;
|
final double gap = 5 * sf;
|
||||||
|
|
||||||
return Row(
|
return Padding(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
// 👇 AJUSTA ESTE VALOR (ex: 30, 50, 80) PARA SUBIR MAIS OU MENOS
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
padding: EdgeInsets.only(bottom: 12 * sf),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
|
children: [
|
||||||
|
_columnBtn([
|
||||||
|
_dragAndTargetBtn("M1", AppTheme.actionMiss, "miss_1", baseSize, feedSize, sf),
|
||||||
|
_dragAndTargetBtn("1", AppTheme.actionPoints, "add_pts_1", baseSize, feedSize, sf),
|
||||||
|
_dragAndTargetBtn("1", AppTheme.actionPoints, "sub_pts_1", baseSize, feedSize, sf, isX: true),
|
||||||
|
_dragAndTargetBtn("STL", AppTheme.actionSteal, "add_stl", baseSize, feedSize, sf),
|
||||||
|
], gap),
|
||||||
|
SizedBox(width: gap),
|
||||||
|
_columnBtn([
|
||||||
|
_dragAndTargetBtn("M2", AppTheme.actionMiss, "miss_2", baseSize, feedSize, sf),
|
||||||
|
_dragAndTargetBtn("2", AppTheme.actionPoints, "add_pts_2", baseSize, feedSize, sf),
|
||||||
|
_dragAndTargetBtn("2", AppTheme.actionPoints, "sub_pts_2", baseSize, feedSize, sf, isX: true),
|
||||||
|
_dragAndTargetBtn("AST", AppTheme.actionAssist, "add_ast", baseSize, feedSize, sf),
|
||||||
|
], gap),
|
||||||
|
SizedBox(width: gap),
|
||||||
|
_columnBtn([
|
||||||
|
_dragAndTargetBtn("M3", AppTheme.actionMiss, "miss_3", baseSize, feedSize, sf),
|
||||||
|
_dragAndTargetBtn("3", AppTheme.actionPoints, "add_pts_3", baseSize, feedSize, sf),
|
||||||
|
_dragAndTargetBtn("3", AppTheme.actionPoints, "sub_pts_3", baseSize, feedSize, sf, isX: true),
|
||||||
|
_dragAndTargetBtn("TOV", AppTheme.actionMiss, "add_tov", baseSize, feedSize, sf),
|
||||||
|
], gap),
|
||||||
|
SizedBox(width: gap),
|
||||||
|
_columnBtn([
|
||||||
|
_dragAndTargetBtn("O", AppTheme.actionRebound, "add_orb", baseSize, feedSize, sf),
|
||||||
|
_dragAndTargetBtn("D", AppTheme.actionRebound, "add_drb", baseSize, feedSize, sf),
|
||||||
|
_dragAndTargetBtn("BLK", AppTheme.actionBlock, "add_blk", baseSize, feedSize, sf),
|
||||||
|
], gap),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ... (o resto dos teus métodos como _columnBtn, _dragAndTargetBtn, etc., mantêm-se iguais)
|
||||||
|
Widget _columnBtn(List<Widget> children, double gap) {
|
||||||
|
return Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: children.map((c) => Padding(padding: EdgeInsets.only(bottom: gap), child: c)).toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _dragAndTargetBtn(String label, Color color, String actionData, double baseSize, double feedSize, double sf,
|
||||||
|
{IconData? icon, bool isX = false}) {
|
||||||
|
return Draggable<String>(
|
||||||
|
data: actionData,
|
||||||
|
feedback: _circle(label, color, icon, true, baseSize, feedSize, sf, isX: isX),
|
||||||
|
childWhenDragging: Opacity(
|
||||||
|
opacity: 0.5,
|
||||||
|
child: _circle(label, color, icon, false, baseSize, feedSize, sf, isX: isX),
|
||||||
|
),
|
||||||
|
child: DragTarget<String>(
|
||||||
|
onAcceptWithDetails: (details) {},
|
||||||
|
builder: (context, candidateData, rejectedData) {
|
||||||
|
bool isHovered = candidateData.any((data) => data != null && data.startsWith("player_"));
|
||||||
|
return Transform.scale(
|
||||||
|
scale: isHovered ? 1.15 : 1.0,
|
||||||
|
child: Container(
|
||||||
|
decoration: isHovered
|
||||||
|
? BoxDecoration(
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
boxShadow: [BoxShadow(color: Colors.white, blurRadius: 10 * sf, spreadRadius: 3 * sf)])
|
||||||
|
: null,
|
||||||
|
child: _circle(label, color, icon, false, baseSize, feedSize, sf, isX: isX),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _basketball(Color color, double size) {
|
||||||
|
return Stack(
|
||||||
|
alignment: Alignment.center,
|
||||||
children: [
|
children: [
|
||||||
_columnBtn([
|
Container(
|
||||||
_dragAndTargetBtn("M1", AppTheme.actionMiss, "miss_1", baseSize, feedSize, sf),
|
width: size * 0.78,
|
||||||
_dragAndTargetBtn("1", AppTheme.actionPoints, "add_pts_1", baseSize, feedSize, sf),
|
height: size * 0.78,
|
||||||
_dragAndTargetBtn("1", AppTheme.actionPoints, "sub_pts_1", baseSize, feedSize, sf, isX: true),
|
decoration: const BoxDecoration(color: Colors.black, shape: BoxShape.circle),
|
||||||
_dragAndTargetBtn("STL", AppTheme.actionSteal, "add_stl", baseSize, feedSize, sf),
|
),
|
||||||
], gap),
|
Icon(Icons.sports_basketball, color: color, size: size),
|
||||||
SizedBox(width: gap * 1),
|
|
||||||
_columnBtn([
|
|
||||||
_dragAndTargetBtn("M2", AppTheme.actionMiss, "miss_2", baseSize, feedSize, sf),
|
|
||||||
_dragAndTargetBtn("2", AppTheme.actionPoints, "add_pts_2", baseSize, feedSize, sf),
|
|
||||||
_dragAndTargetBtn("2", AppTheme.actionPoints, "sub_pts_2", baseSize, feedSize, sf, isX: true),
|
|
||||||
_dragAndTargetBtn("AST", AppTheme.actionAssist, "add_ast", baseSize, feedSize, sf),
|
|
||||||
], gap),
|
|
||||||
SizedBox(width: gap * 1),
|
|
||||||
_columnBtn([
|
|
||||||
_dragAndTargetBtn("M3", AppTheme.actionMiss, "miss_3", baseSize, feedSize, sf),
|
|
||||||
_dragAndTargetBtn("3", AppTheme.actionPoints, "add_pts_3", baseSize, feedSize, sf),
|
|
||||||
_dragAndTargetBtn("3", AppTheme.actionPoints, "sub_pts_3", baseSize, feedSize, sf, isX: true),
|
|
||||||
_dragAndTargetBtn("TOV", AppTheme.actionMiss, "add_tov", baseSize, feedSize, sf),
|
|
||||||
], gap),
|
|
||||||
SizedBox(width: gap * 1),
|
|
||||||
_columnBtn([
|
|
||||||
_dragAndTargetBtn("O", AppTheme.actionRebound, "add_orb", baseSize, feedSize, sf),
|
|
||||||
_dragAndTargetBtn("D", AppTheme.actionRebound, "add_drb", baseSize, feedSize, sf),
|
|
||||||
_dragAndTargetBtn("BLK", AppTheme.actionBlock, "add_blk", baseSize, feedSize, sf),
|
|
||||||
], gap),
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _columnBtn(List<Widget> children, double gap) {
|
Widget _circle(String label, Color color, IconData? icon, bool isFeed, double baseSize, double feedSize, double sf,
|
||||||
return Column(
|
{bool isX = false}) {
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: children.map((c) => Padding(padding: EdgeInsets.only(bottom: gap), child: c)).toList()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget _dragAndTargetBtn(String label, Color color, String actionData, double baseSize, double feedSize, double sf, {IconData? icon, bool isX = false}) {
|
|
||||||
return Draggable<String>(
|
|
||||||
data: actionData,
|
|
||||||
feedback: _circle(label, color, icon, true, baseSize, feedSize, sf, isX: isX),
|
|
||||||
childWhenDragging: Opacity(
|
|
||||||
opacity: 0.5,
|
|
||||||
child: _circle(label, color, icon, false, baseSize, feedSize, sf, isX: isX)
|
|
||||||
),
|
|
||||||
child: DragTarget<String>(
|
|
||||||
onAcceptWithDetails: (details) {},
|
|
||||||
builder: (context, candidateData, rejectedData) {
|
|
||||||
bool isHovered = candidateData.any((data) => data != null && data.startsWith("player_"));
|
|
||||||
return Transform.scale(
|
|
||||||
scale: isHovered ? 1.15 : 1.0,
|
|
||||||
child: Container(
|
|
||||||
decoration: isHovered ? BoxDecoration(shape: BoxShape.circle, boxShadow: [BoxShadow(color: Colors.white, blurRadius: 10 * sf, spreadRadius: 3 * sf)]) : null,
|
|
||||||
child: _circle(label, color, icon, false, baseSize, feedSize, sf, isX: isX)
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget _circle(String label, Color color, IconData? icon, bool isFeed, double baseSize, double feedSize, double sf, {bool isX = false}) {
|
|
||||||
double size = isFeed ? feedSize : baseSize;
|
double size = isFeed ? feedSize : baseSize;
|
||||||
Widget content;
|
Widget content;
|
||||||
bool isPointBtn = label == "1" || label == "2" || label == "3" || label == "M1" || label == "M2" || label == "M3";
|
bool isPointBtn = label == "1" || label == "2" || label == "3" || label == "M1" || label == "M2" || label == "M3";
|
||||||
bool isRebBtn = label == "O" || label == "D";
|
bool isRebBtn = label == "O" || label == "D";
|
||||||
bool isBlkBtn = label == "BLK";
|
bool isBlkBtn = label == "BLK";
|
||||||
|
|
||||||
// Identificadores para as imagens
|
|
||||||
bool isStlBtn = label == "STL";
|
bool isStlBtn = label == "STL";
|
||||||
bool isAstBtn = label == "AST";
|
bool isAstBtn = label == "AST";
|
||||||
bool isTovBtn = label == "TOV";
|
bool isTovBtn = label == "TOV";
|
||||||
@@ -98,115 +119,197 @@ class ActionButtonsPanel extends StatelessWidget {
|
|||||||
content = Stack(
|
content = Stack(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
children: [
|
children: [
|
||||||
Container(width: size * 0.75, height: size * 0.75, decoration: const BoxDecoration(color: Colors.black, shape: BoxShape.circle)),
|
_basketball(color, size * 0.9),
|
||||||
Icon(Icons.sports_basketball, color: color, size: size * 0.9),
|
|
||||||
Stack(
|
Stack(
|
||||||
children: [
|
children: [
|
||||||
Text(label, style: TextStyle(fontSize: size * 0.38, fontWeight: FontWeight.w900, foreground: Paint()..style = PaintingStyle.stroke..strokeWidth = size * 0.05..color = Colors.white, decoration: TextDecoration.none)),
|
Text(label,
|
||||||
Text(label, style: TextStyle(fontSize: size * 0.38, fontWeight: FontWeight.w900, color: Colors.black, decoration: TextDecoration.none)),
|
style: TextStyle(
|
||||||
|
fontSize: size * 0.38,
|
||||||
|
fontWeight: FontWeight.w900,
|
||||||
|
foreground: Paint()
|
||||||
|
..style = PaintingStyle.stroke
|
||||||
|
..strokeWidth = size * 0.05
|
||||||
|
..color = Colors.white,
|
||||||
|
decoration: TextDecoration.none)),
|
||||||
|
Text(label,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: size * 0.38,
|
||||||
|
fontWeight: FontWeight.w900,
|
||||||
|
color: Colors.black,
|
||||||
|
decoration: TextDecoration.none)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
} else if (isRebBtn) {
|
||||||
else if (isRebBtn) {
|
|
||||||
content = Stack(
|
content = Stack(
|
||||||
children: [
|
children: [
|
||||||
Center(
|
Center(
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: size * 0.75,
|
width: size * 0.75,
|
||||||
height: size * 0.75,
|
height: size * 0.75,
|
||||||
child: CustomPaint(painter: HoopIconPainter()),
|
child: CustomPaint(painter: HoopIconPainter()),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
top: size * -0.05,
|
top: size * -0.05,
|
||||||
right: size * 0.05,
|
right: size * 0.05,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
Text(label, style: TextStyle(
|
Text(label,
|
||||||
fontSize: size * 0.48,
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.w900,
|
fontSize: size * 0.48,
|
||||||
foreground: Paint()..style = PaintingStyle.stroke..strokeWidth = size * 0.07..color = Colors.black,
|
fontWeight: FontWeight.w900,
|
||||||
decoration: TextDecoration.none
|
foreground: Paint()
|
||||||
)),
|
..style = PaintingStyle.stroke
|
||||||
Text(label, style: TextStyle(
|
..strokeWidth = size * 0.07
|
||||||
fontSize: size * 0.48,
|
..color = Colors.black,
|
||||||
fontWeight: FontWeight.w900,
|
decoration: TextDecoration.none)),
|
||||||
color: Colors.white,
|
Text(label,
|
||||||
decoration: TextDecoration.none
|
style: TextStyle(
|
||||||
)),
|
fontSize: size * 0.48,
|
||||||
|
fontWeight: FontWeight.w900,
|
||||||
|
color: Colors.white,
|
||||||
|
decoration: TextDecoration.none)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
} else if (isBlkBtn) {
|
||||||
else if (isBlkBtn) {
|
|
||||||
content = Stack(
|
content = Stack(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
children: [
|
children: [
|
||||||
Icon(Icons.front_hand, color: const Color.fromARGB(207, 56, 52, 52), size: size * 0.75),
|
Icon(Icons.front_hand, color: color, size: size * 0.75),
|
||||||
Stack(
|
Stack(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(label, style: TextStyle(fontSize: size * 0.28, fontWeight: FontWeight.w900, foreground: Paint()..style = PaintingStyle.stroke..strokeWidth = size * 0.05..color = Colors.black, decoration: TextDecoration.none)),
|
Text(label,
|
||||||
Text(label, style: TextStyle(fontSize: size * 0.28, fontWeight: FontWeight.w900, color: Colors.white, decoration: TextDecoration.none)),
|
style: TextStyle(
|
||||||
|
fontSize: size * 0.28,
|
||||||
|
fontWeight: FontWeight.w900,
|
||||||
|
foreground: Paint()
|
||||||
|
..style = PaintingStyle.stroke
|
||||||
|
..strokeWidth = size * 0.05
|
||||||
|
..color = Colors.black,
|
||||||
|
decoration: TextDecoration.none)),
|
||||||
|
Text(label,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: size * 0.28,
|
||||||
|
fontWeight: FontWeight.w900,
|
||||||
|
color: Colors.white,
|
||||||
|
decoration: TextDecoration.none)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
} else if (isStlBtn) {
|
||||||
// Botão de Roubo de Bola (Steal)
|
content = Stack(
|
||||||
else if (isStlBtn) {
|
alignment: Alignment.center,
|
||||||
content = Center(
|
children: [
|
||||||
child: Image.asset(
|
Positioned(top: size * 0.05, child: _basketball(color, size * 0.60)),
|
||||||
'assets/stl.png',
|
Positioned(bottom: size * 0.10, child: Icon(Icons.pan_tool, color: color, size: size * 0.50)),
|
||||||
width: size * 1,
|
],
|
||||||
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
} else if (isAstBtn) {
|
||||||
// Botão de Assistência (Assist)
|
content = Stack(
|
||||||
else if (isAstBtn) {
|
alignment: Alignment.center,
|
||||||
content = Center(
|
children: [
|
||||||
child: Image.asset(
|
Positioned(top: size * 0.05, child: _basketball(color, size * 0.60)),
|
||||||
'assets/assit.png',
|
Positioned(
|
||||||
width: size * 1,
|
bottom: size * 0.08,
|
||||||
|
child: Row(
|
||||||
),
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Transform(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
transform: Matrix4.rotationY(3.14159),
|
||||||
|
child: Icon(Icons.back_hand, color: color, size: size * 0.46)),
|
||||||
|
SizedBox(width: size * 0.04),
|
||||||
|
Icon(Icons.back_hand, color: color, size: size * 0.46),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
);
|
);
|
||||||
}
|
} else if (isTovBtn) {
|
||||||
// Botão de Turnover (Bola com X)
|
content = Stack(
|
||||||
else if (isTovBtn) {
|
alignment: Alignment.center,
|
||||||
content = Center(
|
children: [
|
||||||
child: Image.asset(
|
Positioned(top: size * 0.05, child: _basketball(color, size * 0.60)),
|
||||||
'assets/tov.png',
|
Positioned(bottom: size * 0.10, child: Icon(Icons.swap_horiz_rounded, color: color, size: size * 0.55)),
|
||||||
width: size * 1,
|
],
|
||||||
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
} else {
|
||||||
else {
|
content = Text(label,
|
||||||
content = Text(label, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: size * 0.35, decoration: TextDecoration.none));
|
style: TextStyle(
|
||||||
|
color: Colors.white, fontWeight: FontWeight.bold, fontSize: size * 0.35, decoration: TextDecoration.none));
|
||||||
}
|
}
|
||||||
|
|
||||||
return Stack(
|
return Stack(
|
||||||
clipBehavior: Clip.none,
|
clipBehavior: Clip.none,
|
||||||
alignment: Alignment.bottomRight,
|
alignment: Alignment.bottomRight,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
width: size, height: size,
|
width: size,
|
||||||
decoration: (isPointBtn || isBlkBtn || isRebBtn || isStlBtn || isAstBtn || isTovBtn)
|
height: size,
|
||||||
? const BoxDecoration(color: Colors.transparent)
|
decoration: (isPointBtn || isBlkBtn || isRebBtn || isStlBtn || isAstBtn || isTovBtn)
|
||||||
: 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))]),
|
? const BoxDecoration(color: Colors.transparent)
|
||||||
alignment: Alignment.center,
|
: 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,
|
||||||
child: content,
|
child: content,
|
||||||
),
|
),
|
||||||
if (isX) Positioned(top: 0, right: 0, child: Container(decoration: const BoxDecoration(color: Colors.white, shape: BoxShape.circle), child: Icon(Icons.cancel, color: Colors.red, size: size * 0.4))),
|
Positioned(
|
||||||
|
bottom: size * -0.04,
|
||||||
|
left: size * -0.04,
|
||||||
|
child: Container(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: size * 0.09, vertical: size * 0.02),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.grey.shade600,
|
||||||
|
borderRadius: BorderRadius.circular(size * 0.07),
|
||||||
|
boxShadow: [BoxShadow(color: Colors.black45, blurRadius: 2, offset: const Offset(0, 1))],
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
_badgeLabel(label),
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: size * 0.16,
|
||||||
|
fontWeight: FontWeight.w900,
|
||||||
|
decoration: TextDecoration.none,
|
||||||
|
letterSpacing: 0.2,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (isX)
|
||||||
|
Positioned(
|
||||||
|
top: 0,
|
||||||
|
right: 0,
|
||||||
|
child: Container(
|
||||||
|
decoration: const BoxDecoration(color: Colors.white, shape: BoxShape.circle),
|
||||||
|
child: Icon(Icons.cancel, color: Colors.red, size: size * 0.4))),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String _badgeLabel(String label) {
|
||||||
|
switch (label) {
|
||||||
|
case "1": return "FTM";
|
||||||
|
case "M1": return "FTA";
|
||||||
|
case "2": return "2PM";
|
||||||
|
case "M2": return "2PA";
|
||||||
|
case "3": return "3PM";
|
||||||
|
case "M3": return "3PA";
|
||||||
|
case "O": return "OREB";
|
||||||
|
case "D": return "DREB";
|
||||||
|
default: return label;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class HoopIconPainter extends CustomPainter {
|
class HoopIconPainter extends CustomPainter {
|
||||||
@@ -223,29 +326,16 @@ class HoopIconPainter extends CustomPainter {
|
|||||||
..strokeJoin = StrokeJoin.round;
|
..strokeJoin = StrokeJoin.round;
|
||||||
|
|
||||||
canvas.drawRRect(
|
canvas.drawRRect(
|
||||||
RRect.fromRectAndRadius(
|
RRect.fromRectAndRadius(Rect.fromLTRB(w * 0.02, h * 0.02, w * 0.98, h * 0.70), Radius.circular(w * 0.05)), paint);
|
||||||
Rect.fromLTRB(w * 0.02, h * 0.02, w * 0.98, h * 0.70),
|
canvas.drawRect(Rect.fromLTRB(w * 0.28, h * 0.30, w * 0.72, h * 0.70), paint);
|
||||||
Radius.circular(w * 0.05)
|
|
||||||
),
|
|
||||||
paint
|
|
||||||
);
|
|
||||||
|
|
||||||
canvas.drawRect(
|
|
||||||
Rect.fromLTRB(w * 0.28, h * 0.30, w * 0.72, h * 0.70),
|
|
||||||
paint
|
|
||||||
);
|
|
||||||
|
|
||||||
final Paint rimPaint = Paint()
|
final Paint rimPaint = Paint()
|
||||||
..color = Colors.orange
|
..color = Colors.orange
|
||||||
..style = PaintingStyle.stroke
|
..style = PaintingStyle.stroke
|
||||||
..strokeWidth = w * 0.09
|
..strokeWidth = w * 0.09
|
||||||
..strokeCap = StrokeCap.round;
|
..strokeCap = StrokeCap.round;
|
||||||
|
|
||||||
canvas.drawLine(
|
canvas.drawLine(Offset(w * 0.20, h * 0.75), Offset(w * 0.80, h * 0.75), rimPaint);
|
||||||
Offset(w * 0.20, h * 0.75),
|
|
||||||
Offset(w * 0.80, h * 0.75),
|
|
||||||
rimPaint
|
|
||||||
);
|
|
||||||
|
|
||||||
final Paint netPaint = Paint()
|
final Paint netPaint = Paint()
|
||||||
..color = Colors.black
|
..color = Colors.black
|
||||||
|
|||||||
16
pubspec.lock
16
pubspec.lock
@@ -109,10 +109,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: characters
|
name: characters
|
||||||
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
|
sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.4.0"
|
version: "1.4.1"
|
||||||
clock:
|
clock:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -468,18 +468,18 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: matcher
|
name: matcher
|
||||||
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
|
sha256: "12956d0ad8390bbcc63ca2e1469c0619946ccb52809807067a7020d57e647aa6"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.12.17"
|
version: "0.12.18"
|
||||||
material_color_utilities:
|
material_color_utilities:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: material_color_utilities
|
name: material_color_utilities
|
||||||
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
|
sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.11.1"
|
version: "0.13.0"
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -873,10 +873,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55
|
sha256: "93167629bfc610f71560ab9312acdda4959de4df6fac7492c89ff0d3886f6636"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.7.7"
|
version: "0.7.9"
|
||||||
typed_data:
|
typed_data:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
Reference in New Issue
Block a user