
import 'package:doctor_app_flutter/core/model/labs/LabOrderResult.dart';
import 'package:doctor_app_flutter/widgets/shared/app_expandable_notifier_new.dart';
import 'package:flutter/material.dart';

import 'package:charts_flutter/flutter.dart' as charts;

import 'Lab_Result_details_wideget.dart';
import 'LineChartCurved.dart';


class LabResultChartAndDetails extends StatelessWidget {
  LabResultChartAndDetails({
    Key key,
    @required this.labResult,
    @required this.name,
  }) : super(key: key);

  final List<LabOrderResult> labResult;
  final String name;


  @override
  Widget build(BuildContext context) {
    return Column(
      children: <Widget>[
        AppExpandableNotifier(
          headerWidget: Padding(
            padding: const EdgeInsets.all(8.0),
            child: LineChartCurved(title: name,labResult:labResult,),
          ),
          bodyWidget: LabResultDetailsWidget(
            labResult: labResult.reversed.toList(),
          ),
          isExpand: true,
        ),
      ],
    );
  }

}
