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

Loading…
Cancel
Save