Show Snackbar on hoseline tap
This commit is contained in:
@@ -201,6 +201,15 @@ class _HoseViewState extends State<HoseView> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _showNotImplementedSnackbar() {
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
const SnackBar(
|
||||||
|
content: Text('Listening to live QSOs has not been implemented yet'),
|
||||||
|
duration: Duration(seconds: 2),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Widget _buildHoseCard(HoseItem item) {
|
Widget _buildHoseCard(HoseItem item) {
|
||||||
final now = DateTime.now();
|
final now = DateTime.now();
|
||||||
final timeSinceActivity = now.difference(item.lastActivity);
|
final timeSinceActivity = now.difference(item.lastActivity);
|
||||||
@@ -214,7 +223,9 @@ class _HoseViewState extends State<HoseView> {
|
|||||||
timeAgo = '${timeSinceActivity.inHours}h ago';
|
timeAgo = '${timeSinceActivity.inHours}h ago';
|
||||||
}
|
}
|
||||||
|
|
||||||
return Card(
|
return GestureDetector(
|
||||||
|
onTap: _showNotImplementedSnackbar,
|
||||||
|
child: Card(
|
||||||
elevation: item.isActive ? 4 : 1,
|
elevation: item.isActive ? 4 : 1,
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
@@ -309,6 +320,7 @@ class _HoseViewState extends State<HoseView> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user