Skip to content

Commit

Permalink
fix: openfoodfacts#2846 horizontal layout buttons (openfoodfacts#2899)
Browse files Browse the repository at this point in the history
* fix: openfoodfacts#2846

* fix: openfoodfacts#2846

* padding fix

* small padding
  • Loading branch information
abughalib authored Sep 5, 2022
1 parent d9c35d7 commit 91aa457
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ class _OcrWidget extends StatelessWidget {
),
const SizedBox(height: MEDIUM_SPACE),
SmoothActionButtonsBar(
axis: Axis.horizontal,
negativeAction: SmoothActionButton(
text: appLocalizations.cancel,
onPressed: () => Navigator.pop(context),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ class _NutritionPageLoadedState extends State<NutritionPageLoaded> {
),
),
SmoothActionButtonsBar(
axis: Axis.horizontal,
positiveAction: SmoothActionButton(
text: appLocalizations.save,
onPressed: () async => _exitPage(
Expand Down
24 changes: 14 additions & 10 deletions packages/smooth_app/lib/pages/product/simple_input_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -111,17 +111,21 @@ class _SimpleInputPageState extends State<SimpleInputPage> {
child: ListView(children: simpleInputs),
),
),
SmoothActionButtonsBar(
positiveAction: SmoothActionButton(
text: appLocalizations.save,
onPressed: () async => _exitPage(
await _mayExitPage(saving: true),
Padding(
padding: const EdgeInsets.symmetric(horizontal: SMALL_SPACE),
child: SmoothActionButtonsBar(
axis: Axis.horizontal,
positiveAction: SmoothActionButton(
text: appLocalizations.save,
onPressed: () async => _exitPage(
await _mayExitPage(saving: true),
),
),
),
negativeAction: SmoothActionButton(
text: appLocalizations.cancel,
onPressed: () async => _exitPage(
await _mayExitPage(saving: false),
negativeAction: SmoothActionButton(
text: appLocalizations.cancel,
onPressed: () async => _exitPage(
await _mayExitPage(saving: false),
),
),
),
),
Expand Down

0 comments on commit 91aa457

Please sign in to comment.