feat: long press adds 10 points repeatedly
This commit is contained in:
@@ -53,6 +53,16 @@ class _LiveEditListTileState extends State<LiveEditListTile> {
|
||||
}),
|
||||
}
|
||||
: null,
|
||||
onLongPressed: () => _score > minScore
|
||||
? {
|
||||
setState(() {
|
||||
_score -= 10;
|
||||
if (widget.onChanged != null) {
|
||||
widget.onChanged!(_score);
|
||||
}
|
||||
}),
|
||||
}
|
||||
: null,
|
||||
icon: Icons.remove_rounded,
|
||||
),
|
||||
Expanded(
|
||||
@@ -96,6 +106,16 @@ class _LiveEditListTileState extends State<LiveEditListTile> {
|
||||
}),
|
||||
}
|
||||
: null,
|
||||
onLongPressed: () => _score > minScore
|
||||
? {
|
||||
setState(() {
|
||||
_score += 10;
|
||||
if (widget.onChanged != null) {
|
||||
widget.onChanged!(_score);
|
||||
}
|
||||
}),
|
||||
}
|
||||
: null,
|
||||
icon: Icons.add_rounded,
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user