Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/view/dialog/audio_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class AudioDialog extends HookConsumerWidget {
children: [
if (user != null)
Padding(
padding: const EdgeInsets.only(right: 8.0),
padding: const EdgeInsetsDirectional.only(end: 8.0),
child: UserAvatar(
account: account,
user: user,
Expand Down
4 changes: 2 additions & 2 deletions lib/view/dialog/image_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class ImageDialog extends HookConsumerWidget {
child: Stack(
children: [
Align(
alignment: Alignment.topLeft,
alignment: AlignmentDirectional.topStart,
child: Padding(
padding: const EdgeInsets.all(16.0),
child: IconButton(
Expand All @@ -105,7 +105,7 @@ class ImageDialog extends HookConsumerWidget {
),
if (url != null)
Align(
alignment: Alignment.topRight,
alignment: AlignmentDirectional.topEnd,
child: Padding(
padding: const EdgeInsets.all(16.0),
child: IconButton(
Expand Down
8 changes: 4 additions & 4 deletions lib/view/dialog/image_gallery_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ class ImageGalleryDialog extends HookConsumerWidget {
child: Stack(
children: [
Align(
alignment: Alignment.topLeft,
alignment: AlignmentDirectional.topStart,
child: Padding(
padding: const EdgeInsets.all(16.0),
child: IconButton(
Expand All @@ -188,7 +188,7 @@ class ImageGalleryDialog extends HookConsumerWidget {
),
),
Align(
alignment: Alignment.topRight,
alignment: AlignmentDirectional.topEnd,
child: Padding(
padding: const EdgeInsets.all(16.0),
child: IconButton(
Expand Down Expand Up @@ -221,7 +221,7 @@ class ImageGalleryDialog extends HookConsumerWidget {
),
if (index.value > 0)
Align(
alignment: Alignment.centerLeft,
alignment: AlignmentDirectional.centerStart,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: IconButton(
Expand All @@ -238,7 +238,7 @@ class ImageGalleryDialog extends HookConsumerWidget {
),
if (index.value < files.length - 1)
Align(
alignment: Alignment.centerRight,
alignment: AlignmentDirectional.centerEnd,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: IconButton(
Expand Down
4 changes: 2 additions & 2 deletions lib/view/dialog/post_confirmation_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class PostConfirmationDialog extends ConsumerWidget {
mainAxisSize: MainAxisSize.min,
children: [
Align(
alignment: Alignment.centerLeft,
alignment: AlignmentDirectional.centerStart,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
Expand All @@ -116,7 +116,7 @@ class PostConfirmationDialog extends ConsumerWidget {
backgroundColor: Colors.transparent,
),
Align(
alignment: Alignment.centerRight,
alignment: AlignmentDirectional.centerEnd,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
Expand Down
4 changes: 2 additions & 2 deletions lib/view/dialog/video_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class VideoDialog extends ConsumerWidget {
child: Center(child: _VideoWidget(url: url, file: file)),
),
Align(
alignment: Alignment.topLeft,
alignment: AlignmentDirectional.topStart,
child: Padding(
padding: const EdgeInsets.all(16.0),
child: IconButton(
Expand All @@ -45,7 +45,7 @@ class VideoDialog extends ConsumerWidget {
),
if (url != null)
Align(
alignment: Alignment.topRight,
alignment: AlignmentDirectional.topEnd,
child: Padding(
padding: const EdgeInsets.all(16.0),
child: IconButton(
Expand Down
4 changes: 2 additions & 2 deletions lib/view/page/avatar_decorations_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,8 @@ class AvatarDecorationsPage extends ConsumerWidget {
.contains(role.id),
) ??
false))
const Positioned(
right: 8.0,
const PositionedDirectional(
end: 8.0,
bottom: 8.0,
child: Icon(Icons.lock),
),
Expand Down
6 changes: 3 additions & 3 deletions lib/view/page/channel/channel_home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class ChannelHome extends ConsumerWidget {
),
),
Align(
alignment: Alignment.topRight,
alignment: AlignmentDirectional.topEnd,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: channel.isFavorited ?? false
Expand Down Expand Up @@ -147,9 +147,9 @@ class ChannelHome extends ConsumerWidget {
),
),
],
Positioned(
PositionedDirectional(
end: 8.0,
bottom: 8.0,
right: 8.0,
child: DecoratedBox(
decoration: BoxDecoration(
color: Colors.black87,
Expand Down
2 changes: 1 addition & 1 deletion lib/view/page/clip_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ class ClipPage extends HookConsumerWidget {
const SizedBox(width: 4.0),
Expanded(
child: Align(
alignment: Alignment.centerLeft,
alignment: AlignmentDirectional.centerStart,
child: InkWell(
onTap: () =>
context.push('/$account/users/${user.id}'),
Expand Down
7 changes: 5 additions & 2 deletions lib/view/page/drive_page.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:collection/collection.dart';
import 'package:file_picker/file_picker.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:go_router/go_router.dart';
Expand Down Expand Up @@ -135,7 +136,9 @@ class DrivePage extends HookConsumerWidget {
context.push('/settings/accounts/$account/drive'),
child: Text(
'${t.misskey.inUse}: '
'${prettyBytes(stats.usage)} / ${prettyBytes(stats.capacity)}',
'${Unicode.LRI}'
'${prettyBytes(stats.usage)} / ${prettyBytes(stats.capacity)}'
'${Unicode.PDI}',
),
),
if (!selectFiles && !selectFolder)
Expand Down Expand Up @@ -217,7 +220,7 @@ class DrivePage extends HookConsumerWidget {
bottom: PreferredSize(
preferredSize: const Size.fromHeight(kToolbarHeight),
child: Align(
alignment: Alignment.centerLeft,
alignment: AlignmentDirectional.centerStart,
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
// With `reverse: true`, `SingleChildScrollView` shows the right
Expand Down
2 changes: 1 addition & 1 deletion lib/view/page/login_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class LoginPage extends HookConsumerWidget {
),
),
Align(
alignment: Alignment.centerLeft,
alignment: AlignmentDirectional.centerStart,
child: TextButton(
style: TextButton.styleFrom(
minimumSize: Size.zero,
Expand Down
2 changes: 1 addition & 1 deletion lib/view/page/page/page_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ class PagePage extends ConsumerWidget {
const SizedBox(width: 2.0),
Expanded(
child: Align(
alignment: Alignment.centerLeft,
alignment: AlignmentDirectional.centerStart,
child: InkWell(
onTap: () => context
.push('/$account/users/${page.userId}'),
Expand Down
4 changes: 2 additions & 2 deletions lib/view/page/server/server_emojis.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class ServerEmojis extends HookConsumerWidget {
Padding(
padding: const EdgeInsets.all(8.0),
child: Align(
alignment: Alignment.centerLeft,
alignment: AlignmentDirectional.centerStart,
child: Wrap(
spacing: 4.0,
runSpacing: 4.0,
Expand Down Expand Up @@ -109,7 +109,7 @@ class ServerEmojis extends HookConsumerWidget {
Padding(
padding: const EdgeInsets.all(8.0),
child: Align(
alignment: Alignment.centerLeft,
alignment: AlignmentDirectional.centerStart,
child: Wrap(
spacing: 4.0,
runSpacing: 4.0,
Expand Down
4 changes: 2 additions & 2 deletions lib/view/page/settings/note_display_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ class NoteDisplayPage extends HookConsumerWidget {
),
),
Padding(
padding: const EdgeInsets.only(left: 16.0),
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Text(
t.aria.margin,
style: TextStyle(
Expand Down Expand Up @@ -688,7 +688,7 @@ class NoteDisplayPage extends HookConsumerWidget {
),
),
Padding(
padding: const EdgeInsets.only(left: 16.0),
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Text(
t.misskey.backgroundColor,
style: TextStyle(
Expand Down
2 changes: 1 addition & 1 deletion lib/view/page/settings/notifications_settings_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ class NotificationsSettingsPage extends ConsumerWidget {
body: ListView(
children: [
Padding(
padding: const EdgeInsets.only(left: 16.0),
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Text(
t.misskey.pushNotification,
style: TextStyle(
Expand Down
4 changes: 2 additions & 2 deletions lib/view/page/settings/profile_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@ class ProfilePage extends HookConsumerWidget {
),
child: UserAvatar(account: account, user: i, size: 100.0),
),
Positioned(
PositionedDirectional(
top: 16.0,
right: 16.0,
end: 16.0,
child: ElevatedButton(
onPressed: () async {
final result = await _getFile(
Expand Down
8 changes: 7 additions & 1 deletion lib/view/page/settings/settings_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,13 @@ class SettingsPage extends HookConsumerWidget {
user: TextSpan(text: account.username),
),
),
subtitle: Text(account.toString()),
subtitle: Align(
alignment: AlignmentDirectional.centerStart,
child: Text(
account.toString(),
textDirection: TextDirection.ltr,
),
),
onTap: () =>
context.push('/settings/accounts/$account'),
);
Expand Down
8 changes: 7 additions & 1 deletion lib/view/page/settings/tabs_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,13 @@ class TabsPage extends HookConsumerWidget {
title: tabSettings.name != null
? Text(tabSettings.name ?? '')
: TabTypeWidget(tabType: tabSettings.tabType),
subtitle: Text(tabSettings.account.toString()),
subtitle: Align(
alignment: AlignmentDirectional.centerStart,
child: Text(
tabSettings.account.toString(),
textDirection: TextDirection.ltr,
),
),
trailing: const Icon(Icons.drag_handle),
onTap: () =>
context.push('/settings/tab/${tabSettings.id}'),
Expand Down
2 changes: 1 addition & 1 deletion lib/view/page/token_login_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class TokenLoginPage extends HookConsumerWidget {
onSubmitted: (_) => tokenFocusNode.requestFocus(),
),
Align(
alignment: Alignment.centerLeft,
alignment: AlignmentDirectional.centerStart,
child: TextButton(
style: TextButton.styleFrom(
minimumSize: Size.zero,
Expand Down
25 changes: 15 additions & 10 deletions lib/view/page/user/user_home.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
Expand Down Expand Up @@ -200,6 +201,7 @@ class _UserHome extends ConsumerWidget {
Text.rich(
TextSpan(
children: [
const TextSpan(text: Unicode.LRI),
TextSpan(text: '@${user.username}'),
TextSpan(
text: '@${toUnicode(user.host ?? account.host)}',
Expand All @@ -210,19 +212,20 @@ class _UserHome extends ConsumerWidget {
.withValues(alpha: 0.5),
),
),
const TextSpan(text: Unicode.PDI),
if (user.isLocked)
const WidgetSpan(
alignment: PlaceholderAlignment.middle,
child: Padding(
padding: EdgeInsets.only(left: 4.0),
padding: EdgeInsetsDirectional.only(start: 4.0),
child: Icon(Icons.lock),
),
),
if (user.isBot)
const WidgetSpan(
alignment: PlaceholderAlignment.middle,
child: Padding(
padding: EdgeInsets.only(left: 4.0),
padding: EdgeInsetsDirectional.only(start: 4.0),
child: Icon(Icons.smart_toy_outlined),
),
),
Expand Down Expand Up @@ -513,22 +516,24 @@ class _UserHome extends ConsumerWidget {
children: [
Padding(
padding: const EdgeInsets.all(4.0),
child: Center(
child: Row(
mainAxisSize: MainAxisSize.min,
child: Text.rich(
TextSpan(
children: [
const Padding(
padding: EdgeInsets.only(right: 2.0),
const WidgetSpan(
child: Icon(Icons.place),
),
Text(
t.misskey.location,
const WidgetSpan(
child: SizedBox(width: 2.0),
),
TextSpan(
text: t.misskey.location,
style: const TextStyle(
fontWeight: FontWeight.bold,
),
),
],
),
textAlign: TextAlign.center,
),
),
Padding(
Expand Down Expand Up @@ -690,7 +695,7 @@ class _UserHome extends ConsumerWidget {
Padding(
padding: const EdgeInsets.all(4.0),
child: Align(
alignment: Alignment.centerLeft,
alignment: AlignmentDirectional.centerStart,
child: SkebStatusWidget(
account: account,
skebStatus: skebStatus,
Expand Down
5 changes: 4 additions & 1 deletion lib/view/widget/account_preview.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ class AccountPreview extends ConsumerWidget {
title: i != null
? UsernameWidget(account: account, user: i)
: Text(account.username ?? t.aria.guest),
subtitle: Text(account.toString()),
subtitle: Align(
alignment: AlignmentDirectional.centerStart,
child: Text(account.toString(), textDirection: TextDirection.ltr),
),
trailing: trailing,
onTap: onTap,
);
Expand Down
1 change: 1 addition & 0 deletions lib/view/widget/acct_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class AcctWidget extends StatelessWidget {
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
textDirection: TextDirection.ltr,
);
}
}
2 changes: 1 addition & 1 deletion lib/view/widget/ad_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class AdWidget extends HookConsumerWidget {
),
),
Align(
alignment: Alignment.topRight,
alignment: AlignmentDirectional.topEnd,
child: IconButton(
style: IconButton.styleFrom(
backgroundColor:
Expand Down
Loading
Loading