fix search part

merge-requests/598/head
Elham Rababah 5 years ago
parent c12818f1d0
commit 46b4ea25ea

@ -25,6 +25,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_field.dart';
import 'package:doctor_app_flutter/widgets/shared/text_fields/text_fields_utils.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:intl/intl.dart';
@ -151,7 +152,7 @@ class _PatientsScreenNewState extends State<PatientsScreenNew> {
//TranslationBase.of(context).all,
projectsProvider = Provider.of(context);
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
int _activeTab = 0;
// patient = widget.patientSearchForm != null
// ? widget.patientSearchForm
// : routeArgs['patientSearchForm'];
@ -180,6 +181,13 @@ class _PatientsScreenNewState extends State<PatientsScreenNew> {
// else
// patientTypeTitle = SERVICES_PATIANT_HEADER_AR[int.parse(patientType)];
List<String> _tabs = [
TranslationBase.of(context).inPatientAll.toUpperCase(),
TranslationBase.of(context).inPatient.toUpperCase(),
];
final screenSize = MediaQuery.of(context).size;
return BaseView<PatientSearchViewModel>(
onModelReady: (model) async {
if(widget.isSearchWithKeyInfo) {
@ -278,47 +286,64 @@ class _PatientsScreenNewState extends State<PatientsScreenNew> {
)
: Column(
children: <Widget>[
BottomSheetTitle(title: "Search for 1111",),
Container(
padding: EdgeInsets.only(
left: 0, right: 5, bottom: 5, top: 5),
decoration: BoxDecoration(
color: Colors.white,
),
height: 115,
child: Container(
padding: EdgeInsets.only(
left: 10, right: 10),
margin: EdgeInsets.only(top: 60),
child: Column(
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
RichText(
text: TextSpan(
style: TextStyle(
fontSize:20,
color: Colors.black),
children: <TextSpan>[
new TextSpan(
text: "Search for 1111",
style: TextStyle(
color: Color(0xFF2B353E),
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
fontSize: 22)),
],
Container(
// color: Colors.red,
height: screenSize.height * 0.070,
decoration: TextFieldsUtils.containerBorderDecoration(
Color(0Xffffffff), Color(0xFFCCCCCC),
borderRadius: 4, borderWidth: 0),
child: Row(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
children: _locations.map((item) {
bool _isActive = _locations[_activeLocation] == item ? true : false;
return Expanded(
child: InkWell(
onTap: () async {
// setState(() {
// _activeTab = _locations.indexOf(item);
// });
setState(() {
_activeLocation = _locations.indexOf(item);
});
GifLoaderDialogUtils.showMyDialog(context);
await model.getPatientBasedOnDate(item: item,
selectedPatientType: widget.selectedPatientType,
patientSearchRequestModel: widget
.patientSearchRequestModel,
isSearchWithKeyInfo: widget.isSearchWithKeyInfo);
GifLoaderDialogUtils.hideDialog(context);
},
child: Center(
child: Container(
height: screenSize.height * 0.070,
decoration: TextFieldsUtils.containerBorderDecoration(
_isActive
? Color(0xFFD02127 /*B8382B*/)
: Color(0xFFEAEAEA),
_isActive ? Color(0xFFD02127) : Color(0xFFEAEAEA),
borderRadius: 4,
borderWidth: 0),
child: Center(
child: AppText(
item,
fontSize: SizeConfig.textMultiplier * 1.8,
color: _isActive ? Colors.white : Color(0xFF2B353E),
fontWeight: FontWeight.w700,
),
),
),
],
),
),
],
),
);
}).toList(),
),
),
SizedBox(height: 18.5),
Container(
width: SizeConfig.screenWidth * 0.9,

Loading…
Cancel
Save