feat(legacy): add connection status indicator to device banners
This commit is contained in:
@@ -166,14 +166,32 @@ class LocationBanner extends ConsumerWidget {
|
|||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
if (deviceName != null)
|
if (deviceName != null)
|
||||||
Text(
|
Row(
|
||||||
deviceName,
|
children: [
|
||||||
style: TextStyle(
|
Container(
|
||||||
fontSize: isCompact ? 12 : 14,
|
width: isCompact ? 7 : 9,
|
||||||
fontWeight: FontWeight.w600,
|
height: isCompact ? 7 : 9,
|
||||||
color: Theme.of(context).colorScheme.onSurface,
|
margin: EdgeInsets.only(right: isCompact ? 4 : 6),
|
||||||
),
|
decoration: BoxDecoration(
|
||||||
overflow: TextOverflow.ellipsis,
|
shape: BoxShape.circle,
|
||||||
|
color: device?.isDisconnected == true
|
||||||
|
? Colors.red
|
||||||
|
: Colors.green,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Text(
|
||||||
|
deviceName,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: isCompact ? 12 : 14,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color:
|
||||||
|
Theme.of(context).colorScheme.onSurface,
|
||||||
|
),
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
if (addressText.isNotEmpty)
|
if (addressText.isNotEmpty)
|
||||||
Padding(
|
Padding(
|
||||||
|
|||||||
@@ -195,14 +195,31 @@ class _DeviceCard extends StatelessWidget {
|
|||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Row(
|
||||||
deviceName,
|
children: [
|
||||||
style: TextStyle(
|
Container(
|
||||||
fontSize: 18,
|
width: 10,
|
||||||
fontWeight: FontWeight.w700,
|
height: 10,
|
||||||
color: primaryColor,
|
margin: const EdgeInsets.only(right: 6),
|
||||||
),
|
decoration: BoxDecoration(
|
||||||
overflow: TextOverflow.ellipsis,
|
shape: BoxShape.circle,
|
||||||
|
color: device.isDisconnected
|
||||||
|
? Colors.red
|
||||||
|
: Colors.green,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Text(
|
||||||
|
deviceName,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 18,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
color: primaryColor,
|
||||||
|
),
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
if (address.isNotEmpty)
|
if (address.isNotEmpty)
|
||||||
|
|||||||
Reference in New Issue
Block a user