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 WoltNavigationToolbar leading constraint #361

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

TahaTesser
Copy link
Collaborator

Fixes leadingNavBarWidget uses more vertical space than trailingNavBarWidget

Code Sample

expand to view the code sample
import 'package:flutter/material.dart';
import 'package:wolt_modal_sheet/wolt_modal_sheet.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Builder(builder: (context) {
        return Scaffold(
          body: Center(
            child: TextButton(
              child: const Text('Open WoltModalSheet'),
              onPressed: () {
                WoltModalSheet.show(
                  context: context,
                  pageListBuilder: (context) => [
                    WoltModalSheetPage(
                      isTopBarLayerAlwaysVisible: true,
                      topBarTitle: const Text('Title'),
                      leadingNavBarWidget: Container(
                        color: Colors.blue,
                        child: const Icon(Icons.chevron_left),
                      ),
                      trailingNavBarWidget: Container(
                        color: Colors.red,
                        child: const Icon(Icons.chevron_right),
                      ),
                      child: const Padding(
                        padding: EdgeInsets.all(8.0),
                        child: Center(child: Text('Child')),
                      ),
                    ),
                  ],
                );
              },
            ),
          ), // This trailing comma makes auto-formatting nicer for build methods.
        );
      }),
    );
  }
}

Before

After

Screenshot 2025-01-21 at 21 29 21

Leading Button Splash Constraint (Before)

Screenshot 2025-01-21 at 21 32 38

Leading Button Splash Constraint (After)

Screenshot 2025-01-21 at 21 33 59

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes tests for all changed/updated/fixed behaviors.
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (melos run analyze) does not report any problems on my PR.
  • The package compiles with the minimum Flutter version stated in the pubspec.yaml

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change.
  • No, this is not a breaking change.

@TahaTesser TahaTesser enabled auto-merge (squash) January 22, 2025 08:02
@TahaTesser TahaTesser disabled auto-merge January 22, 2025 08:07
@TahaTesser TahaTesser merged commit 41e8b73 into woltapp:main Jan 22, 2025
3 checks passed
@TahaTesser TahaTesser deleted the fix_toolbar_leading_constraint branch January 22, 2025 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

leadingNavBarWidget uses more vertical space than trailingNavBarWidget
2 participants