Menstrual cycle phase view

import 'package:menstrual_cycle_widget/menstrual_cycle_widget.dart';

class MenstrualCyclePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Menstrual Cycle Tracker'),
      ),
      body: MenstrualCyclePhaseView(
        size: 300,
        theme: MenstrualCycleTheme.arcs,
        phaseTextBoundaries: PhaseTextBoundaries.outside,
        isRemoveBackgroundPhaseColor: true,
        viewType: MenstrualCycleViewType.text,
        isAutoSetData: true,
      ),
    );
  }
}

Parameter

Parameters
Datatype
Description
Default Value

size

int

Required. Specifies the overall size of the MenstrualCyclePhaseView widget.

required*

isAutoSetData

bool

Sets true to get data automatically from calender view.

false

totalCycleDays

int

Specifies the total number of cycle days in the menstrual cycle

28

menstruationDayCount

int

Defines the number of days for the menstruation phase.

5

follicularDayCount

int

Defines the number of days for the follicular phase.

6

ovulationDayCount

int

int Defines the number of days for the ovulation phase.

5

imgSize

double

Specifies the size of the image in the central circle.

30

imageAssets

String

Sets the image to be displayed inside the central circle.

null

centralCircleBackgroundColor

Color

Sets the background color of the central circle.

NOTE: Only when viewType is MenstrualCycleViewType.circleImage or MenstrualCycleViewType.circleText

Colors.transparent

centralCircleSize

double

Specifies the size of the central circle.

NOTE: Only when viewType is MenstrualCycleViewType.circleImage or MenstrualCycleViewType.circleText

25

dayFontSize

double

Specifies the font size of the day numbers (1, 2, 3, etc.).

12

dayTextColor

Color

Specifies the font color of dat text.

Colors.black

dayTitleFontSize

double

Specifies the font size of the 'Day' title text.

12

isShowDayTitle

bool

Controls the visibility of the 'Day' title. Set to false to hide it.

true

menstruationBackgroundColor

Color

Sets the background color for the menstruation phase.

Color(0x26ff584f)

menstruationColor

Color

Sets the color for the menstruation phase.

Color(0xFFff584f)

menstruationDayTextColor

Color

Specifies the text color of the menstruation day numbers (1, 2, 3, etc.).

Colors.black

menstruationName

String

Specifies the menstruation phase name.

Menstruation

menstruationTextColor

Color

Specifies the text color of menstruation phase name.

Color(0xFFff584f)

follicularBackgroundColor

Color

Sets the background color for the follicular phase.

Color(0x26eec9b7)

follicularPhaseColor

Color

Sets the color for the follicular phase.

Color(0xFFeec9b7)

follicularPhaseDayTextColor

Color

Specifies the text color of the follicular day numbers (1, 2, 3, etc.).

Colors.black

follicularPhaseName

String

Specifies the follicular phase name.

Follicular phase

follicularTextColor

Color

Specifies the text color of follicular phase name.

Color(0xFFeec9b7)

ovulationBackgroundColor

Color

Sets the background color for the ovulation phase.

Color(0x2622bc79)

ovulationColor

Color

Sets the color for the ovulation phase.

Color(0xFF22bc79)

ovulationDayTextColor

Color

Specifies the text color of the ovulation day numbers (1, 2, 3, etc.).

Colors.black

ovulationName

String

Specifies the ovulation phase name.

Ovulation

ovulationTextColor

Color

Specifies the text color of ovulation phase name.

Color(0xFF22bc79)

lutealPhaseBackgroundColor

Color

Sets the background color for the luteal phase.

Color(0x26abcdf0)

lutealPhaseColor

Color

Sets the color for the luteal phase.

Color(0xFFabcdf0)

lutealPhaseDayTextColor

Color

Specifies the text color of the luteal day numbers (1, 2, 3, etc.).

Colors.black

lutealPhaseName

String

Specifies the follicular phase name.

Luteal phase

lutealPhaseTextColor

Color

Specifies the text color of follicular phase name.

Color(0xFFabcdf0)

phasesTextSize

double

