UI collapsable height profile, english settings menue
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
/// Ein-/Ausgeklappt-Zustand des Mini-Hoehenprofils in der Fusszeile,
|
||||
/// geteilt zwischen Plan- und Fly-Modus (MissionFooterBar). Rein
|
||||
/// UI-lokaler Zustand fuer die aktuelle Session, Standard: eingeklappt,
|
||||
/// damit die Karte moeglichst viel visuellen Raum bekommt.
|
||||
class AltitudeProfileExpandedNotifier extends Notifier<bool> {
|
||||
@override
|
||||
bool build() => false;
|
||||
|
||||
void toggle() => state = !state;
|
||||
}
|
||||
|
||||
final altitudeProfileExpandedProvider =
|
||||
NotifierProvider<AltitudeProfileExpandedNotifier, bool>(
|
||||
AltitudeProfileExpandedNotifier.new);
|
||||
@@ -86,12 +86,12 @@ class ConnectionLogNotifier extends Notifier<List<ConnectionLogEntry>> {
|
||||
void _onStateChanged(LinkState linkState) {
|
||||
final transport = ref.read(bluetoothTransportProvider);
|
||||
final message = switch (linkState) {
|
||||
LinkState.disconnected => 'Getrennt',
|
||||
LinkState.connecting => 'Verbinde ...',
|
||||
LinkState.disconnected => 'Disconnected',
|
||||
LinkState.connecting => 'Connecting...',
|
||||
LinkState.connected =>
|
||||
'Verbunden${transport.connectedDevice != null ? ' (${transport.connectedDevice!.displayName})' : ''}',
|
||||
'Connected${transport.connectedDevice != null ? ' (${transport.connectedDevice!.displayName})' : ''}',
|
||||
LinkState.error =>
|
||||
'Fehler: ${transport.lastErrorMessage ?? transport.lastErrorReason?.name ?? 'unbekannt'}',
|
||||
'Error: ${transport.lastErrorMessage ?? transport.lastErrorReason?.name ?? 'unknown'}',
|
||||
};
|
||||
_append(message);
|
||||
}
|
||||
|
||||
@@ -70,11 +70,11 @@ class WifiConnectionLogNotifier
|
||||
void _onStateChanged(LinkState linkState) {
|
||||
final transport = ref.read(wifiTransportProvider);
|
||||
final message = switch (linkState) {
|
||||
LinkState.disconnected => 'Getrennt',
|
||||
LinkState.connecting => 'Verbinde ...',
|
||||
LinkState.connected => 'Lausche auf Port ${transport.boundPort}',
|
||||
LinkState.error => 'Fehler: '
|
||||
'${transport.lastErrorMessage ?? transport.lastErrorReason?.name ?? 'unbekannt'}',
|
||||
LinkState.disconnected => 'Disconnected',
|
||||
LinkState.connecting => 'Connecting...',
|
||||
LinkState.connected => 'Listening on port ${transport.boundPort}',
|
||||
LinkState.error => 'Error: '
|
||||
'${transport.lastErrorMessage ?? transport.lastErrorReason?.name ?? 'unknown'}',
|
||||
};
|
||||
_append(message);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user