working on UCAF design
parent
00e2bb616d
commit
4b5bec8c50
@ -0,0 +1,107 @@
|
||||
import 'package:doctor_app_flutter/core/viewModel/patient-ucaf-viewmodel.dart';
|
||||
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
||||
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
||||
import 'package:doctor_app_flutter/util/helpers.dart';
|
||||
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||
import 'package:doctor_app_flutter/widgets/patients/profile/PatientHeaderWidgetNoAvatar.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hexcolor/hexcolor.dart';
|
||||
|
||||
class UcafDetailScreen extends StatefulWidget {
|
||||
@override
|
||||
_UcafDetailScreenState createState() => _UcafDetailScreenState();
|
||||
}
|
||||
|
||||
class _UcafDetailScreenState extends State<UcafDetailScreen> {
|
||||
|
||||
int _activeTap = 1;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
||||
PatiantInformtion patient = routeArgs['patient'];
|
||||
final screenSize = MediaQuery.of(context).size;
|
||||
|
||||
return BaseView<UcafViewModel>(
|
||||
builder: (_, model, w) => AppScaffold(
|
||||
baseViewModel: model,
|
||||
appBarTitle: TranslationBase.of(context).ucaf,
|
||||
body: Container(
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
PatientHeaderWidgetNoAvatar(patient),
|
||||
SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
Container(
|
||||
margin:
|
||||
EdgeInsets.symmetric(vertical: 16, horizontal: 16),
|
||||
child: Column(
|
||||
children: [
|
||||
treatmentStepsBar(context, screenSize),
|
||||
SizedBox(
|
||||
height: 16,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
));
|
||||
}
|
||||
|
||||
Widget treatmentStepsBar(BuildContext _context, Size screenSize) {
|
||||
List<String> __treatmentSteps = [
|
||||
TranslationBase.of(context).diagnosis.toUpperCase(),
|
||||
TranslationBase.of(context).medications.toUpperCase(),
|
||||
TranslationBase.of(context).procedures.toUpperCase(),
|
||||
];
|
||||
return Container(
|
||||
height: screenSize.height * 0.070,
|
||||
decoration:
|
||||
Helpers.containerBorderDecoration(Color(0Xffffffff), Color(0xFFCCCCCC)),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: __treatmentSteps.map((item) {
|
||||
bool _isActive = __treatmentSteps[_activeTap] == item ? true : false;
|
||||
return Expanded(
|
||||
child: InkWell(
|
||||
child: Center(
|
||||
child: Container(
|
||||
height: screenSize.height * 0.070,
|
||||
decoration: Helpers.containerBorderDecoration(
|
||||
_isActive ? HexColor("#B8382B") : Colors.white,
|
||||
_isActive ? HexColor("#B8382B") : Colors.white),
|
||||
child: Center(
|
||||
child: Text(
|
||||
item,
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: _isActive
|
||||
? Colors.white
|
||||
: Colors.black, //Colors.black,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
)),
|
||||
),
|
||||
onTap: () {
|
||||
print(__treatmentSteps.indexOf(item));
|
||||
setState(() {
|
||||
_activeTap = __treatmentSteps.indexOf(item);
|
||||
});
|
||||
},
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,73 @@
|
||||
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class PatientHeaderWidgetNoAvatar extends StatelessWidget {
|
||||
final PatiantInformtion patient;
|
||||
|
||||
PatientHeaderWidgetNoAvatar(this.patient);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.all(16),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
AppText(
|
||||
patient.firstName + ' ' + patient.lastName,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: SizeConfig.textMultiplier * 2.2,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
AppText(
|
||||
"VIP",
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: SizeConfig.textMultiplier * 2.2,
|
||||
),
|
||||
SizedBox(
|
||||
width: 8,
|
||||
),
|
||||
AppText(
|
||||
" ${patient.age}",
|
||||
fontWeight: FontWeight.normal,
|
||||
fontSize: SizeConfig.textMultiplier * 2.0,
|
||||
),
|
||||
],
|
||||
),
|
||||
AppText(
|
||||
"NEW VISIT",
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: SizeConfig.textMultiplier * 2.0,
|
||||
),
|
||||
AppText(
|
||||
"${patient.companyName}",
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: SizeConfig.textMultiplier * 2.0,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Icon(
|
||||
Icons.info_outline,
|
||||
color: Colors.black,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: 1,
|
||||
color: Color(0xffCCCCCC),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue