import 'package:diplomaticquarterapp/core/model/labs/LabOrderResult.dart';
import 'package:diplomaticquarterapp/core/model/labs/lab_result.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:flutter/material.dart';

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

import 'LineChartCurved.dart';
import 'Lab_Result_details_wideget.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,
        ),
      ],
    );
  }

}
