How to Use

To use this plugins, follow below steps

  1. Installation

    Add this to your package's pubspec.yaml file:


dependencies:
  menstrual_cycle_widget: <latest_version>
  1. Install it

    You can install packages from the command line:

$ flutter packages get
  1. Configuration

    1. Initialization

      MenstrualCycleWidget.init(secretKey: "<Your Secrey Key>", ivKey: "<Your ivKey>");must be called before using the package:

      For Example:

      void main() {
        WidgetsFlutterBinding.ensureInitialized();
        // Make sure to add the required packages to pubspec.yaml:
        // * https://pub.dev/packages/menstrual_cycle_widget
        MenstrualCycleWidget.init(secretKey: "11a1215l0119a140409p0919", ivKey: "23a1dfr5lyhd9a1404845001");
        runApp(const MyApp());
      }

    2. Create a instance of MenstrualCycleWidget

      This instance is use to update your configuration as well to access other functions of this package.

        final instance = MenstrualCycleWidget.instance!;

    3. Update configuration

      Use updateConfiguration method to update your configuration.

      For Example

      instance.updateConfiguration(cycleLength: 28, periodDuration: 5, userId: "1");

Parameters
Datatype
Description
Default Value

cycleLength

int

Required. Specifies the total number of cycle days in the menstrual cycle

required*

periodDuration

int

Required. Specifies the total number of period duration in the menstrual cycle

required*

customerId

String

Specifies the user id to store data.

0(Zero)

lastPeriodDate

DateTime

Specifies the last period date.

Null

isClearData

bool

Specifies true if you want to clear past data

false

defaultLanguage

Languages

Specifies the language which you want to use for widget.

english

fontFamily

String

Specifies the font name.

Last updated