mirror of
https://github.com/amigan/calls.git
synced 2024-11-21 20:39:47 -05:00
LED texture
This commit is contained in:
parent
42a4ccedd9
commit
7768c96453
2 changed files with 21 additions and 18 deletions
|
@ -19,8 +19,7 @@ class LCD extends StatelessWidget {
|
||||||
border: const Border(
|
border: const Border(
|
||||||
top: BorderSide(width: 3.0, color: Colors.black),
|
top: BorderSide(width: 3.0, color: Colors.black),
|
||||||
left: BorderSide(width: 3.0, color: Colors.black),
|
left: BorderSide(width: 3.0, color: Colors.black),
|
||||||
bottom: BorderSide(
|
bottom: BorderSide(width: 3.0, color: Colors.white),
|
||||||
width: 3.0, color: Color.fromARGB(172, 255, 255, 255)),
|
|
||||||
right: BorderSide(width: 3.0, color: Colors.white),
|
right: BorderSide(width: 3.0, color: Colors.white),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -56,33 +55,30 @@ class LCD extends StatelessWidget {
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: <Widget>[
|
children: [
|
||||||
Text(callTime),
|
Text(callTime),
|
||||||
Text(
|
Text(
|
||||||
'${tgi.data?.systemName ?? (_call?.call.system ?? '')}'),
|
'${tgi.data?.systemName ?? (_call?.call.system ?? '')}'),
|
||||||
Text('Q: $queueLen'),
|
Text('Q: $queueLen'),
|
||||||
]),
|
]),
|
||||||
Padding(
|
Row(
|
||||||
padding: EdgeInsets.only(top: 14.0, bottom: 14.0),
|
children: [Flexible(
|
||||||
child: Row(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: <Widget>[
|
children: [
|
||||||
Flexible(
|
Text(
|
||||||
child: Text(
|
|
||||||
'${tgi.data?.name ?? (_call?.call.talkgroup ?? '')}${tgi.data?.learned ?? false ? ' 📓' : ''}',
|
'${tgi.data?.name ?? (_call?.call.talkgroup ?? '')}${tgi.data?.learned ?? false ? ' 📓' : ''}',
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 20.0,
|
fontSize: 20.0,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
))),
|
)),
|
||||||
])),
|
Text(_call != null ? '${_call.call.talkgroup}' : ''),
|
||||||
|
]),
|
||||||
|
)]),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(_call != null ? 'TG: ${_call.call.talkgroup}' : ''),
|
Text(_call != null ? '${(_call.call.frequency.toDouble() / 1024 / 1024).toStringAsFixed(4)} MHz' : ''),
|
||||||
Text(_call != null
|
|
||||||
? '${(_call.call.frequency.toDouble() / 1024 / 1024).toStringAsFixed(4)} MHz'
|
|
||||||
: ''),
|
|
||||||
Text(_call != null ? 'S: ${_call.call.source}' : ''),
|
Text(_call != null ? 'S: ${_call.call.source}' : ''),
|
||||||
]),
|
]),
|
||||||
]);
|
]);
|
||||||
|
@ -104,6 +100,13 @@ class LED extends StatelessWidget {
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: _ledColor,
|
color: _ledColor,
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
|
border: const Border(
|
||||||
|
top: BorderSide(width: 1.0, color: Colors.white),
|
||||||
|
left: BorderSide(width: 1.0, color: Colors.white),
|
||||||
|
),
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(color: const Color.fromARGB(255, 151, 151, 151), offset: Offset.fromDirection(1, 3.0), blurRadius: 4.0, spreadRadius: 2.0)
|
||||||
|
]
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,7 +73,7 @@ class _MainRadioState extends State<MainRadio> {
|
||||||
_lcdTimer = null;
|
_lcdTimer = null;
|
||||||
}
|
}
|
||||||
setState(() {
|
setState(() {
|
||||||
_ledColor = Colors.purple;
|
_ledColor = const Color.fromARGB(255, 226, 62, 255);
|
||||||
_lcdColor = _lcdOnColor;
|
_lcdColor = _lcdOnColor;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue