mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-07-09 10:13:26 +10:00
Fix null-returning ternaries with if blocks, per code review comments
This commit is contained in:
+12
-10
@@ -1188,12 +1188,12 @@ class _MapScreenState extends State<MapScreen> {
|
|||||||
width: 48,
|
width: 48,
|
||||||
height: 48,
|
height: 48,
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onLongPress: () => _isBuildingPathTrace
|
onLongPress: () {
|
||||||
? _showNodeInfo(context, guess.contact)
|
if (_isBuildingPathTrace) _showNodeInfo(context, guess.contact);
|
||||||
: null,
|
},
|
||||||
onSecondaryTap: () => _isBuildingPathTrace
|
onSecondaryTap: () {
|
||||||
? _showNodeInfo(context, guess.contact)
|
if (_isBuildingPathTrace) _showNodeInfo(context, guess.contact);
|
||||||
: null,
|
},
|
||||||
onTap: () => _isBuildingPathTrace
|
onTap: () => _isBuildingPathTrace
|
||||||
? _addToPath(context, guess.contact, position: guess.position)
|
? _addToPath(context, guess.contact, position: guess.position)
|
||||||
: _selectNode(guess.contact, guessedPosition: guess.position),
|
: _selectNode(guess.contact, guessedPosition: guess.position),
|
||||||
@@ -1393,10 +1393,12 @@ class _MapScreenState extends State<MapScreen> {
|
|||||||
height: size,
|
height: size,
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
behavior: HitTestBehavior.opaque,
|
behavior: HitTestBehavior.opaque,
|
||||||
onLongPress: () =>
|
onLongPress: () {
|
||||||
_isBuildingPathTrace ? _showNodeInfo(context, contact) : null,
|
if (_isBuildingPathTrace) _showNodeInfo(context, contact);
|
||||||
onSecondaryTap: () =>
|
},
|
||||||
_isBuildingPathTrace ? _showNodeInfo(context, contact) : null,
|
onSecondaryTap: () {
|
||||||
|
if (_isBuildingPathTrace) _showNodeInfo(context, contact);
|
||||||
|
},
|
||||||
onTap: () => _isBuildingPathTrace
|
onTap: () => _isBuildingPathTrace
|
||||||
? _addToPath(context, contact)
|
? _addToPath(context, contact)
|
||||||
: _selectNode(contact),
|
: _selectNode(contact),
|
||||||
|
|||||||
Reference in New Issue
Block a user