mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-07-25 23:45:40 -04:00
flutter upgrade and fix some ui
This commit is contained in:
parent
6102f32587
commit
9fbe97c035
4 changed files with 42 additions and 36 deletions
|
@ -1,7 +1,7 @@
|
||||||
import UIKit
|
import UIKit
|
||||||
import Flutter
|
import Flutter
|
||||||
|
|
||||||
@UIApplicationMain
|
@main
|
||||||
@objc class AppDelegate: FlutterAppDelegate {
|
@objc class AppDelegate: FlutterAppDelegate {
|
||||||
override func application(
|
override func application(
|
||||||
_ application: UIApplication,
|
_ application: UIApplication,
|
||||||
|
|
|
@ -46,7 +46,11 @@ class _ContactsDialogState extends State<ContactsDialog> {
|
||||||
final theme = Theme.of(context);
|
final theme = Theme.of(context);
|
||||||
// final textTheme = theme.textTheme;
|
// final textTheme = theme.textTheme;
|
||||||
final scale = theme.extension<ScaleScheme>()!;
|
final scale = theme.extension<ScaleScheme>()!;
|
||||||
// final scaleConfig = theme.extension<ScaleConfig>()!;
|
final scaleConfig = theme.extension<ScaleConfig>()!;
|
||||||
|
|
||||||
|
final appBarIconColor = scaleConfig.useVisualIndicators
|
||||||
|
? scale.secondaryScale.border
|
||||||
|
: scale.secondaryScale.borderText;
|
||||||
|
|
||||||
final enableSplit = !isMobileWidth(context);
|
final enableSplit = !isMobileWidth(context);
|
||||||
final enableLeft = enableSplit || _selectedContact == null;
|
final enableLeft = enableSplit || _selectedContact == null;
|
||||||
|
@ -86,8 +90,8 @@ class _ContactsDialogState extends State<ContactsDialog> {
|
||||||
await onChatStarted(_selectedContact!);
|
await onChatStarted(_selectedContact!);
|
||||||
}),
|
}),
|
||||||
Text(translate('contacts_dialog.new_chat'),
|
Text(translate('contacts_dialog.new_chat'),
|
||||||
style: theme.textTheme.labelSmall!.copyWith(
|
style: theme.textTheme.labelSmall!
|
||||||
color: scale.primaryScale.borderText)),
|
.copyWith(color: appBarIconColor)),
|
||||||
])).paddingLTRB(8, 0, 8, 0),
|
])).paddingLTRB(8, 0, 8, 0),
|
||||||
if (enableSplit && _selectedContact != null)
|
if (enableSplit && _selectedContact != null)
|
||||||
FittedBox(
|
FittedBox(
|
||||||
|
@ -102,14 +106,16 @@ class _ContactsDialogState extends State<ContactsDialog> {
|
||||||
await onContactSelected(null);
|
await onContactSelected(null);
|
||||||
}),
|
}),
|
||||||
Text(translate('contacts_dialog.close_contact'),
|
Text(translate('contacts_dialog.close_contact'),
|
||||||
style: theme.textTheme.labelSmall!.copyWith(
|
style: theme.textTheme.labelSmall!
|
||||||
color: scale.primaryScale.borderText)),
|
.copyWith(color: appBarIconColor)),
|
||||||
])).paddingLTRB(8, 0, 8, 0),
|
])).paddingLTRB(8, 0, 8, 0),
|
||||||
]),
|
]),
|
||||||
body: LayoutBuilder(builder: (context, constraint) {
|
body: LayoutBuilder(builder: (context, constraint) {
|
||||||
final maxWidth = constraint.maxWidth;
|
final maxWidth = constraint.maxWidth;
|
||||||
|
|
||||||
return Row(children: [
|
return ColoredBox(
|
||||||
|
color: scale.primaryScale.appBackground,
|
||||||
|
child: Row(children: [
|
||||||
Offstage(
|
Offstage(
|
||||||
offstage: !enableLeft,
|
offstage: !enableLeft,
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
|
@ -133,7 +139,7 @@ class _ContactsDialogState extends State<ContactsDialog> {
|
||||||
ContactDetailsWidget(contact: _selectedContact!)
|
ContactDetailsWidget(contact: _selectedContact!)
|
||||||
.paddingAll(8)
|
.paddingAll(8)
|
||||||
.expanded(),
|
.expanded(),
|
||||||
]);
|
]));
|
||||||
})));
|
})));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import Cocoa
|
import Cocoa
|
||||||
import FlutterMacOS
|
import FlutterMacOS
|
||||||
|
|
||||||
@NSApplicationMain
|
@main
|
||||||
class AppDelegate: FlutterAppDelegate {
|
class AppDelegate: FlutterAppDelegate {
|
||||||
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
|
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
|
||||||
return true
|
return true
|
||||||
|
|
|
@ -893,18 +893,18 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: material_color_utilities
|
name: material_color_utilities
|
||||||
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
|
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.8.0"
|
version: "0.11.1"
|
||||||
meta:
|
meta:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: meta
|
name: meta
|
||||||
sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
|
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.12.0"
|
version: "1.15.0"
|
||||||
mime:
|
mime:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue