dart format

This commit is contained in:
ericz
2026-08-04 17:27:51 +02:00
parent 2879bf6147
commit b15f6450bd
6 changed files with 18 additions and 24 deletions
+2 -4
View File
@@ -76,8 +76,7 @@ class Cyr2LatProfile {
class AppSettings { class AppSettings {
static const Object _unset = Object(); static const Object _unset = Object();
static const String stadiaDemo = static const String stadiaDemo = '51bd0381-4685-4666-bae8-48940f6d77c0';
'51bd0381-4685-4666-bae8-48940f6d77c0';
final bool clearPathOnMaxRetry; final bool clearPathOnMaxRetry;
final bool mapShowRepeaters; final bool mapShowRepeaters;
@@ -137,8 +136,7 @@ class AppSettings {
return apiKey; return apiKey;
} }
bool get usesstadiaDemo => bool get usesstadiaDemo => effectiveMapTileApiKey == stadiaDemo;
effectiveMapTileApiKey == stadiaDemo;
Map<String, String> get cyr2latCharMap { Map<String, String> get cyr2latCharMap {
final profile = cyr2latProfiles.firstWhere( final profile = cyr2latProfiles.firstWhere(
+1 -3
View File
@@ -1153,9 +1153,7 @@ class AppSettingsScreen extends StatelessWidget {
) { ) {
final currentApiKey = settingsService.settings.mapTileApiKey?.trim() ?? ''; final currentApiKey = settingsService.settings.mapTileApiKey?.trim() ?? '';
final maskedApiKey = _maskApiKey( final maskedApiKey = _maskApiKey(
currentApiKey.isEmpty currentApiKey.isEmpty ? AppSettings.stadiaDemo : currentApiKey,
? AppSettings.stadiaDemo
: currentApiKey,
); );
final controller = TextEditingController(text: maskedApiKey); final controller = TextEditingController(text: maskedApiKey);
showDialog( showDialog(
+3 -9
View File
@@ -1214,25 +1214,19 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
decoration: InputDecoration( decoration: InputDecoration(
hintText: context.l10n.chat_typeMessage, hintText: context.l10n.chat_typeMessage,
border: OutlineInputBorder( border: OutlineInputBorder(
borderRadius: BorderRadius.circular( borderRadius: BorderRadius.circular(MeshRadii.md),
MeshRadii.md,
),
borderSide: BorderSide( borderSide: BorderSide(
color: scheme.outlineVariant, color: scheme.outlineVariant,
), ),
), ),
enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular( borderRadius: BorderRadius.circular(MeshRadii.md),
MeshRadii.md,
),
borderSide: BorderSide( borderSide: BorderSide(
color: scheme.outlineVariant, color: scheme.outlineVariant,
), ),
), ),
focusedBorder: OutlineInputBorder( focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular( borderRadius: BorderRadius.circular(MeshRadii.md),
MeshRadii.md,
),
borderSide: BorderSide( borderSide: BorderSide(
color: scheme.primary, color: scheme.primary,
width: 1.5, width: 1.5,
+2 -1
View File
@@ -412,7 +412,8 @@ class _ChannelsScreenState extends State<ChannelsScreen>
final messages = connector.getChannelMessages(channel); final messages = connector.getChannelMessages(channel);
final lastMessage = messages.isNotEmpty ? messages.last : null; final lastMessage = messages.isNotEmpty ? messages.last : null;
final lastMessageText = lastMessage?.text ?? ''; final lastMessageText = lastMessage?.text ?? '';
final lastPreview = lastMessageText.isNotEmpty && final lastPreview =
lastMessageText.isNotEmpty &&
GifHelper.parseGif(lastMessageText) != null GifHelper.parseGif(lastMessageText) != null
? context.l10n.chat_receivedGif ? context.l10n.chat_receivedGif
: lastMessageText; : lastMessageText;
-1
View File
@@ -643,7 +643,6 @@ void main() {
expect(contacts.first.path, equals(Uint8List.fromList([0x11, 0x22]))); expect(contacts.first.path, equals(Uint8List.fromList([0x11, 0x22])));
}, },
); );
}); });
group('AppSettingsService — gps interval fallback', () { group('AppSettingsService — gps interval fallback', () {
+7 -3
View File
@@ -22,7 +22,8 @@ class _FakeStorageService extends StorageService {
ContactPathHistory history, ContactPathHistory history,
) async {} ) async {}
@override @override
Future<ContactPathHistory?> loadPathHistory(String contactPubKeyHex) async => null; Future<ContactPathHistory?> loadPathHistory(String contactPubKeyHex) async =>
null;
@override @override
Future<void> clearPathHistory(String contactPubKeyHex) async {} Future<void> clearPathHistory(String contactPubKeyHex) async {}
} }
@@ -76,9 +77,12 @@ Widget _buildTestApp({
return MultiProvider( return MultiProvider(
providers: [ providers: [
ChangeNotifierProvider<MeshCoreConnector>.value(value: connector), ChangeNotifierProvider<MeshCoreConnector>.value(value: connector),
ChangeNotifierProvider<AppSettingsService>.value(value: appSettingsService), ChangeNotifierProvider<AppSettingsService>.value(
value: appSettingsService,
),
ChangeNotifierProvider<MapTileCacheService>( ChangeNotifierProvider<MapTileCacheService>(
create: (_) => MapTileCacheService(appSettingsService: appSettingsService), create: (_) =>
MapTileCacheService(appSettingsService: appSettingsService),
), ),
ChangeNotifierProvider<PathHistoryService>( ChangeNotifierProvider<PathHistoryService>(
create: (_) => PathHistoryService(_FakeStorageService()), create: (_) => PathHistoryService(_FakeStorageService()),