mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 19:49:22 +00:00
Constrain primary Buttons width
This commit is contained in:
parent
fb5efc0429
commit
02fe3c008f
3 changed files with 249 additions and 242 deletions
|
@ -163,9 +163,7 @@ class ExchangePage extends BasePage {
|
|||
),
|
||||
bottomSectionPadding:
|
||||
EdgeInsets.only(left: 24, right: 24, bottom: 24),
|
||||
bottomSection: ConstrainedBox(
|
||||
constraints: BoxConstraints(maxWidth: ResponsiveLayoutUtil.kDesktopMaxWidthConstraint),
|
||||
child: Column(children: <Widget>[
|
||||
bottomSection: Column(children: <Widget>[
|
||||
Padding(
|
||||
padding: EdgeInsets.only(bottom: 15),
|
||||
child: Observer(builder: (_) {
|
||||
|
@ -222,7 +220,6 @@ class ExchangePage extends BasePage {
|
|||
isDisabled: exchangeViewModel.selectedProviders.isEmpty,
|
||||
isLoading: exchangeViewModel.tradeState is TradeIsCreating)),
|
||||
]),
|
||||
),
|
||||
)),
|
||||
));
|
||||
}
|
||||
|
|
|
@ -247,9 +247,7 @@ class SendPage extends BasePage {
|
|||
),
|
||||
bottomSectionPadding:
|
||||
EdgeInsets.only(left: 24, right: 24, bottom: 24),
|
||||
bottomSection: ConstrainedBox(
|
||||
constraints: BoxConstraints(maxWidth: ResponsiveLayoutUtil.kDesktopMaxWidthConstraint),
|
||||
child: Column(
|
||||
bottomSection: Column(
|
||||
children: [
|
||||
if (sendViewModel.hasCurrecyChanger)
|
||||
Observer(builder: (_) =>
|
||||
|
@ -323,7 +321,6 @@ class SendPage extends BasePage {
|
|||
},
|
||||
)
|
||||
],
|
||||
),
|
||||
)),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import 'package:cake_wallet/utils/responsive_layout_util.dart';
|
||||
import 'package:dotted_border/dotted_border.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
@ -24,7 +25,9 @@ class PrimaryButton extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final content = SizedBox(
|
||||
final content = ConstrainedBox(
|
||||
constraints: BoxConstraints(maxWidth: ResponsiveLayoutUtil.kDesktopMaxWidthConstraint),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
height: 52.0,
|
||||
child: TextButton(
|
||||
|
@ -45,7 +48,8 @@ class PrimaryButton extends StatelessWidget {
|
|||
color: isDisabled
|
||||
? textColor.withOpacity(0.5)
|
||||
: textColor)),
|
||||
));
|
||||
)),
|
||||
);
|
||||
|
||||
return isDottedBorder
|
||||
? DottedBorder(
|
||||
|
@ -77,7 +81,9 @@ class LoadingPrimaryButton extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SizedBox(
|
||||
return ConstrainedBox(
|
||||
constraints: BoxConstraints(maxWidth: ResponsiveLayoutUtil.kDesktopMaxWidthConstraint),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
height: 52.0,
|
||||
child: TextButton(
|
||||
|
@ -99,7 +105,8 @@ class LoadingPrimaryButton extends StatelessWidget {
|
|||
? textColor.withOpacity(0.5)
|
||||
: textColor
|
||||
)),
|
||||
));
|
||||
)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -130,7 +137,9 @@ class PrimaryIconButton extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SizedBox(
|
||||
return ConstrainedBox(
|
||||
constraints: BoxConstraints(maxWidth: ResponsiveLayoutUtil.kDesktopMaxWidthConstraint),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
height: 52.0,
|
||||
child: TextButton(
|
||||
|
@ -168,7 +177,8 @@ class PrimaryIconButton extends StatelessWidget {
|
|||
)
|
||||
],
|
||||
),
|
||||
));
|
||||
)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -190,7 +200,9 @@ class PrimaryImageButton extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SizedBox(
|
||||
return ConstrainedBox(
|
||||
constraints: BoxConstraints(maxWidth: ResponsiveLayoutUtil.kDesktopMaxWidthConstraint),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
height: 52.0,
|
||||
child: TextButton(
|
||||
|
@ -218,6 +230,7 @@ class PrimaryImageButton extends StatelessWidget {
|
|||
],
|
||||
),
|
||||
)
|
||||
));
|
||||
)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue