💄 Optimize some designs
This commit is contained in:
@@ -68,6 +68,7 @@ class AccountScreen extends HookConsumerWidget {
|
|||||||
body: SingleChildScrollView(
|
body: SingleChildScrollView(
|
||||||
padding: getTabbedPadding(context),
|
padding: getTabbedPadding(context),
|
||||||
child: Column(
|
child: Column(
|
||||||
|
spacing: 4,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Card(
|
Card(
|
||||||
child: Column(
|
child: Column(
|
||||||
@@ -112,20 +113,22 @@ class AccountScreen extends HookConsumerWidget {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.baseline,
|
crossAxisAlignment: CrossAxisAlignment.baseline,
|
||||||
textBaseline: TextBaseline.alphabetic,
|
textBaseline: TextBaseline.alphabetic,
|
||||||
children: [
|
children: [
|
||||||
AccountName(
|
Flexible(
|
||||||
|
child: AccountName(
|
||||||
account: user.value!,
|
account: user.value!,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text('@${user.value!.name}'),
|
),
|
||||||
|
Flexible(child: Text('@${user.value!.name}')),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
(user.value!.profile.bio.isNotEmpty)
|
(user.value!.profile.bio.isNotEmpty)
|
||||||
? user.value!.profile.bio
|
? user.value!.profile.bio
|
||||||
: 'No description yet.',
|
: 'descriptionNone'.tr(),
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
@@ -158,8 +161,16 @@ class AccountScreen extends HookConsumerWidget {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Icon(Symbols.draw, size: 28).padding(bottom: 8),
|
Icon(Symbols.draw, size: 28).padding(bottom: 8),
|
||||||
Text('creatorHub').tr().fontSize(16).bold(),
|
Text(
|
||||||
Text('creatorHubDescription').tr(),
|
'creatorHub',
|
||||||
|
maxLines: 1,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
).tr().fontSize(16).bold(),
|
||||||
|
Text(
|
||||||
|
'creatorHubDescription',
|
||||||
|
maxLines: 2,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
).tr(),
|
||||||
],
|
],
|
||||||
).padding(horizontal: 16, vertical: 12),
|
).padding(horizontal: 16, vertical: 12),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@@ -176,8 +187,16 @@ class AccountScreen extends HookConsumerWidget {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Icon(Symbols.code, size: 28).padding(bottom: 8),
|
Icon(Symbols.code, size: 28).padding(bottom: 8),
|
||||||
Text('developerPortal').tr().fontSize(16).bold(),
|
Text(
|
||||||
Text('developerPortalDescription').tr(),
|
'developerPortal',
|
||||||
|
maxLines: 1,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
).tr().fontSize(16).bold(),
|
||||||
|
Text(
|
||||||
|
'developerPortalDescription',
|
||||||
|
maxLines: 2,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
).tr(),
|
||||||
],
|
],
|
||||||
).padding(horizontal: 16, vertical: 12),
|
).padding(horizontal: 16, vertical: 12),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
@@ -2,6 +2,7 @@ import 'package:dio/dio.dart';
|
|||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
import 'package:gap/gap.dart';
|
import 'package:gap/gap.dart';
|
||||||
@@ -297,6 +298,18 @@ class AccountProfileScreen extends HookConsumerWidget {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
InkWell(
|
||||||
|
child: Row(
|
||||||
|
spacing: 6,
|
||||||
|
children: [
|
||||||
|
Icon(Symbols.fingerprint, size: 17, fill: 1).padding(right: 2),
|
||||||
|
Text(data.id),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
onTap: () {
|
||||||
|
Clipboard.setData(ClipboardData(text: data.id));
|
||||||
|
},
|
||||||
|
),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1394,6 +1394,8 @@ class ChatRoomScreen extends HookConsumerWidget {
|
|||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const messageKeyPrefix = 'message-';
|
||||||
|
|
||||||
Widget chatMessageListWidget(List<LocalChatMessage> messageList) =>
|
Widget chatMessageListWidget(List<LocalChatMessage> messageList) =>
|
||||||
SuperListView.builder(
|
SuperListView.builder(
|
||||||
listController: listController,
|
listController: listController,
|
||||||
@@ -1403,7 +1405,9 @@ class ChatRoomScreen extends HookConsumerWidget {
|
|||||||
itemCount: messageList.length,
|
itemCount: messageList.length,
|
||||||
findChildIndexCallback: (key) {
|
findChildIndexCallback: (key) {
|
||||||
final valueKey = key as ValueKey;
|
final valueKey = key as ValueKey;
|
||||||
final messageId = valueKey.value as String;
|
final messageId = (valueKey.value as String).substring(
|
||||||
|
messageKeyPrefix.length,
|
||||||
|
);
|
||||||
return messageList.indexWhere((m) => m.id == messageId);
|
return messageList.indexWhere((m) => m.id == messageId);
|
||||||
},
|
},
|
||||||
extentEstimation: (_, _) => 40,
|
extentEstimation: (_, _) => 40,
|
||||||
@@ -1420,10 +1424,13 @@ class ChatRoomScreen extends HookConsumerWidget {
|
|||||||
.abs() >
|
.abs() >
|
||||||
3;
|
3;
|
||||||
|
|
||||||
|
final key = ValueKey('$messageKeyPrefix${message.id}');
|
||||||
|
|
||||||
return chatIdentity.when(
|
return chatIdentity.when(
|
||||||
skipError: true,
|
skipError: true,
|
||||||
data:
|
data:
|
||||||
(identity) => MessageItem(
|
(identity) => MessageItem(
|
||||||
|
key: key,
|
||||||
message: message,
|
message: message,
|
||||||
isCurrentUser: identity?.id == message.senderId,
|
isCurrentUser: identity?.id == message.senderId,
|
||||||
onAction: (action) {
|
onAction: (action) {
|
||||||
@@ -1466,6 +1473,7 @@ class ChatRoomScreen extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
loading:
|
loading:
|
||||||
() => MessageItem(
|
() => MessageItem(
|
||||||
|
key: key,
|
||||||
message: message,
|
message: message,
|
||||||
isCurrentUser: false,
|
isCurrentUser: false,
|
||||||
onAction: null,
|
onAction: null,
|
||||||
@@ -1473,7 +1481,7 @@ class ChatRoomScreen extends HookConsumerWidget {
|
|||||||
showAvatar: false,
|
showAvatar: false,
|
||||||
onJump: (_) {},
|
onJump: (_) {},
|
||||||
),
|
),
|
||||||
error: (_, _) => const SizedBox.shrink(),
|
error: (_, _) => SizedBox.shrink(key: key),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
@@ -37,7 +37,14 @@ class AccountName extends StatelessWidget {
|
|||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
spacing: 4,
|
spacing: 4,
|
||||||
children: [
|
children: [
|
||||||
Flexible(child: Text(account.nick, style: nameStyle)),
|
Flexible(
|
||||||
|
child: Text(
|
||||||
|
account.nick,
|
||||||
|
style: nameStyle,
|
||||||
|
maxLines: 1,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
|
),
|
||||||
if (account.perkSubscription != null)
|
if (account.perkSubscription != null)
|
||||||
StellarMembershipMark(membership: account.perkSubscription!),
|
StellarMembershipMark(membership: account.perkSubscription!),
|
||||||
if (account.profile.verification != null)
|
if (account.profile.verification != null)
|
||||||
|
@@ -60,7 +60,9 @@ class AccountStatusCreationWidget extends HookConsumerWidget {
|
|||||||
spacing: 4,
|
spacing: 4,
|
||||||
children: [
|
children: [
|
||||||
Icon(Symbols.keyboard_arrow_up),
|
Icon(Symbols.keyboard_arrow_up),
|
||||||
Text('statusCreateHint').tr(),
|
Expanded(
|
||||||
|
child: Text('statusCreateHint', maxLines: 1).tr(),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
).opacity(0.85),
|
).opacity(0.85),
|
||||||
|
Reference in New Issue
Block a user