Specifies font size of the phase days ('Menstruation', 'Follicular phase', 'Ovulation' and 'Luteal phase').

8

selectedDay

int

Specifies the current day of 'Menstrual Cycle Phase'.

-

selectedDayBackgroundColor

Color

Specifies the circle background of selected day.

white

selectedDayCircleBorderColor

Color

Specifies the circle border color of selected day. Default is based on selected day's background color.

-

selectedDayCircleSize

double

Specifies the circle size of selected day.

18

selectedDayTextColor

Color

Specifies the text color of the selected day.

Colors.black

selectedDayFontSize

double

Specifies the font size of the selected day.

12

dayFontWeight

FontWeight

Specifies the font weight of the day.

FontWeight.normal

circleDaySize

double

Specifies the size of the circle.

NOTE: Only when Theme is MenstrualCycleTheme.circle

-

theme

MenstrualCycleTheme

Specifies the theme of your menstrual widget .

MenstrualCycleTheme.basic

phaseTextBoundaries

PhaseTextBoundaries

Specifies where you have to show phase text ('Menstruation', 'Follicular phase', 'Ovulation' and 'Luteal phase'). Either is Inside circle (PhaseTextBoundaries.inside), Outside circle (PhaseTextBoundaries.outside) or Both (PhaseTextBoundaries.both).

PhaseTextBoundaries.inside

arcStrokeWidth

double

Specifies the size of the arc Stroke.

NOTE: Only when Theme is MenstrualCycleTheme.circle

30

outsidePhasesTextSize

double

Specifies the font size of outside phase text.

12

outsideTextCharSpace

int

Specifies the text character spaces of outside phase text.

3

outsideTextSpaceFromArc

int

Specifies the space between Arc circle and phase text.

30

centralCircleBorderColor

Color

Specifies the color of the central circle border.

NOTE: Only when viewType is MenstrualCycleViewType.circleImage or MenstrualCycleViewType.circleText

Colors.transparent

centralCircleBorderSize

int

Specifies the size of the central circle border.

NOTE: Only when viewType is MenstrualCycleViewType.circleImage or MenstrualCycleViewType.circleText

1

isRemoveBackgroundPhaseColor

bool

Set as true if you want want background color of phase.

false

viewType

MenstrualCycleViewType

Specifies view of your Menstrual Cycle Widget.

MenstrualCycleViewType.none

title

String

Specifies the title text of your central view.

NOTE: Only when viewType is MenstrualCycleViewType.text or MenstrualCycleViewType.circleText

-

titleTextColor

Color

Specifies the title text color of your central view.

NOTE: Only when viewType is MenstrualCycleViewType.text or MenstrualCycleViewType.circleText

Colors.black

titleTextSize

double

Specifies the title text size of your central view.

NOTE: Only when viewType is MenstrualCycleViewType.text or MenstrualCycleViewType.circleText

20

titleFontWeight

FontWeight

Specifies the title font weight of your central view.

NOTE: Only when viewType is MenstrualCycleViewType.text or MenstrualCycleViewType.circleText

FontWeight.bold

message

String

Specifies the message above title text of your central view.

NOTE: Only when viewType is MenstrualCycleViewType.text or MenstrualCycleViewType.circleText

message2

String

Specifies the message below title text of your central view.

NOTE: Only when viewType is MenstrualCycleViewType.text or MenstrualCycleViewType.circleText

messageTextColor

Color

Specifies the message text color of your central view.

NOTE: Only when viewType is MenstrualCycleViewType.text or MenstrualCycleViewType.circleText

Colors.black45

messageTextSize

double

Specifies the message text size of your central view.

NOTE: Only when viewType is MenstrualCycleViewType.text or MenstrualCycleViewType.circleText

10

messageFontWeight

FontWeight

Specifies the message font weight of your central view.

NOTE: Only when viewType is MenstrualCycleViewType.text or MenstrualCycleViewType.circleText

FontWeight.normal

spaceBtnTitleMessage

int

Specifies the space between title & message of your central view.

NOTE: Only when viewType is MenstrualCycleViewType.text or MenstrualCycleViewType.circleText

5

Last updated