Repository navigation
Allow changing of leading width and automatically leading options in search bar delegate #136164
Copy link
Copy link
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.p: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagesr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Description
Is there an existing issue for this?
- I have searched the existing issues
- I have read the guide to filing a bug
Steps to reproduce
1- In any view, open the search bar delagate
2- Close the back button to only show the text field and action
3- Change the width of the leading
Expected results
Normally Appbar has two options, leading and width, and they can be changed from the client side.
Actual results
Client-side changes are not possible. It just changed AppBarTheme option, but I couldn't have these requirements.
Code sample
Code sample
@override
ThemeData appBarTheme(BuildContext context) {
return context.general.appTheme.copyWith(
appBarTheme: const AppBarTheme(),
);
}Screenshots or Video
Logs
No response
Flutter Doctor output
Doctor output
[!] Flutter (Channel master, 3.16.0-6.0.pre.22, on macOS 13.4.1 22F770820d darwin-arm64, locale en-TR)
! Upstream repository https://github.com/VB10/flutter is not a standard remote.
Set environment variable "FLUTTER_GIT_URL" to https://github.com/VB10/flutter to dismiss this error.
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0-rc5)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2020.3)
[✓] IntelliJ IDEA Community Edition (version 2022.3.2)
[✓] VS Code (version 1.83.0)
[✓] Connected device (3 available)
[✓] Network resourcesReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.p: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagesr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team

Activity
dam-ease commentedon Oct 9, 2023
Hi @VB10. Thanks for filing this. I tried reproducing this with the sample code here but not sure I fully understand the third reproduction step. Please can you provide a minimal complete reproducible code sample that doesn’t include 3rd party plugins or complex production code?
Thank you.
VB10 commentedon Oct 9, 2023
@dam-ease thank you for response. The sample code shows we only modify AppBarTheme option, but leading width and automatic back button are not implemented in the class. That was the problem. This area cannot be changed directly. There is no support for these properties, so I wasn't able to add the right sample code.
This problem has also been solved with PR:
#136165
dam-ease commentedon Oct 10, 2023
Hi @VB10. Thanks for your response.
For the issue to be workable, it needs to be reproducible with a minimal complete code sample that doesn’t include 3rd party plugins or complex production code. Please are there any more information or a sample you could help with to reproduce this issue??
VB10 commentedon Oct 10, 2023
@dam-ease It has already been said to you, but I will try to explain it again. The searchbar does not support the leading options, so I couldn't share any code with you. The purpose of my PR can be understood if you look at it.
By the way, it will be helpful to you
Appbar theme only supports these fields; leadingWidth and auto. are not included.
dam-ease commentedon Oct 10, 2023
Thanks for your response and patience. I understand you now, I think a proposal would be better in this case. Can you please help with filing a separate detailed proposal, and then link the PR to it as this makes it easier to track?
VB10 commentedon Oct 10, 2023
Certainly, here's my proposal: @dam-ease
I propose adjusting the leadinWidth. On smaller devices, we encounter spacing issues, particularly when there's a text field. A larger space would rectify this.
I opt not to display a back button to conserve space. Instead, I'm using a close button, eliminating the need to navigate back.
The primary rationale behind these requirements is to address spacing constraints. Typically, I can modify the appbar properties to meet these needs. However, when utilizing SearchDelegate, I'm limited in making such adjustments.
1 remaining item
implemented leadingWidth and automaticallyImplyLeading options (#136165)
github-actions commentedon Dec 25, 2023
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.implemented leadingWidth and automaticallyImplyLeading options (flutt…