clear search bar added

dev_3.13.6_search_lab_rad
haroon amjad 2 months ago
parent 7cd4b6c73a
commit f6fe367252

@ -21,14 +21,14 @@ var PACKAGES_ORDERS = '/api/orders';
var PACKAGES_ORDER_HISTORY = '/api/orders/items'; var PACKAGES_ORDER_HISTORY = '/api/orders/items';
var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
// var BASE_URL = 'http://10.50.100.198:2018/'; // var BASE_URL = 'http://10.50.100.198:2018/';
// var BASE_URL = 'https://uat.hmgwebservices.com/'; var BASE_URL = 'https://uat.hmgwebservices.com/';
// var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'http://10.201.204.103/'; // var BASE_URL = 'http://10.201.204.103/';
// var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; // var BASE_URL = 'https://orash.cloudsolutions.com.sa/';
// var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/';
// var BASE_URL = 'https://vidamergeuat.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidamergeuat.cloudsolutions.com.sa/';
var BASE_URL = 'https://webservices.hmg.com/'; // var BASE_URL = 'https://webservices.hmg.com/';
// var BASE_URL = 'http://10.50.100.198:4422/'; // var BASE_URL = 'http://10.50.100.198:4422/';
@ -354,7 +354,7 @@ var CAN_PAY_FOR_FOR_WALKIN_APPOINTMENT = 'Services/Doctors.svc/REST/CanPayForWal
var CHANNEL = 3; var CHANNEL = 3;
var GENERAL_ID = 'Cs2020@2016\$2958'; var GENERAL_ID = 'Cs2020@2016\$2958';
var IP_ADDRESS = '10.20.10.20'; var IP_ADDRESS = '10.20.10.20';
var VERSION_ID = 19.0; var VERSION_ID = 50.0;
var SETUP_ID = '91877'; var SETUP_ID = '91877';
var LANGUAGE = 2; var LANGUAGE = 2;
// var PATIENT_OUT_SA = 0; // var PATIENT_OUT_SA = 0;

@ -196,7 +196,7 @@ class LabsViewModel extends BaseViewModel {
return file.path; return file.path;
} }
searchLab(String searchParam, {bool isAutocomplete = false}) { searchLab(String searchParam, {bool isAutocomplete = false}) {
_showSuggestions = isAutocomplete; _showSuggestions = isAutocomplete;
if (searchParam.isEmpty) { if (searchParam.isEmpty) {
_showSuggestions =false; _showSuggestions =false;

@ -70,14 +70,17 @@ class _LabsHomePageState extends State<LabsHomePage> {
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[ child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
inputWidget(TranslationBase.of(context).searchLabResult, '', searchController, inputWidget(TranslationBase.of(context).searchLabResult, '', searchController,
suffix: IconButton( suffix: IconButton(
onPressed: () {}, onPressed: () {
if (searchController.text.isNotEmpty) {
searchController.clear();
model.searchLab('');
}
},
icon: Icon( icon: Icon(
Icons.search, searchController.text.isNotEmpty ? Icons.close : Icons.search,
size: 28, size: 28,
)), onChanged: (String? searchParam) { )), onChanged: (String? searchParam) {
model.searchLab(searchParam!, isAutocomplete: true); model.searchLab(searchParam!, isAutocomplete: true);
}) })
])), ])),
if (model.showSuggestions) _buildSuggestionsList(model), if (model.showSuggestions) _buildSuggestionsList(model),

@ -71,9 +71,14 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[ child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
inputWidget(TranslationBase.of(context).searchRadiology, '', searchController, inputWidget(TranslationBase.of(context).searchRadiology, '', searchController,
suffix: IconButton( suffix: IconButton(
onPressed: () {}, onPressed: () {
if (searchController.text.isNotEmpty) {
searchController.clear();
model.searchRadiology('');
}
},
icon: Icon( icon: Icon(
Icons.search, searchController.text.isNotEmpty ? Icons.close : Icons.search,
size: 28, size: 28,
)), onChanged: (String? searchParam) { )), onChanged: (String? searchParam) {
// if (searchParam!.length > 2) { // if (searchParam!.length > 2) {

@ -178,7 +178,7 @@ class PayfortService extends BaseService {
merchantReference: merchantReference!, merchantReference: merchantReference!,
currency: currency, currency: currency,
customerIp: (await _info.getWifiIP() ?? ''), customerIp: (await _info.getWifiIP() ?? ''),
language: 'en'); language: 'en', command: FortCommand.purchase);
_payfort.callPayFortForApplePay( _payfort.callPayFortForApplePay(
request: request, request: request,

@ -70,7 +70,7 @@ class AppToast {
child: toast, child: toast,
gravity: ToastGravity.TOP, gravity: ToastGravity.TOP,
toastDuration: Duration(seconds: timeInSeconds), toastDuration: Duration(seconds: timeInSeconds),
positionedToastBuilder: (context, child, _) { positionedToastBuilder: (context, child) {
return Positioned(top: 50, left: 10, right: 10, child: child); return Positioned(top: 50, left: 10, right: 10, child: child);
}); });
// Fluttertoast.showToast(msg: message, toastLength: toastLength, gravity: toastGravity, timeInSecForIosWeb: timeInSeconds, backgroundColor: Colors.red, textColor: textColor, fontSize: fontSize); // Fluttertoast.showToast(msg: message, toastLength: toastLength, gravity: toastGravity, timeInSecForIosWeb: timeInSeconds, backgroundColor: Colors.red, textColor: textColor, fontSize: fontSize);

Loading…
Cancel
Save