diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift index 70693e4..b636303 100644 --- a/ios/Runner/AppDelegate.swift +++ b/ios/Runner/AppDelegate.swift @@ -1,7 +1,7 @@ import UIKit import Flutter -@UIApplicationMain +@main @objc class AppDelegate: FlutterAppDelegate { override func application( _ application: UIApplication, diff --git a/lib/contacts/views/contacts_dialog.dart b/lib/contacts/views/contacts_dialog.dart index 6a963f5..e6e5391 100644 --- a/lib/contacts/views/contacts_dialog.dart +++ b/lib/contacts/views/contacts_dialog.dart @@ -46,7 +46,11 @@ class _ContactsDialogState extends State { final theme = Theme.of(context); // final textTheme = theme.textTheme; final scale = theme.extension()!; - // final scaleConfig = theme.extension()!; + final scaleConfig = theme.extension()!; + + final appBarIconColor = scaleConfig.useVisualIndicators + ? scale.secondaryScale.border + : scale.secondaryScale.borderText; final enableSplit = !isMobileWidth(context); final enableLeft = enableSplit || _selectedContact == null; @@ -86,8 +90,8 @@ class _ContactsDialogState extends State { await onChatStarted(_selectedContact!); }), Text(translate('contacts_dialog.new_chat'), - style: theme.textTheme.labelSmall!.copyWith( - color: scale.primaryScale.borderText)), + style: theme.textTheme.labelSmall! + .copyWith(color: appBarIconColor)), ])).paddingLTRB(8, 0, 8, 0), if (enableSplit && _selectedContact != null) FittedBox( @@ -102,38 +106,40 @@ class _ContactsDialogState extends State { await onContactSelected(null); }), Text(translate('contacts_dialog.close_contact'), - style: theme.textTheme.labelSmall!.copyWith( - color: scale.primaryScale.borderText)), + style: theme.textTheme.labelSmall! + .copyWith(color: appBarIconColor)), ])).paddingLTRB(8, 0, 8, 0), ]), body: LayoutBuilder(builder: (context, constraint) { final maxWidth = constraint.maxWidth; - return Row(children: [ - Offstage( - offstage: !enableLeft, - child: SizedBox( - width: enableLeft && !enableRight - ? maxWidth - : (maxWidth / 3).clamp(200, 500), - child: DecoratedBox( - decoration: BoxDecoration( - color: scale.primaryScale.subtleBackground), - child: ContactsBrowser( - selectedContactRecordKey: _selectedContact - ?.localConversationRecordKey - .toVeilid(), - onContactSelected: onContactSelected, - onChatStarted: onChatStarted, - ).paddingLTRB(8, 0, 8, 8)))), - if (enableRight) - if (_selectedContact == null) - const NoContactWidget().expanded() - else - ContactDetailsWidget(contact: _selectedContact!) - .paddingAll(8) - .expanded(), - ]); + return ColoredBox( + color: scale.primaryScale.appBackground, + child: Row(children: [ + Offstage( + offstage: !enableLeft, + child: SizedBox( + width: enableLeft && !enableRight + ? maxWidth + : (maxWidth / 3).clamp(200, 500), + child: DecoratedBox( + decoration: BoxDecoration( + color: scale.primaryScale.subtleBackground), + child: ContactsBrowser( + selectedContactRecordKey: _selectedContact + ?.localConversationRecordKey + .toVeilid(), + onContactSelected: onContactSelected, + onChatStarted: onChatStarted, + ).paddingLTRB(8, 0, 8, 8)))), + if (enableRight) + if (_selectedContact == null) + const NoContactWidget().expanded() + else + ContactDetailsWidget(contact: _selectedContact!) + .paddingAll(8) + .expanded(), + ])); }))); } diff --git a/macos/Runner/AppDelegate.swift b/macos/Runner/AppDelegate.swift index d53ef64..8e02df2 100644 --- a/macos/Runner/AppDelegate.swift +++ b/macos/Runner/AppDelegate.swift @@ -1,7 +1,7 @@ import Cocoa import FlutterMacOS -@NSApplicationMain +@main class AppDelegate: FlutterAppDelegate { override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { return true diff --git a/pubspec.lock b/pubspec.lock index 840746a..17cdf9b 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -893,18 +893,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: "direct main" description: name: meta - sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.12.0" + version: "1.15.0" mime: dependency: transitive description: