|
|
|
|
@ -2,6 +2,7 @@ import 'package:doctor_app_flutter/config/config.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/model/pharmacy-intervention-model/nursing_station.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
|
|
|
|
|
import 'package:dropdown_search/dropdown_search.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:intl/intl.dart';
|
|
|
|
|
|
|
|
|
|
@ -277,39 +278,75 @@ class _PharmacyInterventionDialogState
|
|
|
|
|
widget.station?.entityList?.isEmpty == true ? Expanded(
|
|
|
|
|
child: EmptyDropDown())
|
|
|
|
|
: Expanded(
|
|
|
|
|
child: DropdownButtonHideUnderline(
|
|
|
|
|
child: DropdownButton(
|
|
|
|
|
dropdownColor: Colors.white,
|
|
|
|
|
iconEnabledColor: Colors.black,
|
|
|
|
|
icon: Icon(Icons.keyboard_arrow_down),
|
|
|
|
|
isExpanded: true,
|
|
|
|
|
value: nursingStation == null
|
|
|
|
|
? widget.station?.entityList?.first
|
|
|
|
|
: nursingStation,
|
|
|
|
|
iconSize: 25,
|
|
|
|
|
elevation: 16,
|
|
|
|
|
onChanged: (newValue) async {
|
|
|
|
|
if (newValue != null)
|
|
|
|
|
setState(() {
|
|
|
|
|
nursingStation = newValue ;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
items:
|
|
|
|
|
widget.station?.entityList?.map((item) {
|
|
|
|
|
return DropdownMenuItem(
|
|
|
|
|
child: AppText(
|
|
|
|
|
item.description ?? '',
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
letterSpacing: -0.96,
|
|
|
|
|
color: AppGlobal.appTextColor,
|
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
|
textAlign: TextAlign.left,
|
|
|
|
|
),
|
|
|
|
|
value: item,
|
|
|
|
|
);
|
|
|
|
|
}).toList(),
|
|
|
|
|
child: DropdownSearch<NursingStationEntity>(
|
|
|
|
|
itemAsString:(item){
|
|
|
|
|
return item.description??'';
|
|
|
|
|
} ,
|
|
|
|
|
items: widget.station?.entityList ?? [],
|
|
|
|
|
popupProps: PopupProps.menu(
|
|
|
|
|
showSearchBox: true,
|
|
|
|
|
searchDelay: Duration(microseconds: 100),
|
|
|
|
|
searchFieldProps: TextFieldProps(
|
|
|
|
|
decoration: InputDecoration(
|
|
|
|
|
border: UnderlineInputBorder(),
|
|
|
|
|
hintText: TranslationBase.of(context).search
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
dropdownButtonProps: DropdownButtonProps(color: AppGlobal.appRedColor,),
|
|
|
|
|
dropdownDecoratorProps: DropDownDecoratorProps(
|
|
|
|
|
textAlignVertical: TextAlignVertical.center,
|
|
|
|
|
dropdownSearchDecoration: InputDecoration(
|
|
|
|
|
border: InputBorder.none
|
|
|
|
|
),
|
|
|
|
|
baseStyle: TextStyle(
|
|
|
|
|
fontSize: 14
|
|
|
|
|
)
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
selectedItem: nursingStation == null
|
|
|
|
|
? widget.station?.entityList?.first
|
|
|
|
|
: nursingStation,
|
|
|
|
|
onChanged: (newValue) async {
|
|
|
|
|
if (newValue != null)
|
|
|
|
|
setState(() {
|
|
|
|
|
nursingStation = newValue ;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
)
|
|
|
|
|
// DropdownButtonHideUnderline(
|
|
|
|
|
// child: DropdownButton(
|
|
|
|
|
// dropdownColor: Colors.white,
|
|
|
|
|
// iconEnabledColor: Colors.black,
|
|
|
|
|
// icon: Icon(Icons.keyboard_arrow_down),
|
|
|
|
|
// isExpanded: true,
|
|
|
|
|
// value: nursingStation == null
|
|
|
|
|
// ? widget.station?.entityList?.first
|
|
|
|
|
// : nursingStation,
|
|
|
|
|
// iconSize: 25,
|
|
|
|
|
// elevation: 16,
|
|
|
|
|
// onChanged: (newValue) async {
|
|
|
|
|
// if (newValue != null)
|
|
|
|
|
// setState(() {
|
|
|
|
|
// nursingStation = newValue ;
|
|
|
|
|
// });
|
|
|
|
|
// },
|
|
|
|
|
// items:
|
|
|
|
|
// widget.station?.entityList?.map((item) {
|
|
|
|
|
// return DropdownMenuItem(
|
|
|
|
|
// child: AppText(
|
|
|
|
|
// item.description ?? '',
|
|
|
|
|
// fontSize: 14,
|
|
|
|
|
// letterSpacing: -0.96,
|
|
|
|
|
// color: AppGlobal.appTextColor,
|
|
|
|
|
// fontWeight: FontWeight.normal,
|
|
|
|
|
// textAlign: TextAlign.left,
|
|
|
|
|
// ),
|
|
|
|
|
// value: item,
|
|
|
|
|
// );
|
|
|
|
|
// }).toList(),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
)
|
|
|
|
|
]);
|
|
|
|
|
}
|