mirror of
https://github.com/amigan/calls.git
synced 2025-01-31 05:22:37 -05:00
Show alpha tag
This commit is contained in:
parent
844ebc1a38
commit
c554de03b1
1 changed files with 6 additions and 2 deletions
|
@ -52,6 +52,10 @@ class LCD extends StatelessWidget {
|
||||||
return FutureBuilder(
|
return FutureBuilder(
|
||||||
future: _call?.tg,
|
future: _call?.tg,
|
||||||
builder: (BuildContext context, AsyncSnapshot<TalkgroupInfo> tgi) {
|
builder: (BuildContext context, AsyncSnapshot<TalkgroupInfo> tgi) {
|
||||||
|
String mainLine = '';
|
||||||
|
String secondLine = '';
|
||||||
|
mainLine = '${tgi.data?.alphaTag ?? tgi.data?.name ?? (_call?.call.talkgroup ?? '')}${tgi.data?.learned ?? false ? ' 📓' : ''}';
|
||||||
|
secondLine = '${tgi.data?.group ?? ''} ${tgi.data?.alphaTag != null ? (tgi.data?.name ?? '') : ''}';
|
||||||
return Column(
|
return Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
|
@ -75,7 +79,7 @@ class LCD extends StatelessWidget {
|
||||||
maxWidth:
|
maxWidth:
|
||||||
MediaQuery.sizeOf(context).width / 1.6),
|
MediaQuery.sizeOf(context).width / 1.6),
|
||||||
child: Text(
|
child: Text(
|
||||||
'${tgi.data?.name ?? (_call?.call.talkgroup ?? '')}${tgi.data?.learned ?? false ? ' 📓' : ''}',
|
mainLine,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 20.0,
|
fontSize: 20.0,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
|
@ -89,7 +93,7 @@ class LCD extends StatelessWidget {
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Text(tgi.data != null ? tgi.data!.group : ''),
|
Text(secondLine),
|
||||||
])
|
])
|
||||||
]),
|
]),
|
||||||
Row(
|
Row(
|
||||||
|
|
Loading…
Reference in a new issue