This commit is contained in:
Daniel Ponte 2024-10-19 23:26:55 -04:00
parent cfd2916da7
commit 6edbf3ac39
8 changed files with 281 additions and 107 deletions

View file

@ -8,7 +8,8 @@ plugins {
android { android {
namespace = "me.dynatron.calls" namespace = "me.dynatron.calls"
compileSdk = flutter.compileSdkVersion compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion // ndkVersion = flutter.ndkVersion
ndkVersion = "25.1.8937393"
compileOptions { compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8 sourceCompatibility = JavaVersion.VERSION_1_8

View file

@ -18,7 +18,7 @@ pluginManagement {
plugins { plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0" id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false id "com.android.application" version "8.3.2" apply false
id "org.jetbrains.kotlin.android" version "1.7.10" apply false id "org.jetbrains.kotlin.android" version "1.7.10" apply false
} }

View file

@ -131,10 +131,11 @@ class Stillbox extends ChangeNotifier {
case Message_ToClientMessage.notification: case Message_ToClientMessage.notification:
case Message_ToClientMessage.popup: case Message_ToClientMessage.popup:
case Message_ToClientMessage.error: case Message_ToClientMessage.error:
case Message_ToClientMessage.tgInfo:
tgCache.handleTgInfo(msg.tgInfo);
case Message_ToClientMessage.hello: case Message_ToClientMessage.hello:
version = msg.hello.version; version = msg.hello.version;
case Message_ToClientMessage.response:
final response = msg.response;
tgCache.handleTgInfo(response.tgInfo);
default: default:
} }
} }

View file

@ -21,8 +21,8 @@ import 'stillbox.pbenum.dart';
export 'stillbox.pbenum.dart'; export 'stillbox.pbenum.dart';
enum Message_ToClientMessage { enum Message_ToClientMessage {
response,
call, call,
tgInfo,
notification, notification,
popup, popup,
error, error,
@ -32,20 +32,20 @@ enum Message_ToClientMessage {
class Message extends $pb.GeneratedMessage { class Message extends $pb.GeneratedMessage {
factory Message({ factory Message({
CommandResponse? response,
Call? call, Call? call,
TalkgroupInfo? tgInfo,
Notification? notification, Notification? notification,
UserPopup? popup, UserPopup? popup,
Error? error, Error? error,
Hello? hello, Hello? hello,
}) { }) {
final $result = create(); final $result = create();
if (response != null) {
$result.response = response;
}
if (call != null) { if (call != null) {
$result.call = call; $result.call = call;
} }
if (tgInfo != null) {
$result.tgInfo = tgInfo;
}
if (notification != null) { if (notification != null) {
$result.notification = notification; $result.notification = notification;
} }
@ -65,8 +65,8 @@ class Message extends $pb.GeneratedMessage {
factory Message.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); factory Message.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
static const $core.Map<$core.int, Message_ToClientMessage> _Message_ToClientMessageByTag = { static const $core.Map<$core.int, Message_ToClientMessage> _Message_ToClientMessageByTag = {
1 : Message_ToClientMessage.call, 1 : Message_ToClientMessage.response,
2 : Message_ToClientMessage.tgInfo, 2 : Message_ToClientMessage.call,
3 : Message_ToClientMessage.notification, 3 : Message_ToClientMessage.notification,
4 : Message_ToClientMessage.popup, 4 : Message_ToClientMessage.popup,
5 : Message_ToClientMessage.error, 5 : Message_ToClientMessage.error,
@ -75,8 +75,8 @@ class Message extends $pb.GeneratedMessage {
}; };
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Message', package: const $pb.PackageName(_omitMessageNames ? '' : 'stillbox'), createEmptyInstance: create) static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Message', package: const $pb.PackageName(_omitMessageNames ? '' : 'stillbox'), createEmptyInstance: create)
..oo(0, [1, 2, 3, 4, 5, 6]) ..oo(0, [1, 2, 3, 4, 5, 6])
..aOM<Call>(1, _omitFieldNames ? '' : 'call', subBuilder: Call.create) ..aOM<CommandResponse>(1, _omitFieldNames ? '' : 'response', subBuilder: CommandResponse.create)
..aOM<TalkgroupInfo>(2, _omitFieldNames ? '' : 'tgInfo', subBuilder: TalkgroupInfo.create) ..aOM<Call>(2, _omitFieldNames ? '' : 'call', subBuilder: Call.create)
..aOM<Notification>(3, _omitFieldNames ? '' : 'notification', subBuilder: Notification.create) ..aOM<Notification>(3, _omitFieldNames ? '' : 'notification', subBuilder: Notification.create)
..aOM<UserPopup>(4, _omitFieldNames ? '' : 'popup', subBuilder: UserPopup.create) ..aOM<UserPopup>(4, _omitFieldNames ? '' : 'popup', subBuilder: UserPopup.create)
..aOM<Error>(5, _omitFieldNames ? '' : 'error', subBuilder: Error.create) ..aOM<Error>(5, _omitFieldNames ? '' : 'error', subBuilder: Error.create)
@ -109,26 +109,26 @@ class Message extends $pb.GeneratedMessage {
void clearToClientMessage() => clearField($_whichOneof(0)); void clearToClientMessage() => clearField($_whichOneof(0));
@$pb.TagNumber(1) @$pb.TagNumber(1)
Call get call => $_getN(0); CommandResponse get response => $_getN(0);
@$pb.TagNumber(1) @$pb.TagNumber(1)
set call(Call v) { setField(1, v); } set response(CommandResponse v) { setField(1, v); }
@$pb.TagNumber(1) @$pb.TagNumber(1)
$core.bool hasCall() => $_has(0); $core.bool hasResponse() => $_has(0);
@$pb.TagNumber(1) @$pb.TagNumber(1)
void clearCall() => clearField(1); void clearResponse() => clearField(1);
@$pb.TagNumber(1) @$pb.TagNumber(1)
Call ensureCall() => $_ensure(0); CommandResponse ensureResponse() => $_ensure(0);
@$pb.TagNumber(2) @$pb.TagNumber(2)
TalkgroupInfo get tgInfo => $_getN(1); Call get call => $_getN(1);
@$pb.TagNumber(2) @$pb.TagNumber(2)
set tgInfo(TalkgroupInfo v) { setField(2, v); } set call(Call v) { setField(2, v); }
@$pb.TagNumber(2) @$pb.TagNumber(2)
$core.bool hasTgInfo() => $_has(1); $core.bool hasCall() => $_has(1);
@$pb.TagNumber(2) @$pb.TagNumber(2)
void clearTgInfo() => clearField(2); void clearCall() => clearField(2);
@$pb.TagNumber(2) @$pb.TagNumber(2)
TalkgroupInfo ensureTgInfo() => $_ensure(1); Call ensureCall() => $_ensure(1);
@$pb.TagNumber(3) @$pb.TagNumber(3)
Notification get notification => $_getN(2); Notification get notification => $_getN(2);
@ -175,6 +175,85 @@ class Message extends $pb.GeneratedMessage {
Hello ensureHello() => $_ensure(5); Hello ensureHello() => $_ensure(5);
} }
enum CommandResponse_CommandResponse {
tgInfo,
notSet
}
class CommandResponse extends $pb.GeneratedMessage {
factory CommandResponse({
$fixnum.Int64? commandId,
TalkgroupInfo? tgInfo,
}) {
final $result = create();
if (commandId != null) {
$result.commandId = commandId;
}
if (tgInfo != null) {
$result.tgInfo = tgInfo;
}
return $result;
}
CommandResponse._() : super();
factory CommandResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory CommandResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
static const $core.Map<$core.int, CommandResponse_CommandResponse> _CommandResponse_CommandResponseByTag = {
2 : CommandResponse_CommandResponse.tgInfo,
0 : CommandResponse_CommandResponse.notSet
};
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CommandResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'stillbox'), createEmptyInstance: create)
..oo(0, [2])
..aInt64(1, _omitFieldNames ? '' : 'commandId')
..aOM<TalkgroupInfo>(2, _omitFieldNames ? '' : 'tgInfo', subBuilder: TalkgroupInfo.create)
..hasRequiredFields = false
;
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
CommandResponse clone() => CommandResponse()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
CommandResponse copyWith(void Function(CommandResponse) updates) => super.copyWith((message) => updates(message as CommandResponse)) as CommandResponse;
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static CommandResponse create() => CommandResponse._();
CommandResponse createEmptyInstance() => create();
static $pb.PbList<CommandResponse> createRepeated() => $pb.PbList<CommandResponse>();
@$core.pragma('dart2js:noInline')
static CommandResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<CommandResponse>(create);
static CommandResponse? _defaultInstance;
CommandResponse_CommandResponse whichCommandResponse() => _CommandResponse_CommandResponseByTag[$_whichOneof(0)]!;
void clearCommandResponse() => clearField($_whichOneof(0));
@$pb.TagNumber(1)
$fixnum.Int64 get commandId => $_getI64(0);
@$pb.TagNumber(1)
set commandId($fixnum.Int64 v) { $_setInt64(0, v); }
@$pb.TagNumber(1)
$core.bool hasCommandId() => $_has(0);
@$pb.TagNumber(1)
void clearCommandId() => clearField(1);
@$pb.TagNumber(2)
TalkgroupInfo get tgInfo => $_getN(1);
@$pb.TagNumber(2)
set tgInfo(TalkgroupInfo v) { setField(2, v); }
@$pb.TagNumber(2)
$core.bool hasTgInfo() => $_has(1);
@$pb.TagNumber(2)
void clearTgInfo() => clearField(2);
@$pb.TagNumber(2)
TalkgroupInfo ensureTgInfo() => $_ensure(1);
}
class Call extends $pb.GeneratedMessage { class Call extends $pb.GeneratedMessage {
factory Call({ factory Call({
$core.String? audioName, $core.String? audioName,
@ -620,11 +699,15 @@ enum Command_Command {
class Command extends $pb.GeneratedMessage { class Command extends $pb.GeneratedMessage {
factory Command({ factory Command({
$fixnum.Int64? commandId,
Live? liveCommand, Live? liveCommand,
Search? searchCommand, Search? searchCommand,
Talkgroup? tgCommand, Talkgroup? tgCommand,
}) { }) {
final $result = create(); final $result = create();
if (commandId != null) {
$result.commandId = commandId;
}
if (liveCommand != null) { if (liveCommand != null) {
$result.liveCommand = liveCommand; $result.liveCommand = liveCommand;
} }
@ -641,16 +724,17 @@ class Command extends $pb.GeneratedMessage {
factory Command.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); factory Command.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
static const $core.Map<$core.int, Command_Command> _Command_CommandByTag = { static const $core.Map<$core.int, Command_Command> _Command_CommandByTag = {
1 : Command_Command.liveCommand, 2 : Command_Command.liveCommand,
2 : Command_Command.searchCommand, 3 : Command_Command.searchCommand,
3 : Command_Command.tgCommand, 4 : Command_Command.tgCommand,
0 : Command_Command.notSet 0 : Command_Command.notSet
}; };
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Command', package: const $pb.PackageName(_omitMessageNames ? '' : 'stillbox'), createEmptyInstance: create) static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Command', package: const $pb.PackageName(_omitMessageNames ? '' : 'stillbox'), createEmptyInstance: create)
..oo(0, [1, 2, 3]) ..oo(0, [2, 3, 4])
..aOM<Live>(1, _omitFieldNames ? '' : 'liveCommand', subBuilder: Live.create) ..aInt64(1, _omitFieldNames ? '' : 'commandId')
..aOM<Search>(2, _omitFieldNames ? '' : 'searchCommand', subBuilder: Search.create) ..aOM<Live>(2, _omitFieldNames ? '' : 'liveCommand', subBuilder: Live.create)
..aOM<Talkgroup>(3, _omitFieldNames ? '' : 'tgCommand', subBuilder: Talkgroup.create) ..aOM<Search>(3, _omitFieldNames ? '' : 'searchCommand', subBuilder: Search.create)
..aOM<Talkgroup>(4, _omitFieldNames ? '' : 'tgCommand', subBuilder: Talkgroup.create)
..hasRequiredFields = false ..hasRequiredFields = false
; ;
@ -679,37 +763,46 @@ class Command extends $pb.GeneratedMessage {
void clearCommand() => clearField($_whichOneof(0)); void clearCommand() => clearField($_whichOneof(0));
@$pb.TagNumber(1) @$pb.TagNumber(1)
Live get liveCommand => $_getN(0); $fixnum.Int64 get commandId => $_getI64(0);
@$pb.TagNumber(1) @$pb.TagNumber(1)
set liveCommand(Live v) { setField(1, v); } set commandId($fixnum.Int64 v) { $_setInt64(0, v); }
@$pb.TagNumber(1) @$pb.TagNumber(1)
$core.bool hasLiveCommand() => $_has(0); $core.bool hasCommandId() => $_has(0);
@$pb.TagNumber(1) @$pb.TagNumber(1)
void clearLiveCommand() => clearField(1); void clearCommandId() => clearField(1);
@$pb.TagNumber(1)
Live ensureLiveCommand() => $_ensure(0);
@$pb.TagNumber(2) @$pb.TagNumber(2)
Search get searchCommand => $_getN(1); Live get liveCommand => $_getN(1);
@$pb.TagNumber(2) @$pb.TagNumber(2)
set searchCommand(Search v) { setField(2, v); } set liveCommand(Live v) { setField(2, v); }
@$pb.TagNumber(2) @$pb.TagNumber(2)
$core.bool hasSearchCommand() => $_has(1); $core.bool hasLiveCommand() => $_has(1);
@$pb.TagNumber(2) @$pb.TagNumber(2)
void clearSearchCommand() => clearField(2); void clearLiveCommand() => clearField(2);
@$pb.TagNumber(2) @$pb.TagNumber(2)
Search ensureSearchCommand() => $_ensure(1); Live ensureLiveCommand() => $_ensure(1);
@$pb.TagNumber(3) @$pb.TagNumber(3)
Talkgroup get tgCommand => $_getN(2); Search get searchCommand => $_getN(2);
@$pb.TagNumber(3) @$pb.TagNumber(3)
set tgCommand(Talkgroup v) { setField(3, v); } set searchCommand(Search v) { setField(3, v); }
@$pb.TagNumber(3) @$pb.TagNumber(3)
$core.bool hasTgCommand() => $_has(2); $core.bool hasSearchCommand() => $_has(2);
@$pb.TagNumber(3) @$pb.TagNumber(3)
void clearTgCommand() => clearField(3); void clearSearchCommand() => clearField(3);
@$pb.TagNumber(3) @$pb.TagNumber(3)
Talkgroup ensureTgCommand() => $_ensure(2); Search ensureSearchCommand() => $_ensure(2);
@$pb.TagNumber(4)
Talkgroup get tgCommand => $_getN(3);
@$pb.TagNumber(4)
set tgCommand(Talkgroup v) { setField(4, v); }
@$pb.TagNumber(4)
$core.bool hasTgCommand() => $_has(3);
@$pb.TagNumber(4)
void clearTgCommand() => clearField(4);
@$pb.TagNumber(4)
Talkgroup ensureTgCommand() => $_ensure(3);
} }
class TalkgroupInfo extends $pb.GeneratedMessage { class TalkgroupInfo extends $pb.GeneratedMessage {

View file

@ -32,8 +32,8 @@ final $typed_data.Uint8List liveStateDescriptor = $convert.base64Decode(
const Message$json = { const Message$json = {
'1': 'Message', '1': 'Message',
'2': [ '2': [
{'1': 'call', '3': 1, '4': 1, '5': 11, '6': '.stillbox.Call', '9': 0, '10': 'call'}, {'1': 'response', '3': 1, '4': 1, '5': 11, '6': '.stillbox.CommandResponse', '9': 0, '10': 'response'},
{'1': 'tg_info', '3': 2, '4': 1, '5': 11, '6': '.stillbox.TalkgroupInfo', '9': 0, '10': 'tgInfo'}, {'1': 'call', '3': 2, '4': 1, '5': 11, '6': '.stillbox.Call', '9': 0, '10': 'call'},
{'1': 'notification', '3': 3, '4': 1, '5': 11, '6': '.stillbox.Notification', '9': 0, '10': 'notification'}, {'1': 'notification', '3': 3, '4': 1, '5': 11, '6': '.stillbox.Notification', '9': 0, '10': 'notification'},
{'1': 'popup', '3': 4, '4': 1, '5': 11, '6': '.stillbox.UserPopup', '9': 0, '10': 'popup'}, {'1': 'popup', '3': 4, '4': 1, '5': 11, '6': '.stillbox.UserPopup', '9': 0, '10': 'popup'},
{'1': 'error', '3': 5, '4': 1, '5': 11, '6': '.stillbox.Error', '9': 0, '10': 'error'}, {'1': 'error', '3': 5, '4': 1, '5': 11, '6': '.stillbox.Error', '9': 0, '10': 'error'},
@ -46,12 +46,31 @@ const Message$json = {
/// Descriptor for `Message`. Decode as a `google.protobuf.DescriptorProto`. /// Descriptor for `Message`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List messageDescriptor = $convert.base64Decode( final $typed_data.Uint8List messageDescriptor = $convert.base64Decode(
'CgdNZXNzYWdlEiQKBGNhbGwYASABKAsyDi5zdGlsbGJveC5DYWxsSABSBGNhbGwSMgoHdGdfaW' 'CgdNZXNzYWdlEjcKCHJlc3BvbnNlGAEgASgLMhkuc3RpbGxib3guQ29tbWFuZFJlc3BvbnNlSA'
'5mbxgCIAEoCzIXLnN0aWxsYm94LlRhbGtncm91cEluZm9IAFIGdGdJbmZvEjwKDG5vdGlmaWNh' 'BSCHJlc3BvbnNlEiQKBGNhbGwYAiABKAsyDi5zdGlsbGJveC5DYWxsSABSBGNhbGwSPAoMbm90'
'dGlvbhgDIAEoCzIWLnN0aWxsYm94Lk5vdGlmaWNhdGlvbkgAUgxub3RpZmljYXRpb24SKwoFcG' 'aWZpY2F0aW9uGAMgASgLMhYuc3RpbGxib3guTm90aWZpY2F0aW9uSABSDG5vdGlmaWNhdGlvbh'
'9wdXAYBCABKAsyEy5zdGlsbGJveC5Vc2VyUG9wdXBIAFIFcG9wdXASJwoFZXJyb3IYBSABKAsy' 'IrCgVwb3B1cBgEIAEoCzITLnN0aWxsYm94LlVzZXJQb3B1cEgAUgVwb3B1cBInCgVlcnJvchgF'
'Dy5zdGlsbGJveC5FcnJvckgAUgVlcnJvchInCgVoZWxsbxgGIAEoCzIPLnN0aWxsYm94LkhlbG' 'IAEoCzIPLnN0aWxsYm94LkVycm9ySABSBWVycm9yEicKBWhlbGxvGAYgASgLMg8uc3RpbGxib3'
'xvSABSBWhlbGxvQhIKEHRvQ2xpZW50X21lc3NhZ2U='); 'guSGVsbG9IAFIFaGVsbG9CEgoQdG9DbGllbnRfbWVzc2FnZQ==');
@$core.Deprecated('Use commandResponseDescriptor instead')
const CommandResponse$json = {
'1': 'CommandResponse',
'2': [
{'1': 'command_id', '3': 1, '4': 1, '5': 3, '9': 1, '10': 'commandId', '17': true},
{'1': 'tg_info', '3': 2, '4': 1, '5': 11, '6': '.stillbox.TalkgroupInfo', '9': 0, '10': 'tgInfo'},
],
'8': [
{'1': 'command_response'},
{'1': '_command_id'},
],
};
/// Descriptor for `CommandResponse`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List commandResponseDescriptor = $convert.base64Decode(
'Cg9Db21tYW5kUmVzcG9uc2USIgoKY29tbWFuZF9pZBgBIAEoA0gBUgljb21tYW5kSWSIAQESMg'
'oHdGdfaW5mbxgCIAEoCzIXLnN0aWxsYm94LlRhbGtncm91cEluZm9IAFIGdGdJbmZvQhIKEGNv'
'bW1hbmRfcmVzcG9uc2VCDQoLX2NvbW1hbmRfaWQ=');
@$core.Deprecated('Use callDescriptor instead') @$core.Deprecated('Use callDescriptor instead')
const Call$json = { const Call$json = {
@ -143,21 +162,24 @@ final $typed_data.Uint8List notificationDescriptor = $convert.base64Decode(
const Command$json = { const Command$json = {
'1': 'Command', '1': 'Command',
'2': [ '2': [
{'1': 'live_command', '3': 1, '4': 1, '5': 11, '6': '.stillbox.Live', '9': 0, '10': 'liveCommand'}, {'1': 'command_id', '3': 1, '4': 1, '5': 3, '9': 1, '10': 'commandId', '17': true},
{'1': 'search_command', '3': 2, '4': 1, '5': 11, '6': '.stillbox.Search', '9': 0, '10': 'searchCommand'}, {'1': 'live_command', '3': 2, '4': 1, '5': 11, '6': '.stillbox.Live', '9': 0, '10': 'liveCommand'},
{'1': 'tg_command', '3': 3, '4': 1, '5': 11, '6': '.stillbox.Talkgroup', '9': 0, '10': 'tgCommand'}, {'1': 'search_command', '3': 3, '4': 1, '5': 11, '6': '.stillbox.Search', '9': 0, '10': 'searchCommand'},
{'1': 'tg_command', '3': 4, '4': 1, '5': 11, '6': '.stillbox.Talkgroup', '9': 0, '10': 'tgCommand'},
], ],
'8': [ '8': [
{'1': 'command'}, {'1': 'command'},
{'1': '_command_id'},
], ],
}; };
/// Descriptor for `Command`. Decode as a `google.protobuf.DescriptorProto`. /// Descriptor for `Command`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List commandDescriptor = $convert.base64Decode( final $typed_data.Uint8List commandDescriptor = $convert.base64Decode(
'CgdDb21tYW5kEjMKDGxpdmVfY29tbWFuZBgBIAEoCzIOLnN0aWxsYm94LkxpdmVIAFILbGl2ZU' 'CgdDb21tYW5kEiIKCmNvbW1hbmRfaWQYASABKANIAVIJY29tbWFuZElkiAEBEjMKDGxpdmVfY2'
'NvbW1hbmQSOQoOc2VhcmNoX2NvbW1hbmQYAiABKAsyEC5zdGlsbGJveC5TZWFyY2hIAFINc2Vh' '9tbWFuZBgCIAEoCzIOLnN0aWxsYm94LkxpdmVIAFILbGl2ZUNvbW1hbmQSOQoOc2VhcmNoX2Nv'
'cmNoQ29tbWFuZBI0Cgp0Z19jb21tYW5kGAMgASgLMhMuc3RpbGxib3guVGFsa2dyb3VwSABSCX' 'bW1hbmQYAyABKAsyEC5zdGlsbGJveC5TZWFyY2hIAFINc2VhcmNoQ29tbWFuZBI0Cgp0Z19jb2'
'RnQ29tbWFuZEIJCgdjb21tYW5k'); '1tYW5kGAQgASgLMhMuc3RpbGxib3guVGFsa2dyb3VwSABSCXRnQ29tbWFuZEIJCgdjb21tYW5k'
'Qg0KC19jb21tYW5kX2lk');
@$core.Deprecated('Use talkgroupInfoDescriptor instead') @$core.Deprecated('Use talkgroupInfoDescriptor instead')
const TalkgroupInfo$json = { const TalkgroupInfo$json = {

View file

@ -6,6 +6,20 @@ class Keypad extends StatefulWidget {
@override @override
State<Keypad> createState() => _KeypadState(); State<Keypad> createState() => _KeypadState();
} }
/*
class KeypadKey extends ElevatedButton {
@override
ButtonStyle? themeStyleOf(BuildContext context) {
return ElevatedButtonTheme(
data: ElevatedButtonThemeData(
style: ButtonStyle(
shape: BoxBorder()
)
),
);
}
}
*/
class _KeypadState extends State<Keypad> { class _KeypadState extends State<Keypad> {
@override @override

View file

@ -1,5 +1,6 @@
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../controller/stillbox.dart'; import '../controller/stillbox.dart';
import '../pb/stillbox.pb.dart'; import '../pb/stillbox.pb.dart';
@ -18,9 +19,11 @@ class LCD extends StatelessWidget {
color: _lcdColor, color: _lcdColor,
border: const Border( border: const Border(
top: BorderSide(width: 3.0, color: Color.fromARGB(255, 94, 94, 94)), top: BorderSide(width: 3.0, color: Color.fromARGB(255, 94, 94, 94)),
left: BorderSide(width: 3.0, color: Color.fromARGB(255, 63, 63, 63)), left:
BorderSide(width: 3.0, color: Color.fromARGB(255, 63, 63, 63)),
bottom: BorderSide(width: 3.0, color: Colors.white), bottom: BorderSide(width: 3.0, color: Colors.white),
right: BorderSide(width: 3.0, color: Color.fromARGB(255, 229, 229, 229)), right: BorderSide(
width: 3.0, color: Color.fromARGB(255, 229, 229, 229)),
), ),
), ),
margin: const EdgeInsets.all(16.0), margin: const EdgeInsets.all(16.0),
@ -61,35 +64,40 @@ class LCD extends StatelessWidget {
'${tgi.data?.systemName ?? (_call?.call.system ?? '')}'), '${tgi.data?.systemName ?? (_call?.call.system ?? '')}'),
Text('Q: $queueLen'), Text('Q: $queueLen'),
]), ]),
Row( Row(children: [
children: [Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [ children: [
ConstrainedBox( Row(
constraints: BoxConstraints(maxWidth: MediaQuery.sizeOf(context).width / 1.6), children: [
child: Text( ConstrainedBox(
'${tgi.data?.name ?? (_call?.call.talkgroup ?? '')}${tgi.data?.learned ?? false ? ' 📓' : ''}', constraints: BoxConstraints(
style: const TextStyle( maxWidth:
fontSize: 20.0, MediaQuery.sizeOf(context).width / 1.6),
overflow: TextOverflow.ellipsis, child: Text(
)), '${tgi.data?.name ?? (_call?.call.talkgroup ?? '')}${tgi.data?.learned ?? false ? ' 📓' : ''}',
), style: const TextStyle(
Text(_call != null ? '${_call.call.talkgroup}' : '', fontSize: 20.0,
textAlign: TextAlign.end, overflow: TextOverflow.ellipsis,
style: const TextStyle( )),
fontSize: 10,
overflow: TextOverflow.ellipsis,
)),
],
), ),
Text(tgi.data != null ? tgi.data!.group : ''), Text(_call != null ? '${_call.call.talkgroup}' : '',
])]), textAlign: TextAlign.end,
style: const TextStyle(
fontSize: 10,
overflow: TextOverflow.ellipsis,
)),
],
),
Text(tgi.data != null ? tgi.data!.group : ''),
])
]),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
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}' : ''),
]), ]),
]); ]);
@ -109,16 +117,19 @@ class LED extends StatelessWidget {
height: 20.0, height: 20.0,
margin: const EdgeInsets.only(top: 4.0, right: 10.0), margin: const EdgeInsets.only(top: 4.0, right: 10.0),
decoration: BoxDecoration( decoration: BoxDecoration(
color: _ledColor, color: _ledColor,
shape: BoxShape.circle, shape: BoxShape.circle,
border: const Border( border: const Border(
top: BorderSide(width: 1.0, color: Colors.white), top: BorderSide(width: 1.0, color: Colors.white),
left: BorderSide(width: 1.0, color: Colors.white), left: BorderSide(width: 1.0, color: Colors.white),
), ),
boxShadow: [ boxShadow: [
BoxShadow(color: const Color.fromARGB(255, 151, 151, 151), offset: Offset.fromDirection(1, 3.0), blurRadius: 4.0, spreadRadius: 2.0) BoxShadow(
] color: const Color.fromARGB(255, 151, 151, 151),
), offset: Offset.fromDirection(1, 3.0),
blurRadius: 4.0,
spreadRadius: 2.0)
]),
); );
} }
} }
@ -133,13 +144,37 @@ class ScannerLabel extends StatelessWidget {
return Container( return Container(
margin: const EdgeInsets.only(top: 10), margin: const EdgeInsets.only(top: 10),
alignment: Alignment.topLeft, alignment: Alignment.topLeft,
child: Text(_label, child: GestureDetector(
textAlign: TextAlign.left, onTap: () {
style: const TextStyle( final version = Provider.of<Stillbox>(context, listen: false).version;
fontSize: 22.0, showDialog(
fontWeight: FontWeight.bold, context: context,
fontFamily: "Warnes", builder: (BuildContext context) {
)), return Dialog(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20.0),
),
elevation: 5.0,
backgroundColor: Colors.grey,
child: Container(
padding: EdgeInsets.all(20.0),
child: Text(
'Server info:\n${version.serverName} ${version.version}\nbuilt ${version.built}\nrunning on ${version.platform}',
style: TextStyle(color: Colors.black),
),
),
);
},
);
},
child: Text(_label,
textAlign: TextAlign.left,
style: const TextStyle(
fontSize: 22.0,
fontWeight: FontWeight.bold,
fontFamily: "Warnes",
)),
),
); );
} }
} }

View file

@ -7,8 +7,8 @@ import "google/protobuf/struct.proto";
message Message { message Message {
oneof toClient_message { oneof toClient_message {
Call call = 1; CommandResponse response = 1;
TalkgroupInfo tg_info = 2; Call call = 2;
Notification notification = 3; Notification notification = 3;
UserPopup popup = 4; UserPopup popup = 4;
Error error = 5; Error error = 5;
@ -16,6 +16,13 @@ message Message {
} }
} }
message CommandResponse {
optional int64 command_id = 1;
oneof command_response {
TalkgroupInfo tg_info = 2;
}
}
message Call { message Call {
string audioName = 1; string audioName = 1;
string audioType = 2; string audioType = 2;
@ -51,10 +58,11 @@ message Notification {
} }
message Command { message Command {
optional int64 command_id = 1;
oneof command { oneof command {
Live live_command = 1; Live live_command = 2;
Search search_command = 2; Search search_command = 3;
Talkgroup tg_command = 3; Talkgroup tg_command = 4;
} }
} }