mirror of
https://github.com/Iconica-Development/flutter_shopping.git
synced 2025-05-19 08:53:46 +02:00
fix: button styling
This commit is contained in:
parent
4e37ec8b5d
commit
d37689e855
4 changed files with 71 additions and 53 deletions
|
@ -69,12 +69,12 @@ Widget _defaultNextButtonBuilder(
|
|||
"Choose date and time",
|
||||
"Next",
|
||||
"Next",
|
||||
"Place another order",
|
||||
];
|
||||
|
||||
return Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 48, vertical: 48),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 60, vertical: 32),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
child: FilledButton(
|
||||
|
@ -90,7 +90,7 @@ Widget _defaultNextButtonBuilder(
|
|||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 16.0,
|
||||
vertical: 8.0,
|
||||
vertical: 12,
|
||||
),
|
||||
child: Text(
|
||||
nextButtonTexts[currentStep],
|
||||
|
|
|
@ -219,7 +219,11 @@ Widget _defaultNavigateToShoppingCartBuilder(
|
|||
|
||||
return ListenableBuilder(
|
||||
listenable: notifier,
|
||||
builder: (context, widget) => FilledButton(
|
||||
builder: (context, widget) => Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 60),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
child: FilledButton(
|
||||
onPressed: configuration.getProductsInShoppingCart?.call() != 0
|
||||
? configuration.onNavigateToShoppingCart
|
||||
: null,
|
||||
|
@ -231,7 +235,7 @@ Widget _defaultNavigateToShoppingCartBuilder(
|
|||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 16.0,
|
||||
vertical: 8.0,
|
||||
vertical: 12,
|
||||
),
|
||||
child: Text(
|
||||
configuration.localizations.navigateToShoppingCart,
|
||||
|
@ -239,5 +243,7 @@ Widget _defaultNavigateToShoppingCartBuilder(
|
|||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -92,15 +92,32 @@ class DefaultOrderSucces extends StatelessWidget {
|
|||
),
|
||||
),
|
||||
const Spacer(),
|
||||
FilledButton(
|
||||
onPressed: () {
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 60),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
child: FilledButton(
|
||||
onPressed: () async {
|
||||
configuration.onCompleteUserStory.call(context);
|
||||
},
|
||||
style: theme.filledButtonTheme.style?.copyWith(
|
||||
backgroundColor: WidgetStateProperty.all(
|
||||
theme.colorScheme.primary,
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 16.0,
|
||||
vertical: 12,
|
||||
),
|
||||
child: Text(
|
||||
"Place another order",
|
||||
style: theme.textTheme.displayLarge,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
@ -159,35 +159,30 @@ class _DefaultConfirmOrderButton<T extends Product> extends StatelessWidget {
|
|||
}
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 80),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 60),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
child: FilledButton(
|
||||
onPressed: () => onConfirmOrderPressed(
|
||||
configuration.productService.products,
|
||||
),
|
||||
style: theme.filledButtonTheme.style?.copyWith(
|
||||
backgroundColor: WidgetStateProperty.all(
|
||||
theme.colorScheme.primary,
|
||||
),
|
||||
),
|
||||
onPressed: () => onConfirmOrderPressed(
|
||||
configuration.productService.products,
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 16.0,
|
||||
vertical: 5.0,
|
||||
vertical: 12,
|
||||
),
|
||||
child: Text(
|
||||
configuration.localizations.placeOrder,
|
||||
style: theme.textTheme.displayLarge?.copyWith(
|
||||
color: theme.colorScheme.onPrimary,
|
||||
style: theme.textTheme.displayLarge,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue