Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: #2846 horizontal layout buttons #2899

Merged
merged 7 commits into from
Sep 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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