import 'package:doctor_app_flutter/models/patient/vital_sign/vital_sign_res_model.dart';
import 'package:doctor_app_flutter/widgets/patients/vital_sign_details_wideget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_expandable_notifier.dart';
import 'package:doctor_app_flutter/widgets/shared/charts/app_time_series_chart.dart';
import 'package:flutter/material.dart';

/*
 *@author: Elham Rababah 
 *@Date:03/6/2020
 *@param:
 *@return:
 *@desc: VitalSingChartAndDetials
 */
class VitalSingChartAndDetials extends StatelessWidget {
  VitalSingChartAndDetials({
    Key key,
    @required this.vitalList,
    @required this.name,
    @required this.viewKey,
    @required this.title1,
    @required this.title2,
  }) : super(key: key);

  final List<VitalSignResModel> vitalList;
  final String name;
  final String viewKey;
  final String title1;
  final String title2;

  @override
  Widget build(BuildContext context) {
    return Column(
      children: <Widget>[
        AppExpandableNotifier(
          headerWid: AppTimeSeriesChart(
            vitalList: vitalList,
            chartName: name,
            viewKey: viewKey,
          ),
          bodyWid: VitalSignDetailsWidget(
            vitalList: vitalList.reversed.toList(),
            title1: '${title1}',
            title2: '${title2}',
            viewKey: '${viewKey}',
          ),
        ),
      ],
    );
  }
}
