|
|
|
@ -88,13 +88,7 @@ class _SearchEmployeeBottomSheetState extends State<SearchEmployeeBottomSheet> {
|
|
|
|
void fetchChatUser({bool isNeedLoading = true}) async {
|
|
|
|
void fetchChatUser({bool isNeedLoading = true}) async {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
Utils.showLoading(context);
|
|
|
|
Utils.showLoading(context);
|
|
|
|
|
|
|
|
|
|
|
|
chatUsersList = await ChatProviderModel().getChatMemberFromSearch(searchText, int.parse(AppState().chatDetails!.response!.id.toString()));
|
|
|
|
chatUsersList = await ChatProviderModel().getChatMemberFromSearch(searchText, int.parse(AppState().chatDetails!.response!.id.toString()));
|
|
|
|
print("================================");
|
|
|
|
|
|
|
|
print(jsonEncode(chatUsersList));
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// favouriteUserList = replacementList?.where((element) => element.isFavorite ?? false).toList();
|
|
|
|
|
|
|
|
// nonFavouriteUserList = replacementList?.where((element) => !(element.isFavorite ?? false)).toList();
|
|
|
|
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
setState(() {});
|
|
|
|
setState(() {});
|
|
|
|
} catch (e) {
|
|
|
|
} catch (e) {
|
|
|
|
@ -150,7 +144,6 @@ class _SearchEmployeeBottomSheetState extends State<SearchEmployeeBottomSheet> {
|
|
|
|
icon: Icon(Icons.search))
|
|
|
|
icon: Icon(Icons.search))
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
|
|
if (replacementList != null)
|
|
|
|
if (replacementList != null)
|
|
|
|
replacementList!.isEmpty
|
|
|
|
replacementList!.isEmpty
|
|
|
|
? Utils.getNoDataWidget(context).expanded
|
|
|
|
? Utils.getNoDataWidget(context).expanded
|
|
|
|
@ -187,8 +180,7 @@ class _SearchEmployeeBottomSheetState extends State<SearchEmployeeBottomSheet> {
|
|
|
|
]
|
|
|
|
]
|
|
|
|
],
|
|
|
|
],
|
|
|
|
).expanded,
|
|
|
|
).expanded,
|
|
|
|
|
|
|
|
if (widget.fromChat)
|
|
|
|
if(widget.fromChat)
|
|
|
|
|
|
|
|
if (chatUsersList != null && widget.fromChat)
|
|
|
|
if (chatUsersList != null && widget.fromChat)
|
|
|
|
chatUsersList!.isEmpty
|
|
|
|
chatUsersList!.isEmpty
|
|
|
|
? Utils.getNoDataWidget(context)
|
|
|
|
? Utils.getNoDataWidget(context)
|
|
|
|
@ -199,7 +191,6 @@ class _SearchEmployeeBottomSheetState extends State<SearchEmployeeBottomSheet> {
|
|
|
|
ListView.separated(
|
|
|
|
ListView.separated(
|
|
|
|
physics: const NeverScrollableScrollPhysics(),
|
|
|
|
physics: const NeverScrollableScrollPhysics(),
|
|
|
|
shrinkWrap: true,
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
|
|
|
|
|
|
|
itemBuilder: (cxt, index) {
|
|
|
|
itemBuilder: (cxt, index) {
|
|
|
|
return ListTile(
|
|
|
|
return ListTile(
|
|
|
|
leading: Stack(
|
|
|
|
leading: Stack(
|
|
|
|
@ -249,7 +240,6 @@ class _SearchEmployeeBottomSheetState extends State<SearchEmployeeBottomSheet> {
|
|
|
|
).expanded,
|
|
|
|
).expanded,
|
|
|
|
],
|
|
|
|
],
|
|
|
|
).paddingOnly(left: 21, right: 21, bottom: 0, top: 21).expanded,
|
|
|
|
).paddingOnly(left: 21, right: 21, bottom: 0, top: 21).expanded,
|
|
|
|
|
|
|
|
|
|
|
|
Container(width: double.infinity, height: 1, color: MyColors.lightGreyEFColor),
|
|
|
|
Container(width: double.infinity, height: 1, color: MyColors.lightGreyEFColor),
|
|
|
|
DefaultButton(
|
|
|
|
DefaultButton(
|
|
|
|
LocaleKeys.cancel.tr(),
|
|
|
|
LocaleKeys.cancel.tr(),
|
|
|
|
|