fixed controller and coloring
This commit is contained in:
@@ -442,45 +442,57 @@ void _manualScoreEntry() {
|
||||
right: 0,
|
||||
child: Center(
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(8),
|
||||
padding: const EdgeInsets.symmetric(vertical: 16, horizontal: 20),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.black.withOpacity(0.75),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
// Up
|
||||
IconButton(
|
||||
icon: const Icon(Icons.arrow_drop_up, size: 32, color: Colors.white),
|
||||
icon: const Icon(Icons.keyboard_arrow_up, size: 36, color: Colors.white),
|
||||
onPressed: () => _moveBullet(const Offset(0, -3)),
|
||||
splashRadius: 20,
|
||||
splashRadius: 24,
|
||||
),
|
||||
|
||||
// Left - Check - Right
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
IconButton(
|
||||
icon: const Icon(Icons.arrow_left, size: 32, color: Colors.white),
|
||||
icon: const Icon(Icons.keyboard_arrow_left, size: 36, color: Colors.white),
|
||||
onPressed: () => _moveBullet(const Offset(-3, 0)),
|
||||
splashRadius: 20,
|
||||
splashRadius: 24,
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.check, size: 28, color: Colors.greenAccent),
|
||||
onPressed: () => setState(() => _selectedBulletIndexInEdit = null),
|
||||
splashRadius: 20,
|
||||
const SizedBox(width: 8),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Colors.greenAccent.withOpacity(0.2),
|
||||
border: Border.all(color: Colors.greenAccent, width: 2),
|
||||
),
|
||||
child: IconButton(
|
||||
icon: const Icon(Icons.check, color: Colors.greenAccent, size: 28),
|
||||
onPressed: () => setState(() => _selectedBulletIndexInEdit = null),
|
||||
splashRadius: 22,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
const SizedBox(width: 8),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.arrow_right, size: 32, color: Colors.white),
|
||||
icon: const Icon(Icons.keyboard_arrow_right, size: 36, color: Colors.white),
|
||||
onPressed: () => _moveBullet(const Offset(3, 0)),
|
||||
splashRadius: 20,
|
||||
splashRadius: 24,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
// Down
|
||||
IconButton(
|
||||
icon: const Icon(Icons.arrow_drop_down, size: 32, color: Colors.white),
|
||||
icon: const Icon(Icons.keyboard_arrow_down, size: 36, color: Colors.white),
|
||||
onPressed: () => _moveBullet(const Offset(0, 3)),
|
||||
splashRadius: 20,
|
||||
splashRadius: 24,
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -490,6 +502,7 @@ void _manualScoreEntry() {
|
||||
}
|
||||
|
||||
|
||||
|
||||
void _moveBullet(Offset offsetDelta) {
|
||||
setState(() {
|
||||
final index = _selectedBulletIndexInEdit!;
|
||||
@@ -864,7 +877,7 @@ Widget build(BuildContext context) {
|
||||
style: const TextStyle(color: Colors.white, fontSize: 16),
|
||||
),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: _activeColor,
|
||||
backgroundColor: Colors.red,
|
||||
padding: const EdgeInsets.symmetric(vertical: 14),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
@@ -1009,10 +1022,12 @@ Widget build(BuildContext context) {
|
||||
// Score buttons
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
|
||||
child: Row(
|
||||
children: List.generate(
|
||||
_mappedBullets.length,
|
||||
(index) {
|
||||
child: AbsorbPointer(
|
||||
absorbing: _isEditMode && _selectedBulletIndexInEdit != null,
|
||||
child: Row(
|
||||
children: List.generate(
|
||||
_mappedBullets.length,
|
||||
(index) {
|
||||
final bullet = _mappedBullets[index];
|
||||
final isManual = index >= (_mappedBullets.length - _manualBulletScores.length);
|
||||
final score = isManual
|
||||
@@ -1110,9 +1125,9 @@ Widget build(BuildContext context) {
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user