import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/doctor_list.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';

class DeliveryDueResult extends StatelessWidget {
  var dateFrom;
  var dateTo;
  var conceivedDate;
  var deliveryDue;
  var firstTrimester;
  var secondTrimester;
  var thirdTrimester;
  DeliveryDueResult(
      {this.dateFrom,
      this.dateTo,
      this.conceivedDate,
      this.deliveryDue,
      this.firstTrimester,
      this.secondTrimester,
      this.thirdTrimester});
  @override
  Widget build(BuildContext context) {
    return AppScaffold(
      isShowAppBar: true,
      appBarTitle: 'Delivery Due Date',
      body: Padding(
        padding: EdgeInsets.symmetric(horizontal: 30.0, vertical: 12.0),
        child: SingleChildScrollView(
          child: Container(
            height: 750.0,
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              mainAxisAlignment: MainAxisAlignment.spaceEvenly,
              children: [
                Texts(
                  'The next ovulation period is estimated to be:',
                  fontWeight: FontWeight.w400,
                ),
                Texts(
                  'From:',
                  fontWeight: FontWeight.w400,
                ),
                Texts(DateFormat.yMMMEd().format(dateFrom),
                    fontWeight: FontWeight.w800, fontSize: 21.0, color: Color(0xffC5272D)),
                Texts(
                  'To:',
                  fontWeight: FontWeight.w400,
                ),
                Texts(DateFormat.yMMMEd().format(dateTo),
                    fontWeight: FontWeight.w800, fontSize: 21.0, color: Color(0xffC5272D)),
                Texts(
                  'You have conceived on:',
                  fontWeight: FontWeight.w400,
                ),
                Texts(
                  DateFormat.yMMMEd().format(conceivedDate),
                  fontWeight: FontWeight.w800,
                  fontSize: 21.0,
                ),
                Texts(
                  'First Trimester Ends (12 weeks):',
                  fontWeight: FontWeight.w400,
                ),
                Texts(
                  DateFormat.yMMMEd().format(firstTrimester),
                  fontWeight: FontWeight.w800,
                  fontSize: 21.0,
                ),
                Texts(
                  'Second Trimester Ends (27 weeks):',
                  fontWeight: FontWeight.w400,
                ),
                Texts(
                  DateFormat.yMMMEd().format(secondTrimester),
                  fontWeight: FontWeight.w800,
                  fontSize: 21.0,
                ),
                Texts(
                  'Third Trimester, Estimated Due Date (40 weeks):',
                  fontWeight: FontWeight.w400,
                ),
                Texts(
                  DateFormat.yMMMEd().format(thirdTrimester),
                  fontWeight: FontWeight.w800,
                  fontSize: 21.0,
                ),
                Container(
                  width: 350,
                  child: Button(
                    label: 'See List Of Doctors',
                    onTap: () {
                      Navigator.push(
                        context,
                        FadePage(page: DoctorList()),
                      );
                    },
                  ),
                ),
              ],
            ),
          ),
        ),
      ),
    );
  }
}
