Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! Improve style for error dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
nqhhdev committed Nov 20, 2024
1 parent db8611f commit 25adec9
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
14 changes: 14 additions & 0 deletions lib/utils/dialog/twake_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,8 @@ Future<ConfirmResult> showConfirmAlertDialog({
color: LinagoraSysColors.material()
.onSurfaceVariant,
),
maxLines: 2,
overflow: TextOverflow.ellipsis,
),
SizedBox(
height: responsiveUtils.isMobile(context) ? 16 : 27,
Expand All @@ -379,6 +381,8 @@ Future<ConfirmResult> showConfirmAlertDialog({
color: LinagoraSysColors.material()
.onSurfaceVariant,
),
maxLines: 3,
overflow: TextOverflow.ellipsis,
),
SizedBox(
height: responsiveUtils.isMobile(context) ? 24 : 65,
Expand All @@ -392,6 +396,11 @@ Future<ConfirmResult> showConfirmAlertDialog({
),
message:
cancelLabel ?? L10n.of(context)!.cancel,
constraints: BoxConstraints(
maxWidth: responsiveUtils.isMobile(context)
? 96
: 112,
),
styleMessage: Theme.of(context)
.textTheme
.labelLarge
Expand All @@ -414,6 +423,11 @@ Future<ConfirmResult> showConfirmAlertDialog({
Radius.circular(100),
),
),
constraints: BoxConstraints(
maxWidth: responsiveUtils.isMobile(context)
? 96
: 112,
),
margin: const EdgeInsetsDirectional.symmetric(
horizontal: 24.0,
),
Expand Down
5 changes: 5 additions & 0 deletions lib/widgets/twake_components/twake_text_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ class TwakeTextButton extends StatelessWidget {

final double? borderHover;

final BoxConstraints? constraints;

const TwakeTextButton({
super.key,
required this.message,
Expand All @@ -44,6 +46,7 @@ class TwakeTextButton extends StatelessWidget {
this.margin = const EdgeInsetsDirectional.all(0),
this.buttonDecoration,
this.borderHover,
this.constraints,
});

@override
Expand All @@ -58,6 +61,7 @@ class TwakeTextButton extends StatelessWidget {
hoverColor: hoverColor,
borderRadius: BorderRadius.circular(borderHover ?? 0),
child: Container(
constraints: constraints,
height: 48,
padding: margin,
decoration:
Expand All @@ -74,6 +78,7 @@ class TwakeTextButton extends StatelessWidget {
Theme.of(context).textTheme.labelLarge?.copyWith(
color: LinagoraSysColors.material().onPrimary,
),
overflow: TextOverflow.ellipsis,
),
),
),
Expand Down
4 changes: 2 additions & 2 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1361,8 +1361,8 @@ packages:
dependency: "direct main"
description:
path: "."
ref: update-error-dialog
resolved-ref: "6f5c5950038f593d25e6d178602441deed4cfdc7"
ref: main
resolved-ref: "549ad29ac7153964e89ebf04b5693e5a6e50a64a"
url: "[email protected]:linagora/future-loading-dialog.git"
source: git
version: "0.3.0"
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ dependencies:
future_loading_dialog:
git:
url: [email protected]:linagora/future-loading-dialog.git
ref: update-error-dialog
ref: main

linkfy_text:
git:
Expand Down

0 comments on commit 25adec9

Please sign in to comment.