Comments (7)
Can you provide a minimal sample that produces the issue, please?
Also, What version are you using?
from dropdown_button2.
Can you provide a minimal sample that produces the issue, please? Also, What version are you using?
using dropdown_button2: ^2.3.9
here is code sample
` Padding workerJobDropMenuWidget() {
return Padding(
padding: EdgeInsets.symmetric(vertical: 8.0.h),
child: Obx(() => DropdownButtonFormField2<WorkerJob>(
focusNode: controller.workerJobFocusNode,
isExpanded: true,
decoration: dropMenuInputDecoration,
hint: Text(
'select_worker_job'.tr,
// style: const TextStyle(fontSize: 14),
),
value: controller.selectedWorkerJob.value.id == null
? null
: controller.selectedWorkerJob.value,
items: controller.workerJobList
.map((WorkerJob item) => DropdownMenuItem<WorkerJob>(
value: item,
child: Text(
Get.locale!.languageCode == "ar"
? item.arName!
: item.enName!,
style: const TextStyle(
fontSize: 14,
),
),
))
.toList(),
autovalidateMode: AutovalidateMode.onUserInteraction,
validator: (value) {
if (value == null) {
return 'pls_select_worker_job'.tr;
}
return null;
},
onChanged: (WorkerJob? value) =>
controller.selectedWorkerJob.value = value!,
onSaved: (WorkerJob? value) {
controller.selectedWorkerJob.value = value!;
},
style: Get.textTheme.bodyLarge!,
buttonStyleData: const ButtonStyleData(
padding: EdgeInsets.only(left: 8),
),
iconStyleData: const IconStyleData(
icon: Icon(
Icons.keyboard_arrow_down,
color: Colors.black,
weight: 2,
),
iconSize: 24,
),
dropdownStyleData: DropdownStyleData(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(5),
),
),
)),
);
}`
full class
`class AddWorkerStepOne extends GetWidget<AddWorkerController> {
final ScrollController scrollController = ScrollController();
AddWorkerStepOne({
super.key,
});
@override
Widget build(BuildContext context) {
// scroll to bottom when page is loaded
WidgetsBinding.instance.addPostFrameCallback((_) {
scrollController.animateTo(
scrollController.position.maxScrollExtent,
duration: const Duration(milliseconds: 500),
curve: Curves.easeOut,
);
});
return Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: SingleChildScrollView(
controller: scrollController,
reverse: true,
child: Form(
key: controller.stepOneFormKey,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('main_worker_data'.tr, style: Get.textTheme.titleLarge!),
16.verticalSpace,
Text('complete_worker_data'.tr,
style: Get.textTheme.bodyMedium!),
30.verticalSpace,
const WorkerNameTitle(),
WorkerNameEditText(controller: controller),
32.verticalSpace,
const WorkerJobTitle(),
workerJobDropMenuWidget(),
32.verticalSpace,
const WorkerSalaryTitle(),
SalaryEditText(controller: controller),
32.verticalSpace,
Text('worker_years_of_experience'.tr,
style: Get.textTheme.bodyLarge!),
yearsOfExperienceDropMenuWidget(),
32.verticalSpace,
Text('about_worker_bio'.tr, style: Get.textTheme.bodyLarge!),
WorkerBioTextEditField(controller: controller),
16.verticalSpace,
NextBtn(controller: controller),
32.verticalSpace,
],
),
),
),
),
);
}`
from dropdown_button2.
Can you test the code using latest beta version?
Also, I need a working sample without dependencies to be able to test it.
from dropdown_button2.
Hi @AhmedLSayed9 I tested with the beta verison and it fixed , but when i try to type one other edit text widget and return to drop menu i notice there is space between menu and edit text as this video shows
RPReplay_Final1702639909.MP4
from dropdown_button2.
@heshesh2010 Can you provider a minimal working sample?
from dropdown_button2.
@heshesh2010 Can you provider a minimal working sample?
it was my mistake that i wrapped the drop-menu widget with reversed SingleChildScrollView with reverse: true,
do u know why then set reverse: true i got this animating behaviour on drop menu list space ?
from dropdown_button2.
do u know why then set reverse: true i got this animating behaviour on drop menu list space ?
I'm not sure what's the reason tbh. It needs a reproducible sample and further investigating.
from dropdown_button2.
Related Issues (20)
- Cannot simultaneously update items and values in beta HOT 2
- The splash effect goes above the error / validation text
- Close programatically on Escape pressed HOT 4
- How can i create menu items with exactly height for each element
- Not possible to have label, text and dropdown values all aligned with OutlineInputBorder HOT 2
- Show selected item when page initialized HOT 6
- onChanged doesn't work when using multiValueListenable HOT 2
- DropdownButtonFormField2 initial value
- barrierCoversButton: false property not working
- Not resetting the search querry before reopening the menu breaks the dropdown menu scroll position calculation algorithm
- The package interferes with TextField HOT 1
- Being able to set the errorText
- Ink splashes get displayed over search widget HOT 2
- Disable focus on DropdownItem HOT 4
- How to wrap TapRegion with groupID around DropdownButtonFormField2 to track TapInside / TapOutside with other TapRegions
- Add an ability to override comparator function HOT 8
- The border does not change to red on validation error HOT 5
- On mobile once keyboard open it's pushing the dropdown to top HOT 6
- Use onMenuStateChange & FocusNode for TextField not working
- How to change disabled style?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dropdown_button2.