💄 Optimize compose design
This commit is contained in:
@@ -1198,5 +1198,6 @@
|
|||||||
"transferRemark": "Transfer Remark",
|
"transferRemark": "Transfer Remark",
|
||||||
"addRemarkForTransfer": "Add remark for transfer",
|
"addRemarkForTransfer": "Add remark for transfer",
|
||||||
"enterPinToConfirmTransfer": "Enter your 6-digit PIN to confirm transfer",
|
"enterPinToConfirmTransfer": "Enter your 6-digit PIN to confirm transfer",
|
||||||
"transferCreatedSuccessfully": "Transfer created successfully!"
|
"transferCreatedSuccessfully": "Transfer created successfully!",
|
||||||
|
"postUpdate": "Update"
|
||||||
}
|
}
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
import 'dart:math' as math;
|
||||||
|
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
@@ -164,11 +166,13 @@ class PostComposeCard extends HookConsumerWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final maxHeight = math.min(640.0, MediaQuery.of(context).size.height * 0.8);
|
||||||
|
|
||||||
return Card(
|
return Card(
|
||||||
margin: EdgeInsets.zero,
|
margin: EdgeInsets.zero,
|
||||||
color: Theme.of(context).colorScheme.surfaceContainer,
|
color: Theme.of(context).colorScheme.surfaceContainer,
|
||||||
child: Container(
|
child: Container(
|
||||||
constraints: const BoxConstraints(maxHeight: 400),
|
constraints: BoxConstraints(maxHeight: maxHeight),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
@@ -186,11 +190,10 @@ class PostComposeCard extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
|
const Gap(4),
|
||||||
Text(
|
Text(
|
||||||
originalPost != null
|
'postCompose'.tr(),
|
||||||
? 'postEditing'.tr()
|
style: theme.textTheme.titleMedium!.copyWith(fontSize: 18),
|
||||||
: 'postCompose'.tr(),
|
|
||||||
style: theme.textTheme.titleMedium,
|
|
||||||
),
|
),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
IconButton(
|
IconButton(
|
||||||
|
@@ -43,7 +43,7 @@ class ComposeInfoBanner extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
const Gap(8),
|
const Gap(8),
|
||||||
Text(
|
Text(
|
||||||
'postEditing',
|
'postEditing'.tr(),
|
||||||
style: Theme.of(context).textTheme.labelMedium?.copyWith(
|
style: Theme.of(context).textTheme.labelMedium?.copyWith(
|
||||||
color: Theme.of(context).colorScheme.onPrimaryContainer,
|
color: Theme.of(context).colorScheme.onPrimaryContainer,
|
||||||
),
|
),
|
||||||
|
Reference in New Issue
Block a user