forked from eatvio/eatvio_app
feat(glossary): Glossary layouts and catergory load and change API
This commit is contained in:
@@ -23,6 +23,7 @@ class CustomDropDown extends StatelessWidget {
|
||||
this.filled = true,
|
||||
this.validator,
|
||||
this.onChanged,
|
||||
this.defaultValue,
|
||||
}) : super(
|
||||
key: key,
|
||||
);
|
||||
@@ -61,6 +62,8 @@ class CustomDropDown extends StatelessWidget {
|
||||
|
||||
final bool? filled;
|
||||
|
||||
final SelectionPopupModel? defaultValue;
|
||||
|
||||
final FormFieldValidator<SelectionPopupModel>? validator;
|
||||
|
||||
final Function(SelectionPopupModel)? onChanged;
|
||||
@@ -77,18 +80,19 @@ class CustomDropDown extends StatelessWidget {
|
||||
|
||||
_buildDropDownWidget(BuildContext context) {
|
||||
return SizedBox(
|
||||
width: width ?? double.maxFinite,
|
||||
width: width ?? MediaQuery.of(context).size.width - 20,
|
||||
child: DropdownButtonFormField<SelectionPopupModel>(
|
||||
focusNode: focusNode ?? FocusNode(),
|
||||
icon: icon,
|
||||
autofocus: autofocus!,
|
||||
isExpanded: true,
|
||||
style: textStyle ?? Theme.of(context).textTheme.titleMedium,
|
||||
items: items?.map((SelectionPopupModel item) {
|
||||
return DropdownMenuItem<SelectionPopupModel>(
|
||||
value: item,
|
||||
child: Text(
|
||||
item.title,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
overflow: TextOverflow.fade,
|
||||
style: hintStyle ?? Theme.of(context).textTheme.titleMedium,
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user