How to Use
To use this plugins, follow below steps
dependencies:
menstrual_cycle_widget: <latest_version>
$ flutter packages get
- Configuration
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()); }
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!;
Update configuration
Use
updateConfiguration
method to update your configuration.For Example
instance.updateConfiguration(cycleLength: 28, periodDuration: 5, userId: "1");
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