Repository: PalisadoesFoundation/talawa (language: dart)

Issue:
Mobile - Add support to recurring events.
**Is your feature request related to a problem? Please describe.**
Implement `recurring events` functionality into Talawa mobile. 

**Describe the solution you'd like**
- The event creation screen(s) should have functionality to create recurring events.
          1. weeks
          2. months 
          3. days 
          4. weekdays 
- The Calendar screen(s) should display all the created recurring events.
- The edit event screen(s) should have funcitonality to edit these recurring events.
          1. All instances in the series
          2. Just the instance in question
          3. The instance in question and all those in future
- Make use of updated `event mutations` to implement the described functionality.
- The screen(s) design must follow the guidelines of Talawa Design System found here:
          - https://docs.talawa.io/docs/design/ux/ux-design-system
- Other functionality must not be affected.
- Write tests and achieve 100% code coverage to all the new functionality added.

**Describe alternatives you've considered**
   N/A

**Approach to be followed (optional)**
   - see above.

**Additional context**
   1. related issues:
       - https://github.com/PalisadoesFoundation/talawa-api/issues/1583#issue-2057545112
   2. related PRs:
       - https://github.com/PalisadoesFoundation/talawa-api/pull/1658#issue-2069943639
       - https://github.com/PalisadoesFoundation/talawa-api/pull/1712#issue-2086753320

**Potential internship candidates**
Please read this if you are planning to apply for a Palisadoes Foundation internship https://github.com/PalisadoesFoundation/talawa/issues/359



Discussion hints:
@palisadoes please have a look at this issue and do let me know if any follow ups and if I missedout on any thing.
@Azad99-9 
You are requested to hold off for some time as there is currently a discussion underway regarding whether we should follow a denormalized approach or another one. 
Once it is confirmed, there may be some tweaks that need to be made in the weekly recurring events PR. Until then, please wait. 
Thank you for your understanding
Sure @Community-Programmer 
@Cioppolo14 @noman2002 I would like to work on this, please assign me.

As the implementation of this feature in backend is in progress, meanwhile i will start working on the UI part of this issue.
This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.
Working on this, as the recent PR related to this issue in Talawa API has been closed.
This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.
HI @Azad99-9 are you still working on this?

@Olatade yes I am working on this. There is a backend dependency.
@palisadoes @noman2002 The implementation of this feature requires multiple files to be changed.
- Creation of new Model & View models.
- Modificaton & addition of new Queries.
- New UI changes.

I have also had a word with @meetulr, 2 more PRs related to event updation & deletion are also about to come.

So meanwhile i am thinking to split this issue into multiple PRs and raise them one by one.
This was expected. Large PRs are too difficult to review effectively.
@palisadoes @noman2002 please review the UI and suggest changes if any.
**Note** Api integration not yet done. For now UI is built. 
If finalized i will raise a PR for the same. I will make a seperate PR for Api integration.

https://github.com/PalisadoesFoundation/talawa/assets/120930148/42adca5d-8f0f-4d1d-8e75-3e8a5a8fb61c







1. Yes this is good
2. Use this to test your work against the API PR in review:
    1. https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally
@palisadoes @Cioppolo14 still API integration work is pending with this issue. Please reopen this so that I can raise a PR for the same.
Api integration completed, writing tests. Will raise the PR by tomorrow.

Pull request: Integrated create recurrence event API.
<!--
This section can be deleted after reading.

We employ the following branching strategy to simplify the development process and to ensure that only stable code is pushed to the `master` branch:

- `develop`: For unstable code: New features and bug fixes.
- `master`: Where the stable production ready code lies. Only security related bugs.

NOTE!!!

ONLY SUBMIT PRS AGAINST OUR `DEVELOP` BRANCH. THE DEFAULT IS `MAIN`, SO YOU WILL HAVE TO MODIFY THIS BEFORE SUBMITTING YOUR PR FOR REVIEW. PRS MADE AGAINST `MAIN` WILL BE CLOSED.
-->

<!--
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request.
-->

**What kind of change does this PR introduce?**

This PR integrates the create recurring event API and adds functionality to create custom recurrence event.

**Issue Number:**

Fixes #2341 

**Did you add tests for your changes?**

Yes

**Snapshots/Videos:**


https://github.com/PalisadoesFoundation/talawa/assets/120930148/0dc53265-c0bf-4cd0-8844-7422711a9e91



**If relevant, did you update the documentation?**

<!--Add link to Talawa-Docs.-->

**Summary**

This PR is a follow up PR to #2386, where the UI was built and this PR integrates the api and makes the UI fully functional.

**Does this PR introduce a breaking change?**

No

**Other information**

<!--Add extra information about this PR here-->

**Have you read the [contributing guide](https://github.com/PalisadoesFoundation/talawa/blob/master/CONTRIBUTING.md)?**

Yes


Test command: nan

Fix patch:
diff --git a/lib/constants/recurrence_values.dart b/lib/constants/recurrence_values.dart
new file mode 100644
index 0000000000..c6393aa06c
--- /dev/null
+++ b/lib/constants/recurrence_values.dart
@@ -0,0 +1,53 @@
+/// Class containing constants for recurrence options.
+class Recurrance {
+  /// Constant representing an event that does not repeat.
+  static const once = 'Does not repeat';
+
+  /// Constant representing daily recurrence.
+  static const daily = 'day';
+
+  /// Constant representing weekly recurrence.
+  static const weekly = 'week';
+
+  /// Constant representing monthly recurrence.
+  static const monthly = 'month';
+
+  /// Constant representing yearly recurrence.
+  static const yearly = 'year';
+
+  /// Constant representing a custom recurrence.
+  static const custom = 'custom...';
+
+  /// Constant representing Monday in weekdays.
+  static const weekdayMonday = 'MO';
+
+  /// Constant representing Tuesday in weekdays.
+  static const weekdayTuesday = 'TU';
+
+  /// Constant representing Wednesday in weekdays.
+  static const weekdayWednesday = 'WE';
+
+  /// Constant representing Thursday in weekdays.
+  static const weekdayThursday = 'TH';
+
+  /// Constant representing Friday in weekdays.
+  static const weekdayFriday = 'FR';
+
+  /// Constant representing Saturday in weekdays.
+  static const weekdaySaturday = 'SA';
+
+  /// Constant representing Sunday in weekdays.
+  static const weekdaySunday = 'SU';
+}
+
+/// Class containing constants for event end types.
+class EventEndTypes {
+  /// Constant representing an event that never ends.
+  static const never = 'Never';
+
+  /// Constant representing an event that ends on a specific date.
+  static const on = 'On';
+
+  /// Constant representing an event that ends after a specified number of occurrences.
+  static const after = 'After';
+}
diff --git a/lib/router.dart b/lib/router.dart
index 5c5f9b3a3f..a7ed05754d 100644
--- a/lib/router.dart
+++ b/lib/router.dart
@@ -8,6 +8,7 @@ import 'package:talawa/models/organization/org_info.dart';
 import 'package:talawa/models/post/post_model.dart';
 import 'package:talawa/splash_screen.dart';
 import 'package:talawa/view_model/after_auth_view_models/chat_view_models/direct_chat_view_model.dart';
+import 'package:talawa/view_model/after_auth_view_models/event_view_models/create_event_view_model.dart';
 import 'package:talawa/views/after_auth_screens/add_post_page.dart';
 import 'package:talawa/views/after_auth_screens/app_settings/app_settings_page.dart';
 import 'package:talawa/views/after_auth_screens/chat/chat_message_screen.dart';
@@ -199,9 +200,12 @@ Route<dynamic> generateRoute(RouteSettings settings) {
 
     // Returns the CreateEventPage Widget
     case Routes.customRecurrencePage:
+      final model = settings.arguments! as CreateEventViewModel;
       return MaterialPageRoute(
-        builder: (context) =>
-            CustomRecurrencePage(key: const Key('CreateEvent')),
+        builder: (context) => CustomRecurrencePage(
+          key: const Key('CreateEvent'),
+          model: model,
+        ),
       );
 
     // Returns the ProfilePage Widget
diff --git a/lib/utils/event_queries.dart b/lib/utils/event_queries.dart
index 6944de83fa..d3f5ec5cb8 100644
--- a/lib/utils/event_queries.dart
+++ b/lib/utils/event_queries.dart
@@ -80,35 +80,8 @@ class EventQueries {
   /// This function generates a GraphQL mutation string for creating an event.
   String addEvent() {
     return """
-     mutation createEvent( \$organizationId: ID!,
-        \$title:String!,
-        \$description: String!,
-        \$startTime: Time,
-        \$endTime: Time,
-        \$allDay: Boolean!,
-        \$recurring: Boolean!,
-        \$isPublic: Boolean!,
-        \$isRegisterable: Boolean!,
-        \$location: String,
-        \$startDate : Date!,
-        \$endDate : Date!,
-      ) { 
-      createEvent(
-        data:{
-          organizationId: \$organizationId,
-           title: \$title,
-           description: \$description,
-           isPublic: \$isPublic,
-           isRegisterable: \$isRegisterable,
-           recurring: \$recurring,
-           allDay: \$allDay,
-           startTime: \$startTime,
-           endTime: \$endTime,
-           startDate: \$startDate,
-           endDate: \$endDate,
-           location: \$location,
-        }
-      ){
+    mutation Mutation(\$data: EventInput!, \$recurrenceRuleData: RecurrenceRuleInput) {
+      createEvent(data: \$data, recurrenceRuleData: \$recurrenceRuleData) {
         _id
         title
         description
diff --git a/lib/view_model/after_auth_view_models/event_view_models/create_event_view_model.dart b/lib/view_model/after_auth_view_models/event_view_models/create_event_view_model.dart
index bcd6d257ee..3baf49052d 100644
--- a/lib/view_model/after_auth_view_models/event_view_models/create_event_view_model.dart
+++ b/lib/view_model/after_auth_view_models/event_view_models/create_event_view_model.dart
@@ -1,6 +1,7 @@
 import 'dart:io';
 import 'package:flutter/material.dart';
 import 'package:intl/intl.dart';
+import 'package:talawa/constants/recurrence_values.dart';
 import 'package:talawa/locator.dart';
 import 'package:talawa/models/organization/org_info.dart';
 import 'package:talawa/models/user/user_info.dart';
@@ -35,6 +36,13 @@ class CreateEventViewModel extends BaseModel {
   TextEditingController eventDescriptionTextController =
       TextEditingController();
 
+  /// Repeats Every count controller.
+  TextEditingController repeatsEveryCountController =
+      TextEditingController(text: '1');
+
+  /// Event ends After n occurences controller.
+  TextEditingController endOccurenceController = TextEditingController();
+
   /// Event Start Time.
   TimeOfDay eventStartTime = TimeOfDay.now();
 
@@ -48,7 +56,7 @@ class CreateEventViewModel extends BaseModel {
   DateTime eventStartDate = DateTime.now();
 
   /// Event End Date.
-  DateTime eventEndDate = DateTime.now();
+  DateTime? eventEndDate = DateTime.now();
 
   /// Public Event or Not.
   bool isPublicSwitch = true;
@@ -71,6 +79,33 @@ class CreateEventViewModel extends BaseModel {
   /// Longitude store.
   double? longitude;
 
+  /// is an allday event.
+  bool isAllDay = true;
+
+  /// Is a recurring event.
+  bool isRecurring = false;
+
+  /// recurrence count.
+  int recurranceCount = 1;
+
+  /// recurrence.
+  String? recurrance;
+
+  /// RecurranceRuleData frequency.
+  String recurranceFrequency = Recurrance.weekly;
+
+  /// Monthly recurrence.
+  String monthlyRecurrence = 'Monthly on day 3';
+
+  /// weekdays.
+  Set<String> weekdays = {Recurrance.weekdayTuesday};
+
+  /// Event end type.
+  String eventEndType = EventEndTypes.never;
+
+  /// Custom recurrance event end date.
+  DateTime? eventEndOnEndDate = DateTime.now();
+
   //late OrganizationService _organizationService;
   late final Map<String, bool> _memberCheckedMap = {};
   late final List<User> _selectedMembers = [];
@@ -150,39 +185,50 @@ class CreateEventViewModel extends BaseModel {
       validate = AutovalidateMode.disabled;
 
       // variables initialisation
-      final DateTime startDate = eventStartDate;
-      final DateTime endDate = eventEndDate;
       final DateTime startTime = DateTime(
-        startDate.year,
-        startDate.month,
-        startDate.day,
+        eventStartDate.year,
+        eventStartDate.month,
+        eventStartDate.day,
         eventStartTime.hour,
         eventStartTime.minute,
       );
       final DateTime endTime = DateTime(
-        endDate.year,
-        endDate.month,
-        endDate.day,
+        eventEndDate?.year ?? DateTime.now().year,
+        eventEndDate?.month ?? DateTime.now().month,
+        eventEndDate?.day ?? DateTime.now().day,
         eventEndTime.hour,
         eventEndTime.minute,
       );
 
+      final String? frequency = getRecurrance(recurranceFrequency);
+
       // all required data for creating an event
       final Map<String, dynamic> variables = {
-        'startDate': DateFormat('yyyy-MM-dd').format(startDate),
-        'endDate': DateFormat('yyyy-MM-dd').format(endDate),
-        'organizationId': _currentOrg.id,
-        'title': eventTitleTextController.text,
-        'description': eventDescriptionTextController.text,
-        'location': eventLocationTextController.text,
-        'isPublic': isPublicSwitch,
-        'isRegisterable': isRegisterableSwitch,
-        'recurring': false,
-        'allDay': false,
-        'startTime': '${DateFormat('HH:mm:ss').format(startTime)}Z',
-        'endTime': '${DateFormat('HH:mm:ss').format(endTime)}Z',
-        if (latitude != null) 'latitude': latitude,
-        if (longitude != null) 'longitude': longitude,
+        "data": {
+          'startDate': DateFormat('yyyy-MM-dd').format(eventStartDate),
+          if (eventEndDate != null)
+            'endDate': DateFormat('yyyy-MM-dd').format(eventEndDate!),
+          'organizationId': _currentOrg.id,
+          'title': eventTitleTextController.text,
+          'description': eventDescriptionTextController.text,
+          'location': eventLocationTextController.text,
+          'isPublic': isPublicSwitch,
+          'isRegisterable': isRegisterableSwitch,
+          'recurring': isRecurring,
+          'recurrance': recurrance ?? frequency,
+          'allDay': isAllDay,
+          'startTime': '${DateFormat('HH:mm:ss').format(startTime)}Z',
+          if (eventEndDate != null)
+            'endTime': '${DateFormat('HH:mm:ss').format(endTime)}Z',
+          if (latitude != null) 'latitude': latitude,
+          if (longitude != null) 'longitude': longitude,
+        },
+        if (recurrance == null)
+          'recurrenceRuleData': {
+            if (eventEndType != EventEndTypes.never) 'count': recurranceCount,
+            'frequency': frequency,
+            if (frequency == 'WEEKLY') 'weekDays': List.from(weekdays),
+          },
       };
 
       navigationService.pushDialog(
@@ -194,6 +240,7 @@ class CreateEventViewModel extends BaseModel {
         EventQueries().addEvent(),
         variables: variables,
       );
+      print(result);
       navigationService.pop();
       if (result != null) {
         navigationService.pop();
@@ -288,4 +335,41 @@ class CreateEventViewModel extends BaseModel {
 
     notifyListeners();
   }
+
+  /// Updates the event end date to selected event end date.
+  ///
+  /// **params**:
+  /// * `selectedEndDate`: new event end date selected by user.
+  ///
+  /// **returns**:
+  ///   None
+  void setEventEndDate(DateTime? selectedEndDate) {
+    eventEndDate = selectedEndDate;
+    notifyListeners();
+  }
+
+  /// Returns corresponding recurrence value based on frequency.
+  ///
+  /// **params**:
+  /// * `frequency`: Recurrence frequency selected by user.
+  ///
+  /// **returns**:
+  /// * `String?`: Recurrence value.
+  String? getRecurrance(String frequency) {
+    isRecurring = true;
+    if (frequency == Recurrance.daily || frequency == 'Every day') {
+      return 'DAILY';
+    } else if (frequency == Recurrance.weekly || frequency == 'Every week') {
+      return 'WEEKLY';
+    } else if (frequency == Recurrance.monthly || frequency == 'Every month') {
+      return 'MONTHLY';
+    } else if (frequency == Recurrance.yearly || frequency == 'Every year') {
+      return 'YEARLY';
+    } else if (frequency == Recurrance.once) {
+      isRecurring = false;
+      return null;
+    } else {
+      return null;
+    }
+  }
 }
diff --git a/lib/views/after_auth_screens/events/create_custom_recurring_event.dart b/lib/views/after_auth_screens/events/create_custom_recurring_event.dart
index ce038eb005..51e38b3a09 100644
--- a/lib/views/after_auth_screens/events/create_custom_recurring_event.dart
+++ b/lib/views/after_auth_screens/events/create_custom_recurring_event.dart
@@ -1,21 +1,33 @@
 import 'package:flutter/material.dart';
+import 'package:talawa/constants/recurrence_values.dart';
+import 'package:talawa/locator.dart';
 import 'package:talawa/services/size_config.dart';
 import 'package:talawa/utils/app_localization.dart';
+import 'package:talawa/view_model/after_auth_view_models/event_view_models/create_event_view_model.dart';
 import 'package:talawa/widgets/create_recurring_event_helper_widgets.dart';
 import 'package:talawa/widgets/custom_weekday_selector.dart';
 
 /// custom padding.
 final _sectionPadding = SizeConfig.blockSizeHorizontal! * 8;
 
-/// Enables users to define their customRecurrence event.
-class CustomRecurrencePage extends StatelessWidget {
-  CustomRecurrencePage({super.key});
+/// Widget to build custom recurrence page.
+class CustomRecurrencePage extends StatefulWidget {
+  const CustomRecurrencePage({super.key, required this.model});
 
-  final TextEditingController _repeatFrequencyTextController =
-      TextEditingController();
+  /// Instance of create event view model.
+  final CreateEventViewModel model;
+
+  @override
+  State<CustomRecurrencePage> createState() => _CustomRecurrencePageState();
+}
+
+class _CustomRecurrencePageState extends State<CustomRecurrencePage> {
+  /// Instance of create event view model.
+  late CreateEventViewModel viewModel;
 
   @override
   Widget build(BuildContext context) {
+    viewModel = widget.model;
     return Scaffold(
       appBar: AppBar(
         backgroundColor: Theme.of(context).primaryColor,
@@ -30,7 +42,17 @@ class CustomRecurrencePage extends StatelessWidget {
         ),
         actions: [
           TextButton(
-            onPressed: () {},
+            onPressed: () {
+              if (viewModel.eventEndType == EventEndTypes.never) {
+                viewModel.setEventEndDate(null);
+              } else if (viewModel.eventEndType == EventEndTypes.on) {
+                viewModel.eventEndDate = viewModel.eventEndOnEndDate;
+              } else if (viewModel.eventEndType == EventEndTypes.after) {
+                viewModel.recurranceCount =
+                    int.parse(viewModel.endOccurenceController.text);
+              }
+              navigationService.pop();
+            },
             child: const Text('Done'),
           ),
         ],
@@ -63,23 +85,49 @@ class CustomRecurrencePage extends StatelessWidget {
             ],
           ),
         ),
-        buildCustomDivider(context),
-        Container(
-          padding: EdgeInsets.fromLTRB(
-            _sectionPadding,
-            _sectionPadding,
-            90,
-            _sectionPadding,
-          ),
-          child: Column(
-            crossAxisAlignment: CrossAxisAlignment.start,
-            children: [
-              inputFieldHeading('Repeats on'),
-              CustomWeekDaySelector(),
-            ],
-          ),
-        ),
-        buildCustomDivider(context),
+        recurrenceisDailyorYearly()
+            ? buildCustomDivider(context)
+            : Column(
+                children: [
+                  buildCustomDivider(context),
+                  Container(
+                    padding: EdgeInsets.fromLTRB(
+                      _sectionPadding,
+                      _sectionPadding,
+                      90,
+                      _sectionPadding,
+                    ),
+                    child: viewModel.recurranceFrequency == Recurrance.monthly
+                        ? Row(
+                            children: [
+                              RecurrenceFrequencyDropdown(
+                                model: viewModel,
+                                options: [
+                                  'Monthly on day 3',
+                                  'Monthly on the first Sunday',
+                                ],
+                                selectedOption: viewModel.monthlyRecurrence,
+                                onSelected: (String value) {
+                                  setState(() {
+                                    viewModel.monthlyRecurrence = value;
+                                  });
+                                },
+                              ),
+                            ],
+                          )
+                        : Column(
+                            crossAxisAlignment: CrossAxisAlignment.start,
+                            children: [
+                              inputFieldHeading('Repeats on'),
+                              CustomWeekDaySelector(
+                                model: viewModel,
+                              ),
+                            ],
+                          ),
+                  ),
+                  buildCustomDivider(context),
+                ],
+              ),
         Column(
           crossAxisAlignment: CrossAxisAlignment.start,
           children: [
@@ -88,7 +136,9 @@ class CustomRecurrencePage extends StatelessWidget {
                   EdgeInsets.only(top: _sectionPadding, left: _sectionPadding),
               child: inputFieldHeading('Ends'),
             ),
-            const EventEndOptions(),
+            EventEndOptions(
+              model: viewModel,
+            ),
           ],
         ),
       ],
@@ -110,25 +160,26 @@ class CustomRecurrencePage extends StatelessWidget {
           child: CustomTextField(
             key: const Key('inputsection1TextField'),
             maxTextLength: 2,
-            textEditingController: _repeatFrequencyTextController,
+            textEditingController: viewModel.repeatsEveryCountController,
           ),
         ),
         SizedBox(
           width: SizeConfig.screenWidth! * 0.03,
         ),
-        CustomRectangle(
-          child: Container(
-            padding: const EdgeInsets.all(12),
-            child: Center(
-              child: Row(
-                mainAxisAlignment: MainAxisAlignment
-                    .center, // Align the row's contents to the center horizontally
-                children: [
-                  RecurrenceFrequencyDropdown(),
-                ],
-              ),
-            ),
-          ),
+        RecurrenceFrequencyDropdown(
+          model: viewModel,
+          options: [
+            Recurrance.daily,
+            Recurrance.weekly,
+            Recurrance.monthly,
+            Recurrance.yearly,
+          ],
+          selectedOption: viewModel.recurranceFrequency,
+          onSelected: (String value) {
+            setState(() {
+              viewModel.recurranceFrequency = value;
+            });
+          },
         ),
       ],
     );
@@ -165,4 +216,17 @@ class CustomRecurrencePage extends StatelessWidget {
       color: Theme.of(context).hintColor,
     );
   }
+
+  /// Determines whether the recurrence frequency is daily or yearly.
+  ///
+  /// **params**:
+  ///   None
+  ///
+  /// **returns**:
+  /// * `bool`: A boolean value indicating whether the recurrence frequency is daily or yearly.
+  bool recurrenceisDailyorYearly() {
+    final widgetModel = viewModel;
+    return widgetModel.recurranceFrequency == Recurrance.daily ||
+        widgetModel.recurranceFrequency == Recurrance.yearly;
+  }
 }
diff --git a/lib/views/after_auth_screens/events/create_event_page.dart b/lib/views/after_auth_screens/events/create_event_page.dart
index d9047e9879..ba5f2a770f 100644
--- a/lib/views/after_auth_screens/events/create_event_page.dart
+++ b/lib/views/after_auth_screens/events/create_event_page.dart
@@ -1,4 +1,5 @@
 import 'package:flutter/material.dart';
+import 'package:talawa/constants/recurrence_values.dart';
 import 'package:talawa/enums/enums.dart';
 import 'package:talawa/locator.dart';
 import 'package:talawa/services/navigation_service.dart';
@@ -25,6 +26,8 @@ class CreateEventPage extends StatefulWidget {
 
 /// _CreateEventPageState returns a widget for a Page to Creatxe the Event in the Organization.
 class _CreateEventPageState extends State<CreateEventPage> {
+  /// Recurrence label of recurrence selection button.
+  String recurrenceLabel = Recurrance.once;
   @override
   Widget build(BuildContext context) {
     final TextStyle subtitleTextStyle =
@@ -33,6 +36,7 @@ class _CreateEventPageState extends State<CreateEventPage> {
     return BaseView<CreateEventViewModel>(
       onModelReady: (model) => model.initialize(),
       builder: (context, model, child) {
+        print(model.recurrance);
         return Scaffold(
           // AppBar is the header of the page
           appBar: AppBar(
@@ -94,7 +98,9 @@ class _CreateEventPageState extends State<CreateEventPage> {
                         ),
                         TextButton(
                           key: const Key('txt_btn_cep'),
-                          onPressed: () => model.getImageFromGallery(),
+                          onPressed: () {
+                            model.getImageFromGallery();
+                          },
                           child: Text(
                             AppLocalizations.of(context)!
                                 .strictTranslate("Add Image"),
@@ -208,11 +214,12 @@ class _CreateEventPageState extends State<CreateEventPage> {
                     ),
                     DateTimeTile(
                       key: const Key('key for test cep'),
-                      date: "${model.eventEndDate.toLocal()}".split(' ')[0],
+                      date: "${model.eventEndDate?.toLocal() ?? DateTime.now()}"
+                          .split(' ')[0],
                       time: model.eventEndTime.format(context),
                       setDate: () async {
                         final date = await customDatePicker(
-                          initialDate: model.eventEndDate,
+                          initialDate: model.eventEndDate ?? DateTime.now(),
                         );
                         final startDate = model.eventStartDate;
                         if (startDate.compareTo(date) < 0) {
@@ -260,18 +267,25 @@ class _CreateEventPageState extends State<CreateEventPage> {
                           ),
                           Text(
                             AppLocalizations.of(context)!
-                                .strictTranslate('Does not repeat'),
+                                .strictTranslate(recurrenceLabel),
                             style: subtitleTextStyle,
                           ),
                         ],
                       ),
-                      onTap: () {
-                        showDialog(
+                      onTap: () async {
+                        final String? selectedReccurence;
+                        selectedReccurence = await showDialog(
                           context: context,
                           builder: (context) {
-                            return const ShowRecurrenceDialog();
+                            return ShowRecurrenceDialog(
+                              model: model,
+                              initialRecurrence: recurrenceLabel,
+                            );
                           },
                         );
+                        setState(() {
+                          recurrenceLabel = selectedReccurence!;
+                        });
                       },
                     ),
                     SizedBox(height: SizeConfig.screenHeight! * 0.026),
@@ -286,7 +300,31 @@ class _CreateEventPageState extends State<CreateEventPage> {
                             children: [
                               Text(
                                 AppLocalizations.of(context)!
-                                    .strictTranslate('Keep Public'),
+                                    .strictTranslate('Keep Registerable'),
+                                style: subtitleTextStyle,
+                              ),
+                              SizedBox(
+                                width: SizeConfig.screenWidth! * 0.005,
+                              ),
+                              Switch(
+                                value: model.isRegisterableSwitch,
+                                onChanged: (value) {
+                                  setState(() {
+                                    model.isRegisterableSwitch = value;
+                                    print(model.isRegisterableSwitch);
+                                  });
+                                },
+                                activeColor:
+                                    Theme.of(context).colorScheme.primary,
+                              ),
+                            ],
+                          ),
+                          Row(
+                            mainAxisSize: MainAxisSize.min,
+                            children: [
+                              Text(
+                                AppLocalizations.of(context)!
+                                    .strictTranslate('All day'),
                                 style: subtitleTextStyle,
                               ),
                               SizedBox(
@@ -294,11 +332,11 @@ class _CreateEventPageState extends State<CreateEventPage> {
                               ),
                               Switch(
                                 // Switch to select the visibility of the event.
-                                value: model.isPublicSwitch,
+                                value: model.isAllDay,
                                 onChanged: (value) {
                                   setState(() {
-                                    model.isPublicSwitch = value;
-                                    print(model.isPublicSwitch);
+                                    model.isAllDay = value;
+                                    print(model.isAllDay);
                                   });
                                 },
                                 activeColor:
@@ -311,18 +349,19 @@ class _CreateEventPageState extends State<CreateEventPage> {
                             children: [
                               Text(
                                 AppLocalizations.of(context)!
-                                    .strictTranslate('Keep Registerable'),
+                                    .strictTranslate('Keep Public'),
                                 style: subtitleTextStyle,
                               ),
                               SizedBox(
                                 width: SizeConfig.screenWidth! * 0.005,
                               ),
                               Switch(
-                                value: model.isRegisterableSwitch,
+                                // Switch to select the visibility of the event.
+                                value: model.isPublicSwitch,
                                 onChanged: (value) {
                                   setState(() {
-                                    model.isRegisterableSwitch = value;
-                                    print(model.isRegisterableSwitch);
+                                    model.isPublicSwitch = value;
+                                    print(model.isPublicSwitch);
                                   });
                                 },
                                 activeColor:
diff --git a/lib/views/after_auth_screens/events/event_calendar.dart b/lib/views/after_auth_screens/events/event_calendar.dart
index 5e6779f6c4..7c7a4a2f28 100644
--- a/lib/views/after_auth_screens/events/event_calendar.dart
+++ b/lib/views/after_auth_screens/events/event_calendar.dart
@@ -123,11 +123,28 @@ _AppointmentDataSource _getCalendarDataSource(List<Event> eventsList) {
   int index = 0;
   // looping through all the events created in the organization.
   eventsList.forEach((event) {
-    final startDate = DateFormat('yMd').parse(event.startDate!);
+    DateTime? startDate;
+    DateTime? endDate;
+
+    /// change made here, code related to the fix.
+    if (event.startDate!.contains('/')) {
+      startDate = DateFormat('MM/dd/yyyy').parse(event.startDate!);
+    } else {
+      startDate = DateFormat('yyyy-MM-dd').parse(event.startDate!);
+    }
+
+    /// change made here, code related to the fix.
+    if (event.endDate!.contains('/')) {
+      endDate = DateFormat('MM/dd/yyyy').parse(event.endDate!);
+    } else {
+      endDate = DateFormat('yyyy-MM-dd').parse(event.endDate!);
+    }
+
+    // final startDate = DateFormat('yMd').parse(event.startDate!);
     print("${event.startTime!}##############################");
     final startTime = parseTime(event.startTime ?? '14:23:01');
     // .parse(event.startTime!);
-    final endDate = DateFormat('yMd').parse(event.endDate!);
+    // final endDate = DateFormat('yMd').parse(event.endDate!);
     final endTime = parseTime(event.endTime ?? '21:23:01');
 
     // adding appointments on the calender for event[index] date time.
diff --git a/lib/widgets/create_recurring_event_helper_widgets.dart b/lib/widgets/create_recurring_event_helper_widgets.dart
index d10f88c629..16c31b1bcd 100644
--- a/lib/widgets/create_recurring_event_helper_widgets.dart
+++ b/lib/widgets/create_recurring_event_helper_widgets.dart
@@ -1,6 +1,9 @@
 import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
 import 'package:intl/intl.dart';
+import 'package:talawa/constants/recurrence_values.dart';
 import 'package:talawa/services/size_config.dart';
+import 'package:talawa/view_model/after_auth_view_models/event_view_models/create_event_view_model.dart';
 import 'package:talawa/widgets/date_time_picker.dart';
 
 /// Builds a rectangle with custom properties.
@@ -33,16 +36,24 @@ class CustomRectangle extends StatelessWidget {
 class CustomTextField extends StatelessWidget {
   const CustomTextField({
     super.key,
-    required this.maxTextLength,
+    this.maxTextLength,
     required this.textEditingController,
+    this.readOnly = false,
+    this.enabled,
   });
 
   /// Max textLength the text field allows.
-  final int maxTextLength;
+  final int? maxTextLength;
 
   /// Controller of textField.
   final TextEditingController textEditingController;
 
+  /// Indicates wether text field is enabled.
+  final bool? enabled;
+
+  /// Indicates wether text field is read only.
+  final bool readOnly;
+
   @override
   Widget build(BuildContext context) {
     final outLineBorder = OutlineInputBorder(
@@ -55,14 +66,18 @@ class CustomTextField extends StatelessWidget {
         maxLength: maxTextLength,
         textAlign: TextAlign.center,
         keyboardType: TextInputType.number,
+        inputFormatters: [FilteringTextInputFormatter.digitsOnly],
         controller: textEditingController,
         decoration: InputDecoration(
           counterText: "",
           enabledBorder: outLineBorder,
           focusedBorder: outLineBorder,
           border: outLineBorder,
+          disabledBorder: outLineBorder,
           contentPadding: const EdgeInsets.symmetric(vertical: 14),
         ),
+        enabled: enabled,
+        readOnly: readOnly,
       ),
     );
   }
@@ -70,6 +85,25 @@ class CustomTextField extends StatelessWidget {
 
 /// Recurrence Frequency selection widget.
 class RecurrenceFrequencyDropdown extends StatefulWidget {
+  const RecurrenceFrequencyDropdown({
+    required this.model,
+    required this.onSelected,
+    required this.options,
+    required this.selectedOption,
+  });
+
+  /// Instance of create event view model.
+  final CreateEventViewModel model;
+
+  /// Callback to be executed when selected value changes.
+  final void Function(String)? onSelected;
+
+  /// Options to be shown in dropdown.
+  final List<String> options;
+
+  /// Selected option.
+  final String selectedOption;
+
   @override
   _RecurrenceFrequencyDropdownState createState() =>
       _RecurrenceFrequencyDropdownState();
@@ -77,36 +111,40 @@ class RecurrenceFrequencyDropdown extends StatefulWidget {
 
 class _RecurrenceFrequencyDropdownState
     extends State<RecurrenceFrequencyDropdown> {
-  /// Frequency options.
-  List<String> options = ['day', 'week', 'month', 'year'];
-
-  late String _selectedOption = 'week';
-
   @override
   Widget build(BuildContext context) {
-    return PopupMenuButton<String>(
-      offset: const Offset(0, 40),
-      itemBuilder: (BuildContext context) {
-        return <PopupMenuEntry<String>>[
-          for (int i = 0; i < options.length; i++)
-            PopupMenuItem<String>(
-              value: options[i],
-              child: Text(options[i]),
-            ),
-        ];
-      },
-      onSelected: (String value) {
-        setState(() {
-          _selectedOption = value;
-        });
-      },
-      tooltip: 'Select option',
-      child: Row(
-        mainAxisAlignment: MainAxisAlignment.center,
-        children: [
-          Text(_selectedOption),
-          const Icon(Icons.arrow_drop_down),
-        ],
+    return CustomRectangle(
+      child: Container(
+        padding: const EdgeInsets.all(12),
+        child: Center(
+          child: Row(
+            mainAxisAlignment: MainAxisAlignment
+                .center, // Align the row's contents to the center horizontally
+            children: [
+              PopupMenuButton<String>(
+                offset: const Offset(0, 40),
+                itemBuilder: (BuildContext context) {
+                  return <PopupMenuEntry<String>>[
+                    for (int i = 0; i < widget.options.length; i++)
+                      PopupMenuItem<String>(
+                        value: widget.options[i],
+                        child: Text(widget.options[i]),
+                      ),
+                  ];
+                },
+                onSelected: widget.onSelected,
+                tooltip: 'Select option',
+                child: Row(
+                  mainAxisAlignment: MainAxisAlignment.center,
+                  children: [
+                    Text(widget.selectedOption),
+                    const Icon(Icons.arrow_drop_down),
+                  ],
+                ),
+              ),
+            ],
+          ),
+        ),
       ),
     );
   }
@@ -114,40 +152,60 @@ class _RecurrenceFrequencyDropdownState
 
 /// Event ending configuration options.
 class EventEndOptions extends StatefulWidget {
-  const EventEndOptions({super.key});
+  const EventEndOptions({super.key, required this.model});
+
+  /// Instance of create event view model.
+  final CreateEventViewModel model;
 
   @override
   State<EventEndOptions> createState() => _EventEndOptionsState();
 }
 
 class _EventEndOptionsState extends State<EventEndOptions> {
-  /// Event ending frequency.
-  static List<String> frequency = [
-    'Never',
-    'On',
-    'After',
+  /// Event end types.
+  List<String> eventEndTypes = [
+    EventEndTypes.never,
+    EventEndTypes.on,
+    EventEndTypes.after,
   ];
-  String _selectedFrequency = frequency[0];
-  DateTime _endDate = DateTime.now();
-  final TextEditingController _repeatFrequencyTextController =
-      TextEditingController();
 
   /// Custom inline width.
   static const inlineWidth = SizedBox(
     width: 8,
   );
 
+  @override
+  void initState() {
+    if (widget.model.eventEndType == EventEndTypes.never) {
+      widget.model.eventEndDate = null;
+    }
+    super.initState();
+  }
+
   @override
   Widget build(BuildContext context) {
+    print(widget.model.eventEndType);
+    print(widget.model.recurrance);
+    print(widget.model.recurranceFrequency);
     return Column(
       children: [
-        radioButton(const Key('neverRadioButton'), Text(frequency[0]), 0),
         radioButton(
-          const Key('onRadioButton'),
-          Row(
+          key: const Key('neverRadioButton'),
+          child: const Text(EventEndTypes.never),
+          index: 0,
+          inputAction: () {
+            widget.model.setEventEndDate(null);
+            setState(() {
+              widget.model.eventEndType = EventEndTypes.never;
+            });
+          },
+        ),
+        radioButton(
+          key: const Key('onRadioButton'),
+          child: Row(
             crossAxisAlignment: CrossAxisAlignment.center,
             children: [
-              Text(frequency[1]),
+              const Text(EventEndTypes.on),
               inlineWidth,
               CustomRectangle(
                 child: Container(
@@ -157,60 +215,92 @@ class _EventEndOptionsState extends State<EventEndOptions> {
                     // button to select the date and time of an event.
                     onPressed: () async {
                       // initially pickedDate is initialised with current end time.
-                      final pickedDate =
-                          await customDatePicker(initialDate: _endDate);
+                      final pickedDate = await customDatePicker(
+                        initialDate:
+                            widget.model.eventEndOnEndDate ?? DateTime.now(),
+                      );
                       setState(() {
-                        _endDate = pickedDate;
+                        widget.model.eventEndOnEndDate = pickedDate;
+                        widget.model.eventEndType = EventEndTypes.on;
                       });
                     },
-                    icon: Text(formatDate(_endDate.toString().split(" ")[0])),
+                    icon: Text(
+                      formatDate(
+                        widget.model.eventEndOnEndDate.toString().split(" ")[0],
+                      ),
+                      style: widget.model.eventEndType == EventEndTypes.on
+                          ? TextStyle(color: Theme.of(context).dividerColor)
+                          : TextStyle(
+                              color: Theme.of(context)
+                                  .dividerColor
+                                  .withOpacity(0.4),
+                            ),
+                    ),
                   ),
                 ),
               ),
             ],
           ),
-          1,
+          index: 1,
+          inputAction: () {
+            setState(() {
+              widget.model.eventEndType = EventEndTypes.on;
+            });
+          },
         ),
         radioButton(
-          const Key('afterRadioButton'),
-          Row(
+          key: const Key('afterRadioButton'),
+          child: Row(
             children: [
-              Text(frequency[2]),
+              const Text(EventEndTypes.after),
               inlineWidth,
               CustomTextField(
+                enabled: widget.model.eventEndType == EventEndTypes.after,
                 maxTextLength: 3,
-                textEditingController: _repeatFrequencyTextController,
+                textEditingController: widget.model.endOccurenceController,
               ),
               inlineWidth,
               const Text('occurrence'),
             ],
           ),
-          2,
+          index: 2,
+          inputAction: () {
+            setState(() {
+              widget.model.eventEndType = EventEndTypes.after;
+            });
+          },
         ),
       ],
     );
   }
 
-  /// Custom radio button to select event ending frequency.
+  /// Custom radio button to select event ending eventEndType.
   ///
   /// **params**:
   /// * `key`: Uniquely identifies the radioButton.
   /// * `child`: RadioListTile widget.
-  /// * `index`: index of [frequency].
+  /// * `index`: index of [eventEndType].
+  /// * `inputAction`: Call back to be executed when clicked on radio button.
   ///
   /// **returns**:
   /// * `Theme`: custom theme.
-  Theme radioButton(Key key, Widget child, int index) {
+  Theme radioButton({
+    required Key key,
+    required Widget child,
+    required int index,
+    Function()? inputAction,
+  }) {
     return Theme(
       key: key,
       data: Theme.of(context).copyWith(focusColor: Colors.transparent),
       child: RadioListTile<String>(
         title: child,
-        value: frequency[index],
-        groupValue: _selectedFrequency,
+        value: eventEndTypes[index],
+        groupValue: widget.model.eventEndType,
         onChanged: (value) {
           setState(() {
-            _selectedFrequency = value!;
+            widget.model.eventEndType = value!;
+            inputAction?.call();
           });
         },
       ),
diff --git a/lib/widgets/custom_weekday_selector.dart b/lib/widgets/custom_weekday_selector.dart
index e19d33fe7c..6f60696642 100644
--- a/lib/widgets/custom_weekday_selector.dart
+++ b/lib/widgets/custom_weekday_selector.dart
@@ -1,37 +1,47 @@
 import 'package:flutter/material.dart';
+import 'package:talawa/constants/recurrence_values.dart';
+import 'package:talawa/view_model/after_auth_view_models/event_view_models/create_event_view_model.dart';
 
 /// Custom Widget to select weekdays.
 class CustomWeekDaySelector extends StatefulWidget {
+  const CustomWeekDaySelector({required this.model});
+
+  /// instance of create event view model.
+  final CreateEventViewModel model;
+
   @override
   _CustomWeekDaySelectorState createState() => _CustomWeekDaySelectorState();
 }
 
 class _CustomWeekDaySelectorState extends State<CustomWeekDaySelector> {
-  /// Keeps track of week days that are selected.
-  List<bool> isSelected = List.generate(7, (_) => false);
-
   @override
   Widget build(BuildContext context) {
-    print('came');
+    final Set<String> weekdays = widget.model.weekdays;
     return Container(
       child: Row(
         mainAxisAlignment: MainAxisAlignment.spaceBetween,
-        children: List.generate(
-          7,
-          (index) => GestureDetector(
+        children: List.generate(7, (index) {
+          final weekday = _getWeekdayAbbreviation(index);
+          return GestureDetector(
             onTap: () {
               setState(() {
-                isSelected[index] = !isSelected[index];
+                if (weekdays.contains(weekday)) {
+                  weekdays.remove(weekday);
+                } else {
+                  weekdays.add(weekday);
+                }
               });
             },
             child: Container(
               width: 30,
               height: 30,
               decoration: BoxDecoration(
-                color: Colors.transparent,
+                color: weekdays.contains(weekday)
+                    ? Theme.of(context).colorScheme.primary.withOpacity(0.5)
+                    : Colors.transparent,
                 border: Border.all(
-                  width: 0.5,
-                  color: isSelected[index]
+                  width: weekdays.contains(weekday) ? 2 : 1,
+                  color: weekdays.contains(weekday)
                       ? Theme.of(context).colorScheme.primary
                       : Theme.of(context).dividerColor,
                 ),
@@ -39,18 +49,16 @@ class _CustomWeekDaySelectorState extends State<CustomWeekDaySelector> {
               ),
               child: Center(
                 child: Text(
-                  _getWeekdayAbbreviation(index),
+                  weekday[0],
                   style: TextStyle(
-                    color: isSelected[index]
-                        ? Theme.of(context).colorScheme.primary
-                        : Theme.of(context).dividerColor,
+                    color: Theme.of(context).dividerColor,
                     fontWeight: FontWeight.bold,
                   ),
                 ),
               ),
             ),
-          ),
-        ),
+          );
+        }),
       ),
     );
   }
@@ -65,19 +73,19 @@ class _CustomWeekDaySelectorState extends State<CustomWeekDaySelector> {
   String _getWeekdayAbbreviation(int index) {
     switch (index) {
       case 0:
-        return 'S';
+        return Recurrance.weekdaySunday;
       case 1:
-        return 'M';
+        return Recurrance.weekdayMonday;
       case 2:
-        return 'T';
+        return Recurrance.weekdayTuesday;
       case 3:
-        return 'W';
+        return Recurrance.weekdayWednesday;
       case 4:
-        return 'T';
+        return Recurrance.weekdayThursday;
       case 5:
-        return 'F';
+        return Recurrance.weekdayFriday;
       case 6:
-        return 'S';
+        return Recurrance.weekdaySaturday;
       default:
         return '';
     }
diff --git a/lib/widgets/recurrence_dialog.dart b/lib/widgets/recurrence_dialog.dart
index 402daea913..348460a9f9 100644
--- a/lib/widgets/recurrence_dialog.dart
+++ b/lib/widgets/recurrence_dialog.dart
@@ -2,27 +2,45 @@ import 'package:flutter/material.dart';
 import 'package:talawa/constants/routing_constants.dart';
 import 'package:talawa/locator.dart';
 import 'package:talawa/services/size_config.dart';
+import 'package:talawa/view_model/after_auth_view_models/event_view_models/create_event_view_model.dart';
 
 /// Dialog for showing recurrence options.
 class ShowRecurrenceDialog extends StatefulWidget {
-  const ShowRecurrenceDialog({super.key});
+  const ShowRecurrenceDialog({
+    super.key,
+    required this.model,
+    required this.initialRecurrence,
+  });
+
+  final CreateEventViewModel model;
+  final String initialRecurrence;
 
   @override
   State<ShowRecurrenceDialog> createState() => _ShowRecurrenceDialogState();
 }
 
 class _ShowRecurrenceDialogState extends State<ShowRecurrenceDialog> {
+  static const donotRepeat = "Does not repeat";
+  static const dialy = "Every day";
+  static const weekly = "Every week";
+  static const monthly = "Every month";
+  static const yearly = "Every year";
+  static const custom = "Custom...";
+
   static const List<String> _frequencies = [
-    "Does not repeat",
-    "Every day",
-    "Every week",
-    "Every month",
-    "Every year",
-    "Custom...",
+    donotRepeat,
+    dialy,
+    weekly,
+    monthly,
+    yearly,
+    custom,
   ];
-  String _frequency = _frequencies[0];
+
+  late String _frequency;
   @override
   Widget build(BuildContext context) {
+    _frequency = widget.initialRecurrence;
+    print('widget built');
     return Dialog(
       child: SizedBox(
         height: SizeConfig.screenHeight! * 0.5,
@@ -49,13 +67,18 @@ class _ShowRecurrenceDialogState extends State<ShowRecurrenceDialog> {
       title: Text(frequency),
       value: frequency,
       groupValue: _frequency,
-      onChanged: (value) {
+      onChanged: (value) async {
         // navigate to custom recurrence page when pressed custom... button.
+        widget.model.recurrance = widget.model.getRecurrance(value!);
         if (value == _frequencies[5]) {
-          navigationService.pushScreen(Routes.customRecurrencePage);
+          await navigationService.pushScreen(
+            Routes.customRecurrencePage,
+            arguments: widget.model,
+          );
         }
         setState(() {
-          _frequency = value!;
+          _frequency = value;
+          Navigator.pop(context, _frequency);
         });
       },
     );


Test patch:
diff --git a/test/helpers/setup_hive.mocks.dart b/test/helpers/setup_hive.mocks.dart
index dc67dfd0a5..8b4dfda4a8 100644
--- a/test/helpers/setup_hive.mocks.dart
+++ b/test/helpers/setup_hive.mocks.dart
@@ -1,5 +1,5 @@
-// Mocks generated by Mockito 5.4.3 from annotations
-// in talawa/test/utils/encryptor_test.dart.
+// Mocks generated by Mockito 5.4.4 from annotations
+// in talawa/test/helpers/setup_hive.dart.
 // Do not manually edit this file.
 
 // ignore_for_file: no_leading_underscores_for_library_prefixes
diff --git a/test/helpers/test_helpers.dart b/test/helpers/test_helpers.dart
index 250a4a9147..ee66b2ffb4 100644
--- a/test/helpers/test_helpers.dart
+++ b/test/helpers/test_helpers.dart
@@ -587,6 +587,18 @@ CreateEventViewModel getAndRegisterCreateEventModel() {
 
   when(cachedViewModel.memberCheckedMap).thenReturn(mapType);
 
+  when(cachedViewModel.isAllDay).thenReturn(true);
+
+  when(cachedViewModel.eventStartTime).thenReturn(TimeOfDay.now());
+
+  when(cachedViewModel.eventEndTime).thenReturn(
+    TimeOfDay.now().replacing(
+      hour:
+          (TimeOfDay.now().hour + (TimeOfDay.now().minute >= 30 ? 1 : 0)) % 24,
+      minute: (TimeOfDay.now().minute + 30) % 60,
+    ),
+  );
+
   when(cachedViewModel.removeUserFromList(userId: "fakeUser1"))
       .thenAnswer((realInvocation) async {
     when(cachedViewModel.selectedMembers).thenReturn([]);
diff --git a/test/helpers/test_helpers.mocks.dart b/test/helpers/test_helpers.mocks.dart
index a6253957f7..d602a48227 100644
--- a/test/helpers/test_helpers.mocks.dart
+++ b/test/helpers/test_helpers.mocks.dart
@@ -4,54 +4,54 @@
 
 // ignore_for_file: no_leading_underscores_for_library_prefixes
 import 'dart:async' as _i5;
-import 'dart:io' as _i21;
+import 'dart:io' as _i19;
 import 'dart:ui' as _i10;
 
-import 'package:connectivity_plus/connectivity_plus.dart' as _i28;
+import 'package:connectivity_plus/connectivity_plus.dart' as _i27;
 import 'package:connectivity_plus_platform_interface/connectivity_plus_platform_interface.dart'
-    as _i29;
+    as _i28;
 import 'package:flutter/material.dart' as _i1;
 import 'package:graphql_flutter/graphql_flutter.dart' as _i3;
-import 'package:image_cropper/src/cropper.dart' as _i43;
+import 'package:image_cropper/src/cropper.dart' as _i41;
 import 'package:image_cropper_platform_interface/image_cropper_platform_interface.dart'
-    as _i44;
+    as _i42;
 import 'package:image_picker/image_picker.dart' as _i13;
 import 'package:mockito/mockito.dart' as _i2;
-import 'package:mockito/src/dummies.dart' as _i16;
+import 'package:mockito/src/dummies.dart' as _i25;
 import 'package:qr_code_scanner/src/qr_code_scanner.dart' as _i34;
 import 'package:qr_code_scanner/src/types/barcode.dart' as _i35;
 import 'package:qr_code_scanner/src/types/camera.dart' as _i36;
 import 'package:qr_code_scanner/src/types/features.dart' as _i12;
-import 'package:talawa/enums/enums.dart' as _i17;
-import 'package:talawa/models/chats/chat_list_tile_data_model.dart' as _i24;
-import 'package:talawa/models/chats/chat_message.dart' as _i25;
-import 'package:talawa/models/events/event_model.dart' as _i22;
+import 'package:talawa/enums/enums.dart' as _i14;
+import 'package:talawa/models/chats/chat_list_tile_data_model.dart' as _i22;
+import 'package:talawa/models/chats/chat_message.dart' as _i23;
+import 'package:talawa/models/events/event_model.dart' as _i20;
 import 'package:talawa/models/organization/org_info.dart' as _i6;
-import 'package:talawa/models/post/post_model.dart' as _i15;
+import 'package:talawa/models/post/post_model.dart' as _i17;
 import 'package:talawa/models/user/user_info.dart' as _i7;
-import 'package:talawa/services/chat_service.dart' as _i23;
+import 'package:talawa/services/chat_service.dart' as _i21;
 import 'package:talawa/services/comment_service.dart' as _i37;
 import 'package:talawa/services/database_mutation_functions.dart' as _i9;
 import 'package:talawa/services/event_service.dart' as _i11;
-import 'package:talawa/services/graphql_config.dart' as _i18;
+import 'package:talawa/services/graphql_config.dart' as _i15;
 import 'package:talawa/services/navigation_service.dart' as _i8;
-import 'package:talawa/services/org_service.dart' as _i31;
-import 'package:talawa/services/post_service.dart' as _i19;
+import 'package:talawa/services/org_service.dart' as _i30;
+import 'package:talawa/services/post_service.dart' as _i16;
 import 'package:talawa/services/third_party_service/multi_media_pick_service.dart'
-    as _i20;
-import 'package:talawa/services/user_config.dart' as _i26;
+    as _i18;
+import 'package:talawa/services/user_config.dart' as _i24;
 import 'package:talawa/utils/validators.dart' as _i33;
 import 'package:talawa/view_model/after_auth_view_models/chat_view_models/direct_chat_view_model.dart'
-    as _i42;
+    as _i40;
 import 'package:talawa/view_model/after_auth_view_models/event_view_models/create_event_view_model.dart'
-    as _i41;
+    as _i39;
 import 'package:talawa/view_model/after_auth_view_models/event_view_models/explore_events_view_model.dart'
-    as _i32;
+    as _i31;
 import 'package:talawa/view_model/after_auth_view_models/feed_view_models/organization_feed_view_model.dart'
-    as _i14;
-import 'package:talawa/view_model/lang_view_model.dart' as _i27;
+    as _i32;
+import 'package:talawa/view_model/lang_view_model.dart' as _i26;
 import 'package:talawa/view_model/pre_auth_view_models/signup_details_view_model.dart'
-    as _i30;
+    as _i29;
 import 'package:talawa/view_model/theme_view_model.dart' as _i38;
 import 'package:talawa/widgets/custom_alert_dialog.dart' as _i4;
 
@@ -337,220 +337,6 @@ class _FakeLostDataResponse_24 extends _i2.SmartFake
         );
 }
 
-/// A class which mocks [OrganizationFeedViewModel].
-///
-/// See the documentation for Mockito's code generation for more information.
-class MockOrganizationFeedViewModel extends _i2.Mock
-    implements _i14.OrganizationFeedViewModel {
-  MockOrganizationFeedViewModel() {
-    _i2.throwOnMissingStub(this);
-  }
-
-  @override
-  bool get istest => (super.noSuchMethod(
-        Invocation.getter(#istest),
-        returnValue: false,
-      ) as bool);
-
-  @override
-  set istest(bool? _istest) => super.noSuchMethod(
-        Invocation.setter(
-          #istest,
-          _istest,
-        ),
-        returnValueForMissingStub: null,
-      );
-
-  @override
-  List<_i15.Post> get posts => (super.noSuchMethod(
-        Invocation.getter(#posts),
-        returnValue: <_i15.Post>[],
-      ) as List<_i15.Post>);
-
-  @override
-  List<_i15.Post> get userPosts => (super.noSuchMethod(
-        Invocation.getter(#userPosts),
-        returnValue: <_i15.Post>[],
-      ) as List<_i15.Post>);
-
-  @override
-  List<_i15.Post> get pinnedPosts => (super.noSuchMethod(
-        Invocation.getter(#pinnedPosts),
-        returnValue: <_i15.Post>[],
-      ) as List<_i15.Post>);
-
-  @override
-  String get currentOrgName => (super.noSuchMethod(
-        Invocation.getter(#currentOrgName),
-        returnValue: _i16.dummyValue<String>(
-          this,
-          Invocation.getter(#currentOrgName),
-        ),
-      ) as String);
-
-  @override
-  bool get isFetchingPosts => (super.noSuchMethod(
-        Invocation.getter(#isFetchingPosts),
-        returnValue: false,
-      ) as bool);
-
-  @override
-  _i17.ViewState get state => (super.noSuchMethod(
-        Invocation.getter(#state),
-        returnValue: _i17.ViewState.idle,
-      ) as _i17.ViewState);
-
-  @override
-  bool get isBusy => (super.noSuchMethod(
-        Invocation.getter(#isBusy),
-        returnValue: false,
-      ) as bool);
-
-  @override
-  bool get hasListeners => (super.noSuchMethod(
-        Invocation.getter(#hasListeners),
-        returnValue: false,
-      ) as bool);
-
-  @override
-  void setCurrentOrganizationName(String? updatedOrganization) =>
-      super.noSuchMethod(
-        Invocation.method(
-          #setCurrentOrganizationName,
-          [updatedOrganization],
-        ),
-        returnValueForMissingStub: null,
-      );
-
-  @override
-  void fetchNewPosts() => super.noSuchMethod(
-        Invocation.method(
-          #fetchNewPosts,
-          [],
-        ),
-        returnValueForMissingStub: null,
-      );
-
-  @override
-  void initialise({bool? isTest = false}) => super.noSuchMethod(
-        Invocation.method(
-          #initialise,
-          [],
-          {#isTest: isTest},
-        ),
-        returnValueForMissingStub: null,
-      );
-
-  @override
-  void initializeWithDemoData() => super.noSuchMethod(
-        Invocation.method(
-          #initializeWithDemoData,
-          [],
-        ),
-        returnValueForMissingStub: null,
-      );
-
-  @override
-  void buildNewPosts(List<_i15.Post>? newPosts) => super.noSuchMethod(
-        Invocation.method(
-          #buildNewPosts,
-          [newPosts],
-        ),
-        returnValueForMissingStub: null,
-      );
-
-  @override
-  void navigateToIndividualPage(_i15.Post? post) => super.noSuchMethod(
-        Invocation.method(
-          #navigateToIndividualPage,
-          [post],
-        ),
-        returnValueForMissingStub: null,
-      );
-
-  @override
-  void navigateToPinnedPostPage() => super.noSuchMethod(
-        Invocation.method(
-          #navigateToPinnedPostPage,
-          [],
-        ),
-        returnValueForMissingStub: null,
-      );
-
-  @override
-  void dispose() => super.noSuchMethod(
-        Invocation.method(
-          #dispose,
-          [],
-        ),
-        returnValueForMissingStub: null,
-      );
-
-  @override
-  void addNewPost(_i15.Post? newPost) => super.noSuchMethod(
-        Invocation.method(
-          #addNewPost,
-          [newPost],
-        ),
-        returnValueForMissingStub: null,
-      );
-
-  @override
-  void updatedPost(_i15.Post? post) => super.noSuchMethod(
-        Invocation.method(
-          #updatedPost,
-          [post],
-        ),
-        returnValueForMissingStub: null,
-      );
-
-  @override
-  _i5.Future<void> removePost(_i15.Post? post) => (super.noSuchMethod(
-        Invocation.method(
-          #removePost,
-          [post],
-        ),
-        returnValue: _i5.Future<void>.value(),
-        returnValueForMissingStub: _i5.Future<void>.value(),
-      ) as _i5.Future<void>);
-
-  @override
-  void setState(_i17.ViewState? viewState) => super.noSuchMethod(
-        Invocation.method(
-          #setState,
-          [viewState],
-        ),
-        returnValueForMissingStub: null,
-      );
-
-  @override
-  void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(
-        Invocation.method(
-          #addListener,
-          [listener],
-        ),
-        returnValueForMissingStub: null,
-      );
-
-  @override
-  void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(
-        Invocation.method(
-          #removeListener,
-          [listener],
-        ),
-        returnValueForMissingStub: null,
-      );
-
-  @override
-  void notifyListeners() => super.noSuchMethod(
-        Invocation.method(
-          #notifyListeners,
-          [],
-        ),
-        returnValueForMissingStub: null,
-      );
-}
-
 /// A class which mocks [NavigationService].
 ///
 /// See the documentation for Mockito's code generation for more information.
@@ -668,7 +454,7 @@ class MockNavigationService extends _i2.Mock implements _i8.NavigationService {
   @override
   void showTalawaErrorSnackBar(
     String? errorMessage,
-    _i17.MessageType? messageType,
+    _i14.MessageType? messageType,
   ) =>
       super.noSuchMethod(
         Invocation.method(
@@ -684,7 +470,7 @@ class MockNavigationService extends _i2.Mock implements _i8.NavigationService {
   @override
   void showTalawaErrorDialog(
     String? errorMessage,
-    _i17.MessageType? messageType,
+    _i14.MessageType? messageType,
   ) =>
       super.noSuchMethod(
         Invocation.method(
@@ -710,7 +496,7 @@ class MockNavigationService extends _i2.Mock implements _i8.NavigationService {
 /// A class which mocks [GraphqlConfig].
 ///
 /// See the documentation for Mockito's code generation for more information.
-class MockGraphqlConfig extends _i2.Mock implements _i18.GraphqlConfig {
+class MockGraphqlConfig extends _i2.Mock implements _i15.GraphqlConfig {
   @override
   _i3.HttpLink get httpLink => (super.noSuchMethod(
         Invocation.getter(#httpLink),
@@ -1191,20 +977,20 @@ class MockGraphQLClient extends _i2.Mock implements _i3.GraphQLClient {
 /// A class which mocks [PostService].
 ///
 /// See the documentation for Mockito's code generation for more information.
-class MockPostService extends _i2.Mock implements _i19.PostService {
+class MockPostService extends _i2.Mock implements _i16.PostService {
   @override
-  _i5.Stream<List<_i15.Post>> get postStream => (super.noSuchMethod(
+  _i5.Stream<List<_i17.Post>> get postStream => (super.noSuchMethod(
         Invocation.getter(#postStream),
-        returnValue: _i5.Stream<List<_i15.Post>>.empty(),
-        returnValueForMissingStub: _i5.Stream<List<_i15.Post>>.empty(),
-      ) as _i5.Stream<List<_i15.Post>>);
+        returnValue: _i5.Stream<List<_i17.Post>>.empty(),
+        returnValueForMissingStub: _i5.Stream<List<_i17.Post>>.empty(),
+      ) as _i5.Stream<List<_i17.Post>>);
 
   @override
-  _i5.Stream<_i15.Post> get updatedPostStream => (super.noSuchMethod(
+  _i5.Stream<_i17.Post> get updatedPostStream => (super.noSuchMethod(
         Invocation.getter(#updatedPostStream),
-        returnValue: _i5.Stream<_i15.Post>.empty(),
-        returnValueForMissingStub: _i5.Stream<_i15.Post>.empty(),
-      ) as _i5.Stream<_i15.Post>);
+        returnValue: _i5.Stream<_i17.Post>.empty(),
+        returnValueForMissingStub: _i5.Stream<_i17.Post>.empty(),
+      ) as _i5.Stream<_i17.Post>);
 
   @override
   void setOrgStreamSubscription() => super.noSuchMethod(
@@ -1226,18 +1012,19 @@ class MockPostService extends _i2.Mock implements _i19.PostService {
       ) as _i5.Future<void>);
 
   @override
-  Future<void> refreshFeed() async => super.noSuchMethod(
+  _i5.Future<void> refreshFeed() => (super.noSuchMethod(
         Invocation.method(
           #refreshFeed,
           [],
         ),
-        returnValueForMissingStub: null,
-      );
+        returnValue: _i5.Future<void>.value(),
+        returnValueForMissingStub: _i5.Future<void>.value(),
+      ) as _i5.Future<void>);
 
   @override
-  void addnewpost(_i15.Post? newPost) => super.noSuchMethod(
+  void addNewpost(_i17.Post? newPost) => super.noSuchMethod(
         Invocation.method(
-          #addnewpost,
+          #addNewpost,
           [newPost],
         ),
         returnValueForMissingStub: null,
@@ -1277,7 +1064,7 @@ class MockPostService extends _i2.Mock implements _i19.PostService {
 ///
 /// See the documentation for Mockito's code generation for more information.
 class MockMultiMediaPickerService extends _i2.Mock
-    implements _i20.MultiMediaPickerService {
+    implements _i18.MultiMediaPickerService {
   @override
   _i5.Stream<dynamic> get fileStream => (super.noSuchMethod(
         Invocation.getter(#fileStream),
@@ -1286,16 +1073,16 @@ class MockMultiMediaPickerService extends _i2.Mock
       ) as _i5.Stream<dynamic>);
 
   @override
-  _i5.Future<_i21.File?> getPhotoFromGallery({bool? camera = false}) =>
+  _i5.Future<_i19.File?> getPhotoFromGallery({bool? camera = false}) =>
       (super.noSuchMethod(
         Invocation.method(
           #getPhotoFromGallery,
           [],
           {#camera: camera},
         ),
-        returnValue: _i5.Future<_i21.File?>.value(),
-        returnValueForMissingStub: _i5.Future<_i21.File?>.value(),
-      ) as _i5.Future<_i21.File?>);
+        returnValue: _i5.Future<_i19.File?>.value(),
+        returnValueForMissingStub: _i5.Future<_i19.File?>.value(),
+      ) as _i5.Future<_i19.File?>);
 
   @override
   _i4.CustomAlertDialog permissionDeniedDialog() => (super.noSuchMethod(
@@ -1325,11 +1112,11 @@ class MockMultiMediaPickerService extends _i2.Mock
 /// See the documentation for Mockito's code generation for more information.
 class MockEventService extends _i2.Mock implements _i11.EventService {
   @override
-  _i5.Stream<_i22.Event> get eventStream => (super.noSuchMethod(
+  _i5.Stream<_i20.Event> get eventStream => (super.noSuchMethod(
         Invocation.getter(#eventStream),
-        returnValue: _i5.Stream<_i22.Event>.empty(),
-        returnValueForMissingStub: _i5.Stream<_i22.Event>.empty(),
-      ) as _i5.Stream<_i22.Event>);
+        returnValue: _i5.Stream<_i20.Event>.empty(),
+        returnValueForMissingStub: _i5.Stream<_i20.Event>.empty(),
+      ) as _i5.Stream<_i20.Event>);
 
   @override
   void setOrgStreamSubscription() => super.noSuchMethod(
@@ -1413,7 +1200,7 @@ class MockEventService extends _i2.Mock implements _i11.EventService {
 /// A class which mocks [ChatService].
 ///
 /// See the documentation for Mockito's code generation for more information.
-class MockChatService extends _i2.Mock implements _i23.ChatService {
+class MockChatService extends _i2.Mock implements _i21.ChatService {
   @override
   _i5.Stream<_i3.QueryResult<Object?>> get chatStream => (super.noSuchMethod(
         Invocation.getter(#chatStream),
@@ -1432,20 +1219,20 @@ class MockChatService extends _i2.Mock implements _i23.ChatService {
       );
 
   @override
-  _i5.Stream<_i24.ChatListTileDataModel> get chatListStream =>
+  _i5.Stream<_i22.ChatListTileDataModel> get chatListStream =>
       (super.noSuchMethod(
         Invocation.getter(#chatListStream),
-        returnValue: _i5.Stream<_i24.ChatListTileDataModel>.empty(),
+        returnValue: _i5.Stream<_i22.ChatListTileDataModel>.empty(),
         returnValueForMissingStub:
-            _i5.Stream<_i24.ChatListTileDataModel>.empty(),
-      ) as _i5.Stream<_i24.ChatListTileDataModel>);
+            _i5.Stream<_i22.ChatListTileDataModel>.empty(),
+      ) as _i5.Stream<_i22.ChatListTileDataModel>);
 
   @override
-  _i5.Stream<_i25.ChatMessage> get chatMessagesStream => (super.noSuchMethod(
+  _i5.Stream<_i23.ChatMessage> get chatMessagesStream => (super.noSuchMethod(
         Invocation.getter(#chatMessagesStream),
-        returnValue: _i5.Stream<_i25.ChatMessage>.empty(),
-        returnValueForMissingStub: _i5.Stream<_i25.ChatMessage>.empty(),
-      ) as _i5.Stream<_i25.ChatMessage>);
+        returnValue: _i5.Stream<_i23.ChatMessage>.empty(),
+        returnValueForMissingStub: _i5.Stream<_i23.ChatMessage>.empty(),
+      ) as _i5.Stream<_i23.ChatMessage>);
 
   @override
   _i5.Future<void> sendMessageToDirectChat(
@@ -1489,7 +1276,7 @@ class MockChatService extends _i2.Mock implements _i23.ChatService {
 /// A class which mocks [UserConfig].
 ///
 /// See the documentation for Mockito's code generation for more information.
-class MockUserConfig extends _i2.Mock implements _i26.UserConfig {
+class MockUserConfig extends _i2.Mock implements _i24.UserConfig {
   @override
   _i5.Stream<_i6.OrgInfo> get currentOrgInfoStream => (super.noSuchMethod(
         Invocation.getter(#currentOrgInfoStream),
@@ -1527,11 +1314,11 @@ class MockUserConfig extends _i2.Mock implements _i26.UserConfig {
   @override
   String get currentOrgName => (super.noSuchMethod(
         Invocation.getter(#currentOrgName),
-        returnValue: _i16.dummyValue<String>(
+        returnValue: _i25.dummyValue<String>(
           this,
           Invocation.getter(#currentOrgName),
         ),
-        returnValueForMissingStub: _i16.dummyValue<String>(
+        returnValueForMissingStub: _i25.dummyValue<String>(
           this,
           Invocation.getter(#currentOrgName),
         ),
@@ -1700,7 +1487,7 @@ class MockUserConfig extends _i2.Mock implements _i26.UserConfig {
 /// A class which mocks [AppLanguage].
 ///
 /// See the documentation for Mockito's code generation for more information.
-class MockAppLanguage extends _i2.Mock implements _i27.AppLanguage {
+class MockAppLanguage extends _i2.Mock implements _i26.AppLanguage {
   @override
   bool get isTest => (super.noSuchMethod(
         Invocation.getter(#isTest),
@@ -1748,11 +1535,11 @@ class MockAppLanguage extends _i2.Mock implements _i27.AppLanguage {
       ) as _i10.Locale);
 
   @override
-  _i17.ViewState get state => (super.noSuchMethod(
+  _i14.ViewState get state => (super.noSuchMethod(
         Invocation.getter(#state),
-        returnValue: _i17.ViewState.idle,
-        returnValueForMissingStub: _i17.ViewState.idle,
-      ) as _i17.ViewState);
+        returnValue: _i14.ViewState.idle,
+        returnValueForMissingStub: _i14.ViewState.idle,
+      ) as _i14.ViewState);
 
   @override
   bool get isBusy => (super.noSuchMethod(
@@ -1839,7 +1626,7 @@ class MockAppLanguage extends _i2.Mock implements _i27.AppLanguage {
       ) as _i5.Future<void>);
 
   @override
-  void setState(_i17.ViewState? viewState) => super.noSuchMethod(
+  void setState(_i14.ViewState? viewState) => super.noSuchMethod(
         Invocation.method(
           #setState,
           [viewState],
@@ -1887,34 +1674,34 @@ class MockAppLanguage extends _i2.Mock implements _i27.AppLanguage {
 /// A class which mocks [Connectivity].
 ///
 /// See the documentation for Mockito's code generation for more information.
-class MockConnectivity extends _i2.Mock implements _i28.Connectivity {
+class MockConnectivity extends _i2.Mock implements _i27.Connectivity {
   @override
-  _i5.Stream<_i29.ConnectivityResult> get onConnectivityChanged =>
+  _i5.Stream<_i28.ConnectivityResult> get onConnectivityChanged =>
       (super.noSuchMethod(
         Invocation.getter(#onConnectivityChanged),
-        returnValue: _i5.Stream<_i29.ConnectivityResult>.empty(),
-        returnValueForMissingStub: _i5.Stream<_i29.ConnectivityResult>.empty(),
-      ) as _i5.Stream<_i29.ConnectivityResult>);
+        returnValue: _i5.Stream<_i28.ConnectivityResult>.empty(),
+        returnValueForMissingStub: _i5.Stream<_i28.ConnectivityResult>.empty(),
+      ) as _i5.Stream<_i28.ConnectivityResult>);
 
   @override
-  _i5.Future<_i29.ConnectivityResult> checkConnectivity() =>
+  _i5.Future<_i28.ConnectivityResult> checkConnectivity() =>
       (super.noSuchMethod(
         Invocation.method(
           #checkConnectivity,
           [],
         ),
-        returnValue: _i5.Future<_i29.ConnectivityResult>.value(
-            _i29.ConnectivityResult.bluetooth),
-        returnValueForMissingStub: _i5.Future<_i29.ConnectivityResult>.value(
-            _i29.ConnectivityResult.bluetooth),
-      ) as _i5.Future<_i29.ConnectivityResult>);
+        returnValue: _i5.Future<_i28.ConnectivityResult>.value(
+            _i28.ConnectivityResult.bluetooth),
+        returnValueForMissingStub: _i5.Future<_i28.ConnectivityResult>.value(
+            _i28.ConnectivityResult.bluetooth),
+      ) as _i5.Future<_i28.ConnectivityResult>);
 }
 
 /// A class which mocks [SignupDetailsViewModel].
 ///
 /// See the documentation for Mockito's code generation for more information.
 class MockSignupDetailsViewModel extends _i2.Mock
-    implements _i30.SignupDetailsViewModel {
+    implements _i29.SignupDetailsViewModel {
   @override
   _i1.GlobalKey<_i1.FormState> get formKey => (super.noSuchMethod(
         Invocation.getter(#formKey),
@@ -2133,11 +1920,11 @@ class MockSignupDetailsViewModel extends _i2.Mock
       );
 
   @override
-  _i17.ViewState get state => (super.noSuchMethod(
+  _i14.ViewState get state => (super.noSuchMethod(
         Invocation.getter(#state),
-        returnValue: _i17.ViewState.idle,
-        returnValueForMissingStub: _i17.ViewState.idle,
-      ) as _i17.ViewState);
+        returnValue: _i14.ViewState.idle,
+        returnValueForMissingStub: _i14.ViewState.idle,
+      ) as _i14.ViewState);
 
   @override
   bool get isBusy => (super.noSuchMethod(
@@ -2173,7 +1960,7 @@ class MockSignupDetailsViewModel extends _i2.Mock
       ) as _i5.Future<void>);
 
   @override
-  void setState(_i17.ViewState? viewState) => super.noSuchMethod(
+  void setState(_i14.ViewState? viewState) => super.noSuchMethod(
         Invocation.method(
           #setState,
           [viewState],
@@ -2221,15 +2008,15 @@ class MockSignupDetailsViewModel extends _i2.Mock
 /// A class which mocks [Post].
 ///
 /// See the documentation for Mockito's code generation for more information.
-class MockPost extends _i2.Mock implements _i15.Post {
+class MockPost extends _i2.Mock implements _i17.Post {
   @override
   String get sId => (super.noSuchMethod(
         Invocation.getter(#sId),
-        returnValue: _i16.dummyValue<String>(
+        returnValue: _i25.dummyValue<String>(
           this,
           Invocation.getter(#sId),
         ),
-        returnValueForMissingStub: _i16.dummyValue<String>(
+        returnValueForMissingStub: _i25.dummyValue<String>(
           this,
           Invocation.getter(#sId),
         ),
@@ -2308,7 +2095,7 @@ class MockPost extends _i2.Mock implements _i15.Post {
       );
 
   @override
-  set likedBy(List<_i15.LikedBy>? _likedBy) => super.noSuchMethod(
+  set likedBy(List<_i17.LikedBy>? _likedBy) => super.noSuchMethod(
         Invocation.setter(
           #likedBy,
           _likedBy,
@@ -2317,7 +2104,7 @@ class MockPost extends _i2.Mock implements _i15.Post {
       );
 
   @override
-  set comments(List<_i15.Comments>? _comments) => super.noSuchMethod(
+  set comments(List<_i17.Comments>? _comments) => super.noSuchMethod(
         Invocation.setter(
           #comments,
           _comments,
@@ -2331,14 +2118,14 @@ class MockPost extends _i2.Mock implements _i15.Post {
           #getPostCreatedDuration,
           [],
         ),
-        returnValue: _i16.dummyValue<String>(
+        returnValue: _i25.dummyValue<String>(
           this,
           Invocation.method(
             #getPostCreatedDuration,
             [],
           ),
         ),
-        returnValueForMissingStub: _i16.dummyValue<String>(
+        returnValueForMissingStub: _i25.dummyValue<String>(
           this,
           Invocation.method(
             #getPostCreatedDuration,
@@ -2591,6 +2378,15 @@ class MockDataBaseMutationFunctions extends _i2.Mock
         returnValueForMissingStub: null,
       );
 
+  @override
+  void initClientNonAuth() => super.noSuchMethod(
+        Invocation.method(
+          #initClientNonAuth,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+
   @override
   bool? encounteredExceptionOrError(
     _i3.OperationException? exception, {
@@ -2696,7 +2492,7 @@ class MockDataBaseMutationFunctions extends _i2.Mock
 ///
 /// See the documentation for Mockito's code generation for more information.
 class MockOrganizationService extends _i2.Mock
-    implements _i31.OrganizationService {
+    implements _i30.OrganizationService {
   @override
   _i5.Future<List<_i7.User>> getOrgMembersList(String? orgId) =>
       (super.noSuchMethod(
@@ -2714,7 +2510,7 @@ class MockOrganizationService extends _i2.Mock
 ///
 /// See the documentation for Mockito's code generation for more information.
 class MockExploreEventsViewModel extends _i2.Mock
-    implements _i32.ExploreEventsViewModel {
+    implements _i31.ExploreEventsViewModel {
   @override
   bool get demoMode => (super.noSuchMethod(
         Invocation.getter(#demoMode),
@@ -2732,18 +2528,18 @@ class MockExploreEventsViewModel extends _i2.Mock
       );
 
   @override
-  List<_i22.Event> get events => (super.noSuchMethod(
+  List<_i20.Event> get events => (super.noSuchMethod(
         Invocation.getter(#events),
-        returnValue: <_i22.Event>[],
-        returnValueForMissingStub: <_i22.Event>[],
-      ) as List<_i22.Event>);
+        returnValue: <_i20.Event>[],
+        returnValueForMissingStub: <_i20.Event>[],
+      ) as List<_i20.Event>);
 
   @override
-  List<_i22.Event> get userEvents => (super.noSuchMethod(
+  List<_i20.Event> get userEvents => (super.noSuchMethod(
         Invocation.getter(#userEvents),
-        returnValue: <_i22.Event>[],
-        returnValueForMissingStub: <_i22.Event>[],
-      ) as List<_i22.Event>);
+        returnValue: <_i20.Event>[],
+        returnValueForMissingStub: <_i20.Event>[],
+      ) as List<_i20.Event>);
 
   @override
   _i11.EventService get eventService => (super.noSuchMethod(
@@ -2761,11 +2557,11 @@ class MockExploreEventsViewModel extends _i2.Mock
   @override
   String get emptyListMessage => (super.noSuchMethod(
         Invocation.getter(#emptyListMessage),
-        returnValue: _i16.dummyValue<String>(
+        returnValue: _i25.dummyValue<String>(
           this,
           Invocation.getter(#emptyListMessage),
         ),
-        returnValueForMissingStub: _i16.dummyValue<String>(
+        returnValueForMissingStub: _i25.dummyValue<String>(
           this,
           Invocation.getter(#emptyListMessage),
         ),
@@ -2774,22 +2570,22 @@ class MockExploreEventsViewModel extends _i2.Mock
   @override
   String get chosenValue => (super.noSuchMethod(
         Invocation.getter(#chosenValue),
-        returnValue: _i16.dummyValue<String>(
+        returnValue: _i25.dummyValue<String>(
           this,
           Invocation.getter(#chosenValue),
         ),
-        returnValueForMissingStub: _i16.dummyValue<String>(
+        returnValueForMissingStub: _i25.dummyValue<String>(
           this,
           Invocation.getter(#chosenValue),
         ),
       ) as String);
 
   @override
-  _i17.ViewState get state => (super.noSuchMethod(
+  _i14.ViewState get state => (super.noSuchMethod(
         Invocation.getter(#state),
-        returnValue: _i17.ViewState.idle,
-        returnValueForMissingStub: _i17.ViewState.idle,
-      ) as _i17.ViewState);
+        returnValue: _i14.ViewState.idle,
+        returnValueForMissingStub: _i14.ViewState.idle,
+      ) as _i14.ViewState);
 
   @override
   bool get isBusy => (super.noSuchMethod(
@@ -2836,7 +2632,7 @@ class MockExploreEventsViewModel extends _i2.Mock
       ) as _i5.Future<void>);
 
   @override
-  _i5.Future<void> checkIfExistsAndAddNewEvent(_i22.Event? newEvent) =>
+  _i5.Future<void> checkIfExistsAndAddNewEvent(_i20.Event? newEvent) =>
       (super.noSuchMethod(
         Invocation.method(
           #checkIfExistsAndAddNewEvent,
@@ -2878,7 +2674,7 @@ class MockExploreEventsViewModel extends _i2.Mock
       );
 
   @override
-  void setState(_i17.ViewState? viewState) => super.noSuchMethod(
+  void setState(_i14.ViewState? viewState) => super.noSuchMethod(
         Invocation.method(
           #setState,
           [viewState],
@@ -2914,56 +2710,269 @@ class MockExploreEventsViewModel extends _i2.Mock
       );
 }
 
-/// A class which mocks [Validator].
-///
-/// See the documentation for Mockito's code generation for more information.
-class MockValidator extends _i2.Mock implements _i33.Validator {
-  @override
-  _i5.Future<bool?> validateUrlExistence(String? url) => (super.noSuchMethod(
-        Invocation.method(
-          #validateUrlExistence,
-          [url],
-        ),
-        returnValue: _i5.Future<bool?>.value(),
-        returnValueForMissingStub: _i5.Future<bool?>.value(),
-      ) as _i5.Future<bool?>);
-}
-
-/// A class which mocks [QRViewController].
+/// A class which mocks [OrganizationFeedViewModel].
 ///
 /// See the documentation for Mockito's code generation for more information.
-class MockQRViewController extends _i2.Mock implements _i34.QRViewController {
-  @override
-  _i5.Stream<_i35.Barcode> get scannedDataStream => (super.noSuchMethod(
-        Invocation.getter(#scannedDataStream),
-        returnValue: _i5.Stream<_i35.Barcode>.empty(),
-        returnValueForMissingStub: _i5.Stream<_i35.Barcode>.empty(),
-      ) as _i5.Stream<_i35.Barcode>);
-
+class MockOrganizationFeedViewModel extends _i2.Mock
+    implements _i32.OrganizationFeedViewModel {
   @override
-  bool get hasPermissions => (super.noSuchMethod(
-        Invocation.getter(#hasPermissions),
+  bool get istest => (super.noSuchMethod(
+        Invocation.getter(#istest),
         returnValue: false,
         returnValueForMissingStub: false,
       ) as bool);
 
   @override
-  _i5.Future<_i36.CameraFacing> getCameraInfo() => (super.noSuchMethod(
-        Invocation.method(
-          #getCameraInfo,
-          [],
+  set istest(bool? _istest) => super.noSuchMethod(
+        Invocation.setter(
+          #istest,
+          _istest,
         ),
-        returnValue:
-            _i5.Future<_i36.CameraFacing>.value(_i36.CameraFacing.back),
-        returnValueForMissingStub:
-            _i5.Future<_i36.CameraFacing>.value(_i36.CameraFacing.back),
-      ) as _i5.Future<_i36.CameraFacing>);
+        returnValueForMissingStub: null,
+      );
 
   @override
-  _i5.Future<_i36.CameraFacing> flipCamera() => (super.noSuchMethod(
-        Invocation.method(
-          #flipCamera,
-          [],
+  List<_i17.Post> get posts => (super.noSuchMethod(
+        Invocation.getter(#posts),
+        returnValue: <_i17.Post>[],
+        returnValueForMissingStub: <_i17.Post>[],
+      ) as List<_i17.Post>);
+
+  @override
+  List<_i17.Post> get userPosts => (super.noSuchMethod(
+        Invocation.getter(#userPosts),
+        returnValue: <_i17.Post>[],
+        returnValueForMissingStub: <_i17.Post>[],
+      ) as List<_i17.Post>);
+
+  @override
+  List<_i17.Post> get pinnedPosts => (super.noSuchMethod(
+        Invocation.getter(#pinnedPosts),
+        returnValue: <_i17.Post>[],
+        returnValueForMissingStub: <_i17.Post>[],
+      ) as List<_i17.Post>);
+
+  @override
+  String get currentOrgName => (super.noSuchMethod(
+        Invocation.getter(#currentOrgName),
+        returnValue: _i25.dummyValue<String>(
+          this,
+          Invocation.getter(#currentOrgName),
+        ),
+        returnValueForMissingStub: _i25.dummyValue<String>(
+          this,
+          Invocation.getter(#currentOrgName),
+        ),
+      ) as String);
+
+  @override
+  bool get isFetchingPosts => (super.noSuchMethod(
+        Invocation.getter(#isFetchingPosts),
+        returnValue: false,
+        returnValueForMissingStub: false,
+      ) as bool);
+
+  @override
+  _i14.ViewState get state => (super.noSuchMethod(
+        Invocation.getter(#state),
+        returnValue: _i14.ViewState.idle,
+        returnValueForMissingStub: _i14.ViewState.idle,
+      ) as _i14.ViewState);
+
+  @override
+  bool get isBusy => (super.noSuchMethod(
+        Invocation.getter(#isBusy),
+        returnValue: false,
+        returnValueForMissingStub: false,
+      ) as bool);
+
+  @override
+  bool get hasListeners => (super.noSuchMethod(
+        Invocation.getter(#hasListeners),
+        returnValue: false,
+        returnValueForMissingStub: false,
+      ) as bool);
+
+  @override
+  void setCurrentOrganizationName(String? updatedOrganization) =>
+      super.noSuchMethod(
+        Invocation.method(
+          #setCurrentOrganizationName,
+          [updatedOrganization],
+        ),
+        returnValueForMissingStub: null,
+      );
+
+  @override
+  void fetchNewPosts() => super.noSuchMethod(
+        Invocation.method(
+          #fetchNewPosts,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+
+  @override
+  void initialise({bool? isTest = false}) => super.noSuchMethod(
+        Invocation.method(
+          #initialise,
+          [],
+          {#isTest: isTest},
+        ),
+        returnValueForMissingStub: null,
+      );
+
+  @override
+  void buildNewPosts(List<_i17.Post>? newPosts) => super.noSuchMethod(
+        Invocation.method(
+          #buildNewPosts,
+          [newPosts],
+        ),
+        returnValueForMissingStub: null,
+      );
+
+  @override
+  void navigateToIndividualPage(_i17.Post? post) => super.noSuchMethod(
+        Invocation.method(
+          #navigateToIndividualPage,
+          [post],
+        ),
+        returnValueForMissingStub: null,
+      );
+
+  @override
+  void navigateToPinnedPostPage() => super.noSuchMethod(
+        Invocation.method(
+          #navigateToPinnedPostPage,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+
+  @override
+  void dispose() => super.noSuchMethod(
+        Invocation.method(
+          #dispose,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+
+  @override
+  void addNewPost(_i17.Post? newPost) => super.noSuchMethod(
+        Invocation.method(
+          #addNewPost,
+          [newPost],
+        ),
+        returnValueForMissingStub: null,
+      );
+
+  @override
+  void updatedPost(_i17.Post? post) => super.noSuchMethod(
+        Invocation.method(
+          #updatedPost,
+          [post],
+        ),
+        returnValueForMissingStub: null,
+      );
+
+  @override
+  _i5.Future<void> removePost(_i17.Post? post) => (super.noSuchMethod(
+        Invocation.method(
+          #removePost,
+          [post],
+        ),
+        returnValue: _i5.Future<void>.value(),
+        returnValueForMissingStub: _i5.Future<void>.value(),
+      ) as _i5.Future<void>);
+
+  @override
+  void setState(_i14.ViewState? viewState) => super.noSuchMethod(
+        Invocation.method(
+          #setState,
+          [viewState],
+        ),
+        returnValueForMissingStub: null,
+      );
+
+  @override
+  void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(
+        Invocation.method(
+          #addListener,
+          [listener],
+        ),
+        returnValueForMissingStub: null,
+      );
+
+  @override
+  void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(
+        Invocation.method(
+          #removeListener,
+          [listener],
+        ),
+        returnValueForMissingStub: null,
+      );
+
+  @override
+  void notifyListeners() => super.noSuchMethod(
+        Invocation.method(
+          #notifyListeners,
+          [],
+        ),
+        returnValueForMissingStub: null,
+      );
+}
+
+/// A class which mocks [Validator].
+///
+/// See the documentation for Mockito's code generation for more information.
+class MockValidator extends _i2.Mock implements _i33.Validator {
+  @override
+  _i5.Future<bool?> validateUrlExistence(String? url) => (super.noSuchMethod(
+        Invocation.method(
+          #validateUrlExistence,
+          [url],
+        ),
+        returnValue: _i5.Future<bool?>.value(),
+        returnValueForMissingStub: _i5.Future<bool?>.value(),
+      ) as _i5.Future<bool?>);
+}
+
+/// A class which mocks [QRViewController].
+///
+/// See the documentation for Mockito's code generation for more information.
+class MockQRViewController extends _i2.Mock implements _i34.QRViewController {
+  @override
+  _i5.Stream<_i35.Barcode> get scannedDataStream => (super.noSuchMethod(
+        Invocation.getter(#scannedDataStream),
+        returnValue: _i5.Stream<_i35.Barcode>.empty(),
+        returnValueForMissingStub: _i5.Stream<_i35.Barcode>.empty(),
+      ) as _i5.Stream<_i35.Barcode>);
+
+  @override
+  bool get hasPermissions => (super.noSuchMethod(
+        Invocation.getter(#hasPermissions),
+        returnValue: false,
+        returnValueForMissingStub: false,
+      ) as bool);
+
+  @override
+  _i5.Future<_i36.CameraFacing> getCameraInfo() => (super.noSuchMethod(
+        Invocation.method(
+          #getCameraInfo,
+          [],
+        ),
+        returnValue:
+            _i5.Future<_i36.CameraFacing>.value(_i36.CameraFacing.back),
+        returnValueForMissingStub:
+            _i5.Future<_i36.CameraFacing>.value(_i36.CameraFacing.back),
+      ) as _i5.Future<_i36.CameraFacing>);
+
+  @override
+  _i5.Future<_i36.CameraFacing> flipCamera() => (super.noSuchMethod(
+        Invocation.method(
+          #flipCamera,
+          [],
         ),
         returnValue:
             _i5.Future<_i36.CameraFacing>.value(_i36.CameraFacing.back),
@@ -3105,11 +3114,11 @@ class MockAppTheme extends _i2.Mock implements _i38.AppTheme {
   @override
   String get key => (super.noSuchMethod(
         Invocation.getter(#key),
-        returnValue: _i16.dummyValue<String>(
+        returnValue: _i25.dummyValue<String>(
           this,
           Invocation.getter(#key),
         ),
-        returnValueForMissingStub: _i16.dummyValue<String>(
+        returnValueForMissingStub: _i25.dummyValue<String>(
           this,
           Invocation.getter(#key),
         ),
@@ -3123,11 +3132,11 @@ class MockAppTheme extends _i2.Mock implements _i38.AppTheme {
       ) as bool);
 
   @override
-  _i17.ViewState get state => (super.noSuchMethod(
+  _i14.ViewState get state => (super.noSuchMethod(
         Invocation.getter(#state),
-        returnValue: _i17.ViewState.idle,
-        returnValueForMissingStub: _i17.ViewState.idle,
-      ) as _i17.ViewState);
+        returnValue: _i14.ViewState.idle,
+        returnValueForMissingStub: _i14.ViewState.idle,
+      ) as _i14.ViewState);
 
   @override
   bool get isBusy => (super.noSuchMethod(
@@ -3163,7 +3172,7 @@ class MockAppTheme extends _i2.Mock implements _i38.AppTheme {
       );
 
   @override
-  void setState(_i17.ViewState? viewState) => super.noSuchMethod(
+  void setState(_i14.ViewState? viewState) => super.noSuchMethod(
         Invocation.method(
           #setState,
           [viewState],
@@ -3212,7 +3221,7 @@ class MockAppTheme extends _i2.Mock implements _i38.AppTheme {
 ///
 /// See the documentation for Mockito's code generation for more information.
 class MockCreateEventViewModel extends _i2.Mock
-    implements _i41.CreateEventViewModel {
+    implements _i39.CreateEventViewModel {
   @override
   _i1.TextEditingController get eventTitleTextController => (super.noSuchMethod(
         Invocation.getter(#eventTitleTextController),
@@ -3287,6 +3296,55 @@ class MockCreateEventViewModel extends _i2.Mock
         returnValueForMissingStub: null,
       );
 
+  @override
+  _i1.TextEditingController get repeatsEveryCountController =>
+      (super.noSuchMethod(
+        Invocation.getter(#repeatsEveryCountController),
+        returnValue: _FakeTextEditingController_17(
+          this,
+          Invocation.getter(#repeatsEveryCountController),
+        ),
+        returnValueForMissingStub: _FakeTextEditingController_17(
+          this,
+          Invocation.getter(#repeatsEveryCountController),
+        ),
+      ) as _i1.TextEditingController);
+
+  @override
+  set repeatsEveryCountController(
+          _i1.TextEditingController? _repeatsEveryCountController) =>
+      super.noSuchMethod(
+        Invocation.setter(
+          #repeatsEveryCountController,
+          _repeatsEveryCountController,
+        ),
+        returnValueForMissingStub: null,
+      );
+
+  @override
+  _i1.TextEditingController get endOccurenceController => (super.noSuchMethod(
+        Invocation.getter(#endOccurenceController),
+        returnValue: _FakeTextEditingController_17(
+          this,
+          Invocation.getter(#endOccurenceController),
+        ),
+        returnValueForMissingStub: _FakeTextEditingController_17(
+          this,
+          Invocation.getter(#endOccurenceController),
+        ),
+      ) as _i1.TextEditingController);
+
+  @override
+  set endOccurenceController(
+          _i1.TextEditingController? _endOccurenceController) =>
+      super.noSuchMethod(
+        Invocation.setter(
+          #endOccurenceController,
+          _endOccurenceController,
+        ),
+        returnValueForMissingStub: null,
+      );
+
   @override
   _i1.TimeOfDay get eventStartTime => (super.noSuchMethod(
         Invocation.getter(#eventStartTime),
@@ -3353,19 +3411,6 @@ class MockCreateEventViewModel extends _i2.Mock
         returnValueForMissingStub: null,
       );
 
-  @override
-  DateTime get eventEndDate => (super.noSuchMethod(
-        Invocation.getter(#eventEndDate),
-        returnValue: _FakeDateTime_23(
-          this,
-          Invocation.getter(#eventEndDate),
-        ),
-        returnValueForMissingStub: _FakeDateTime_23(
-          this,
-          Invocation.getter(#eventEndDate),
-        ),
-      ) as DateTime);
-
   @override
   set eventEndDate(DateTime? _eventEndDate) => super.noSuchMethod(
         Invocation.setter(
@@ -3491,6 +3536,154 @@ class MockCreateEventViewModel extends _i2.Mock
         returnValueForMissingStub: null,
       );
 
+  @override
+  bool get isAllDay => (super.noSuchMethod(
+        Invocation.getter(#isAllDay),
+        returnValue: false,
+        returnValueForMissingStub: false,
+      ) as bool);
+
+  @override
+  set isAllDay(bool? _isAllDay) => super.noSuchMethod(
+        Invocation.setter(
+          #isAllDay,
+          _isAllDay,
+        ),
+        returnValueForMissingStub: null,
+      );
+
+  @override
+  bool get isRecurring => (super.noSuchMethod(
+        Invocation.getter(#isRecurring),
+        returnValue: false,
+        returnValueForMissingStub: false,
+      ) as bool);
+
+  @override
+  set isRecurring(bool? _isRecurring) => super.noSuchMethod(
+        Invocation.setter(
+          #isRecurring,
+          _isRecurring,
+        ),
+        returnValueForMissingStub: null,
+      );
+
+  @override
+  int get recurranceCount => (super.noSuchMethod(
+        Invocation.getter(#recurranceCount),
+        returnValue: 0,
+        returnValueForMissingStub: 0,
+      ) as int);
+
+  @override
+  set recurranceCount(int? _recurranceCount) => super.noSuchMethod(
+        Invocation.setter(
+          #recurranceCount,
+          _recurranceCount,
+        ),
+        returnValueForMissingStub: null,
+      );
+
+  @override
+  set recurrance(String? _recurrance) => super.noSuchMethod(
+        Invocation.setter(
+          #recurrance,
+          _recurrance,
+        ),
+        returnValueForMissingStub: null,
+      );
+
+  @override
+  String get recurranceFrequency => (super.noSuchMethod(
+        Invocation.getter(#recurranceFrequency),
+        returnValue: _i25.dummyValue<String>(
+          this,
+          Invocation.getter(#recurranceFrequency),
+        ),
+        returnValueForMissingStub: _i25.dummyValue<String>(
+          this,
+          Invocation.getter(#recurranceFrequency),
+        ),
+      ) as String);
+
+  @override
+  set recurranceFrequency(String? _recurranceFrequency) => super.noSuchMethod(
+        Invocation.setter(
+          #recurranceFrequency,
+          _recurranceFrequency,
+        ),
+        returnValueForMissingStub: null,
+      );
+
+  @override
+  String get monthlyRecurrence => (super.noSuchMethod(
+        Invocation.getter(#monthlyRecurrence),
+        returnValue: _i25.dummyValue<String>(
+          this,
+          Invocation.getter(#monthlyRecurrence),
+        ),
+        returnValueForMissingStub: _i25.dummyValue<String>(
+          this,
+          Invocation.getter(#monthlyRecurrence),
+        ),
+      ) as String);
+
+  @override
+  set monthlyRecurrence(String? _monthlyRecurrence) => super.noSuchMethod(
+        Invocation.setter(
+          #monthlyRecurrence,
+          _monthlyRecurrence,
+        ),
+        returnValueForMissingStub: null,
+      );
+
+  @override
+  Set<String> get weekdays => (super.noSuchMethod(
+        Invocation.getter(#weekdays),
+        returnValue: <String>{},
+        returnValueForMissingStub: <String>{},
+      ) as Set<String>);
+
+  @override
+  set weekdays(Set<String>? _weekdays) => super.noSuchMethod(
+        Invocation.setter(
+          #weekdays,
+          _weekdays,
+        ),
+        returnValueForMissingStub: null,
+      );
+
+  @override
+  String get eventEndType => (super.noSuchMethod(
+        Invocation.getter(#eventEndType),
+        returnValue: _i25.dummyValue<String>(
+          this,
+          Invocation.getter(#eventEndType),
+        ),
+        returnValueForMissingStub: _i25.dummyValue<String>(
+          this,
+          Invocation.getter(#eventEndType),
+        ),
+      ) as String);
+
+  @override
+  set eventEndType(String? _eventEndType) => super.noSuchMethod(
+        Invocation.setter(
+          #eventEndType,
+          _eventEndType,
+        ),
+        returnValueForMissingStub: null,
+      );
+
+  @override
+  set eventEndOnEndDate(DateTime? _eventEndOnEndDate) => super.noSuchMethod(
+        Invocation.setter(
+          #eventEndOnEndDate,
+          _eventEndOnEndDate,
+        ),
+        returnValueForMissingStub: null,
+      );
+
   @override
   List<_i7.User> get orgMembersList => (super.noSuchMethod(
         Invocation.getter(#orgMembersList),
@@ -3551,11 +3744,11 @@ class MockCreateEventViewModel extends _i2.Mock
       ) as Map<String, bool>);
 
   @override
-  _i17.ViewState get state => (super.noSuchMethod(
+  _i14.ViewState get state => (super.noSuchMethod(
         Invocation.getter(#state),
-        returnValue: _i17.ViewState.idle,
-        returnValueForMissingStub: _i17.ViewState.idle,
-      ) as _i17.ViewState);
+        returnValue: _i14.ViewState.idle,
+        returnValueForMissingStub: _i14.ViewState.idle,
+      ) as _i14.ViewState);
 
   @override
   bool get isBusy => (super.noSuchMethod(
@@ -3642,7 +3835,25 @@ class MockCreateEventViewModel extends _i2.Mock
       );
 
   @override
-  void setState(_i17.ViewState? viewState) => super.noSuchMethod(
+  void setEventEndDate(DateTime? selectedEndDate) => super.noSuchMethod(
+        Invocation.method(
+          #setEventEndDate,
+          [selectedEndDate],
+        ),
+        returnValueForMissingStub: null,
+      );
+
+  @override
+  String? getRecurrance(String? frequency) => (super.noSuchMethod(
+        Invocation.method(
+          #getRecurrance,
+          [frequency],
+        ),
+        returnValueForMissingStub: null,
+      ) as String?);
+
+  @override
+  void setState(_i14.ViewState? viewState) => super.noSuchMethod(
         Invocation.method(
           #setState,
           [viewState],
@@ -3691,7 +3902,7 @@ class MockCreateEventViewModel extends _i2.Mock
 ///
 /// See the documentation for Mockito's code generation for more information.
 class MockDirectChatViewModel extends _i2.Mock
-    implements _i42.DirectChatViewModel {
+    implements _i40.DirectChatViewModel {
   @override
   _i1.GlobalKey<_i1.AnimatedListState> get listKey => (super.noSuchMethod(
         Invocation.getter(#listKey),
@@ -3706,14 +3917,14 @@ class MockDirectChatViewModel extends _i2.Mock
       ) as _i1.GlobalKey<_i1.AnimatedListState>);
 
   @override
-  _i17.ChatState get chatState => (super.noSuchMethod(
+  _i14.ChatState get chatState => (super.noSuchMethod(
         Invocation.getter(#chatState),
-        returnValue: _i17.ChatState.initial,
-        returnValueForMissingStub: _i17.ChatState.initial,
-      ) as _i17.ChatState);
+        returnValue: _i14.ChatState.initial,
+        returnValueForMissingStub: _i14.ChatState.initial,
+      ) as _i14.ChatState);
 
   @override
-  set chatState(_i17.ChatState? _chatState) => super.noSuchMethod(
+  set chatState(_i14.ChatState? _chatState) => super.noSuchMethod(
         Invocation.setter(
           #chatState,
           _chatState,
@@ -3731,26 +3942,26 @@ class MockDirectChatViewModel extends _i2.Mock
       );
 
   @override
-  List<_i24.ChatListTileDataModel> get chats => (super.noSuchMethod(
+  List<_i22.ChatListTileDataModel> get chats => (super.noSuchMethod(
         Invocation.getter(#chats),
-        returnValue: <_i24.ChatListTileDataModel>[],
-        returnValueForMissingStub: <_i24.ChatListTileDataModel>[],
-      ) as List<_i24.ChatListTileDataModel>);
+        returnValue: <_i22.ChatListTileDataModel>[],
+        returnValueForMissingStub: <_i22.ChatListTileDataModel>[],
+      ) as List<_i22.ChatListTileDataModel>);
 
   @override
-  Map<String, List<_i25.ChatMessage>> get chatMessagesByUser =>
+  Map<String, List<_i23.ChatMessage>> get chatMessagesByUser =>
       (super.noSuchMethod(
         Invocation.getter(#chatMessagesByUser),
-        returnValue: <String, List<_i25.ChatMessage>>{},
-        returnValueForMissingStub: <String, List<_i25.ChatMessage>>{},
-      ) as Map<String, List<_i25.ChatMessage>>);
+        returnValue: <String, List<_i23.ChatMessage>>{},
+        returnValueForMissingStub: <String, List<_i23.ChatMessage>>{},
+      ) as Map<String, List<_i23.ChatMessage>>);
 
   @override
-  _i17.ViewState get state => (super.noSuchMethod(
+  _i14.ViewState get state => (super.noSuchMethod(
         Invocation.getter(#state),
-        returnValue: _i17.ViewState.idle,
-        returnValueForMissingStub: _i17.ViewState.idle,
-      ) as _i17.ViewState);
+        returnValue: _i14.ViewState.idle,
+        returnValueForMissingStub: _i14.ViewState.idle,
+      ) as _i14.ViewState);
 
   @override
   bool get isBusy => (super.noSuchMethod(
@@ -3831,7 +4042,7 @@ class MockDirectChatViewModel extends _i2.Mock
       );
 
   @override
-  void setState(_i17.ViewState? viewState) => super.noSuchMethod(
+  void setState(_i14.ViewState? viewState) => super.noSuchMethod(
         Invocation.method(
           #setState,
           [viewState],
@@ -3870,24 +4081,24 @@ class MockDirectChatViewModel extends _i2.Mock
 /// A class which mocks [ImageCropper].
 ///
 /// See the documentation for Mockito's code generation for more information.
-class MockImageCropper extends _i2.Mock implements _i43.ImageCropper {
+class MockImageCropper extends _i2.Mock implements _i41.ImageCropper {
   @override
-  _i5.Future<_i44.CroppedFile?> cropImage({
+  _i5.Future<_i42.CroppedFile?> cropImage({
     required String? sourcePath,
     int? maxWidth,
     int? maxHeight,
-    _i44.CropAspectRatio? aspectRatio,
-    List<_i44.CropAspectRatioPreset>? aspectRatioPresets = const [
-      _i44.CropAspectRatioPreset.original,
-      _i44.CropAspectRatioPreset.square,
-      _i44.CropAspectRatioPreset.ratio3x2,
-      _i44.CropAspectRatioPreset.ratio4x3,
-      _i44.CropAspectRatioPreset.ratio16x9,
+    _i42.CropAspectRatio? aspectRatio,
+    List<_i42.CropAspectRatioPreset>? aspectRatioPresets = const [
+      _i42.CropAspectRatioPreset.original,
+      _i42.CropAspectRatioPreset.square,
+      _i42.CropAspectRatioPreset.ratio3x2,
+      _i42.CropAspectRatioPreset.ratio4x3,
+      _i42.CropAspectRatioPreset.ratio16x9,
     ],
-    _i44.CropStyle? cropStyle = _i44.CropStyle.rectangle,
-    _i44.ImageCompressFormat? compressFormat = _i44.ImageCompressFormat.jpg,
+    _i42.CropStyle? cropStyle = _i42.CropStyle.rectangle,
+    _i42.ImageCompressFormat? compressFormat = _i42.ImageCompressFormat.jpg,
     int? compressQuality = 90,
-    List<_i44.PlatformUiSettings>? uiSettings,
+    List<_i42.PlatformUiSettings>? uiSettings,
   }) =>
       (super.noSuchMethod(
         Invocation.method(
@@ -3905,19 +4116,19 @@ class MockImageCropper extends _i2.Mock implements _i43.ImageCropper {
             #uiSettings: uiSettings,
           },
         ),
-        returnValue: _i5.Future<_i44.CroppedFile?>.value(),
-        returnValueForMissingStub: _i5.Future<_i44.CroppedFile?>.value(),
-      ) as _i5.Future<_i44.CroppedFile?>);
+        returnValue: _i5.Future<_i42.CroppedFile?>.value(),
+        returnValueForMissingStub: _i5.Future<_i42.CroppedFile?>.value(),
+      ) as _i5.Future<_i42.CroppedFile?>);
 
   @override
-  _i5.Future<_i44.CroppedFile?> recoverImage() => (super.noSuchMethod(
+  _i5.Future<_i42.CroppedFile?> recoverImage() => (super.noSuchMethod(
         Invocation.method(
           #recoverImage,
           [],
         ),
-        returnValue: _i5.Future<_i44.CroppedFile?>.value(),
-        returnValueForMissingStub: _i5.Future<_i44.CroppedFile?>.value(),
-      ) as _i5.Future<_i44.CroppedFile?>);
+        returnValue: _i5.Future<_i42.CroppedFile?>.value(),
+        returnValueForMissingStub: _i5.Future<_i42.CroppedFile?>.value(),
+      ) as _i5.Future<_i42.CroppedFile?>);
 }
 
 /// A class which mocks [ImagePicker].
diff --git a/test/router_test.dart b/test/router_test.dart
index 344771cf1a..33d17cf055 100644
--- a/test/router_test.dart
+++ b/test/router_test.dart
@@ -15,6 +15,7 @@ import 'package:talawa/models/user/user_info.dart';
 import 'package:talawa/router.dart';
 import 'package:talawa/splash_screen.dart';
 import 'package:talawa/view_model/after_auth_view_models/chat_view_models/direct_chat_view_model.dart';
+import 'package:talawa/view_model/after_auth_view_models/event_view_models/create_event_view_model.dart';
 import 'package:talawa/views/after_auth_screens/add_post_page.dart';
 import 'package:talawa/views/after_auth_screens/app_settings/app_settings_page.dart';
 import 'package:talawa/views/after_auth_screens/chat/chat_message_screen.dart';
@@ -188,9 +189,16 @@ void main() {
 
     testWidgets('Test createCustomRecurringEvent route',
         (WidgetTester tester) async {
-      final route =
-          generateRoute(const RouteSettings(name: Routes.customRecurrencePage));
-      expect(route, isA<MaterialPageRoute>());
+      final route = generateRoute(
+        RouteSettings(
+          name: Routes.customRecurrencePage,
+          arguments: CreateEventViewModel(),
+        ),
+      );
+      expect(
+        route,
+        isA<MaterialPageRoute>(),
+      );
       if (route is MaterialPageRoute) {
         final builder = route.builder;
         final widget = builder(MockBuildContext());
diff --git a/test/utils/event_queries_test.dart b/test/utils/event_queries_test.dart
index cb9fe23fe9..cc0d370031 100644
--- a/test/utils/event_queries_test.dart
+++ b/test/utils/event_queries_test.dart
@@ -59,35 +59,8 @@ void main() {
 
     test("Check if addEvent works correctly", () {
       const data = """
-     mutation createEvent( \$organizationId: ID!,
-        \$title:String!,
-        \$description: String!,
-        \$startTime: Time,
-        \$endTime: Time,
-        \$allDay: Boolean!,
-        \$recurring: Boolean!,
-        \$isPublic: Boolean!,
-        \$isRegisterable: Boolean!,
-        \$location: String,
-        \$startDate : Date!,
-        \$endDate : Date!,
-      ) { 
-      createEvent(
-        data:{
-          organizationId: \$organizationId,
-           title: \$title,
-           description: \$description,
-           isPublic: \$isPublic,
-           isRegisterable: \$isRegisterable,
-           recurring: \$recurring,
-           allDay: \$allDay,
-           startTime: \$startTime,
-           endTime: \$endTime,
-           startDate: \$startDate,
-           endDate: \$endDate,
-           location: \$location,
-        }
-      ){
+    mutation Mutation(\$data: EventInput!, \$recurrenceRuleData: RecurrenceRuleInput) {
+      createEvent(data: \$data, recurrenceRuleData: \$recurrenceRuleData) {
         _id
         title
         description
diff --git a/test/view_model_tests/after_auth_view_model_tests/event_view_model_tests/create_event_view_model_test.dart b/test/view_model_tests/after_auth_view_model_tests/event_view_model_tests/create_event_view_model_test.dart
index 125b156011..7c444d6c2b 100644
--- a/test/view_model_tests/after_auth_view_model_tests/event_view_model_tests/create_event_view_model_test.dart
+++ b/test/view_model_tests/after_auth_view_model_tests/event_view_model_tests/create_event_view_model_test.dart
@@ -8,6 +8,7 @@ import 'package:flutter_localizations/flutter_localizations.dart';
 import 'package:flutter_test/flutter_test.dart';
 import 'package:intl/intl.dart';
 import 'package:mockito/mockito.dart';
+import 'package:talawa/constants/recurrence_values.dart';
 import 'package:talawa/models/user/user_info.dart';
 import 'package:talawa/router.dart' as router;
 import 'package:talawa/services/graphql_config.dart';
@@ -126,9 +127,9 @@ void main() {
         model.eventStartTime.minute,
       );
       final DateTime endMoment = DateTime(
-        model.eventEndDate.year,
-        model.eventEndDate.month,
-        model.eventEndDate.day,
+        model.eventEndDate!.year,
+        model.eventEndDate!.month,
+        model.eventEndDate!.day,
         model.eventEndTime.hour,
         model.eventEndTime.minute,
       );
@@ -159,18 +160,25 @@ void main() {
         databaseFunctions.gqlAuthMutation(
           EventQueries().addEvent(),
           variables: {
-            'startDate': DateFormat('yyyy-MM-dd').format(startMoment),
-            'endDate': DateFormat('yyyy-MM-dd').format(endMoment),
-            'organizationId': "XYZ",
-            'title': model.eventTitleTextController.text,
-            'description': model.eventDescriptionTextController.text,
-            'location': model.eventLocationTextController.text,
-            'isPublic': model.isPublicSwitch,
-            'isRegisterable': model.isRegisterableSwitch,
-            'recurring': false,
-            'allDay': false,
-            'startTime': '${DateFormat('HH:mm:ss').format(startMoment)}Z',
-            'endTime': '${DateFormat('HH:mm:ss').format(endMoment)}Z',
+            'data': {
+              'startDate': DateFormat('yyyy-MM-dd').format(startMoment),
+              'endDate': DateFormat('yyyy-MM-dd').format(endMoment),
+              'organizationId': 'XYZ',
+              'title': model.eventTitleTextController.text,
+              'description': model.eventDescriptionTextController.text,
+              'location': model.eventLocationTextController.text,
+              'isPublic': model.isPublicSwitch,
+              'isRegisterable': model.isRegisterableSwitch,
+              'recurring': true,
+              'recurrance': 'WEEKLY',
+              'allDay': true,
+              'startTime': '${DateFormat('HH:mm:ss').format(startMoment)}Z',
+              'endTime': '${DateFormat('HH:mm:ss').format(endMoment)}Z',
+            },
+            'recurrenceRuleData': {
+              'frequency': 'WEEKLY',
+              'weekDays': ['TU'],
+            },
           },
         ),
       ).thenAnswer((_) async {
@@ -183,18 +191,25 @@ void main() {
         databaseFunctions.gqlAuthMutation(
           EventQueries().addEvent(),
           variables: {
-            'startDate': DateFormat('yyyy-MM-dd').format(startMoment),
-            'endDate': DateFormat('yyyy-MM-dd').format(endMoment),
-            'organizationId': "XYZ",
-            'title': model.eventTitleTextController.text,
-            'description': model.eventDescriptionTextController.text,
-            'location': model.eventLocationTextController.text,
-            'isPublic': model.isPublicSwitch,
-            'isRegisterable': model.isRegisterableSwitch,
-            'recurring': false,
-            'allDay': false,
-            'startTime': '${DateFormat('HH:mm:ss').format(startMoment)}Z',
-            'endTime': '${DateFormat('HH:mm:ss').format(endMoment)}Z',
+            'data': {
+              'startDate': DateFormat('yyyy-MM-dd').format(startMoment),
+              'endDate': DateFormat('yyyy-MM-dd').format(endMoment),
+              'organizationId': 'XYZ',
+              'title': model.eventTitleTextController.text,
+              'description': model.eventDescriptionTextController.text,
+              'location': model.eventLocationTextController.text,
+              'isPublic': model.isPublicSwitch,
+              'isRegisterable': model.isRegisterableSwitch,
+              'recurring': true,
+              'recurrance': 'WEEKLY',
+              'allDay': true,
+              'startTime': '${DateFormat('HH:mm:ss').format(startMoment)}Z',
+              'endTime': '${DateFormat('HH:mm:ss').format(endMoment)}Z',
+            },
+            'recurrenceRuleData': {
+              'frequency': 'WEEKLY',
+              'weekDays': ['TU'],
+            },
           },
         ),
       );
@@ -297,5 +312,13 @@ void main() {
           model.selectedMembers.contains(usersInCurrentOrg.first);
       expect(isMemberFound, false);
     });
+
+    test('getRecurrence method', () {
+      final model = CreateEventViewModel();
+      model.initialize();
+      expect(model.getRecurrance(Recurrance.monthly), 'MONTHLY');
+      expect(model.getRecurrance(Recurrance.yearly), 'YEARLY');
+      expect(model.getRecurrance(Recurrance.once), null);
+    });
   });
 }
diff --git a/test/views/after_auth_screens/events/create_custom_recurring_event_test.dart b/test/views/after_auth_screens/events/create_custom_recurring_event_test.dart
index 4509c13d96..b4997ad425 100644
--- a/test/views/after_auth_screens/events/create_custom_recurring_event_test.dart
+++ b/test/views/after_auth_screens/events/create_custom_recurring_event_test.dart
@@ -2,15 +2,18 @@ import 'package:flutter/material.dart';
 import 'package:flutter_localizations/flutter_localizations.dart';
 import 'package:flutter_test/flutter_test.dart';
 import 'package:talawa/constants/custom_theme.dart';
+import 'package:talawa/constants/recurrence_values.dart';
 import 'package:talawa/router.dart' as router;
 import 'package:talawa/services/size_config.dart';
 import 'package:talawa/utils/app_localization.dart';
+import 'package:talawa/view_model/after_auth_view_models/event_view_models/create_event_view_model.dart';
 import 'package:talawa/view_model/lang_view_model.dart';
 import 'package:talawa/views/after_auth_screens/events/create_custom_recurring_event.dart';
 import 'package:talawa/views/base_view.dart';
 import 'package:talawa/widgets/create_recurring_event_helper_widgets.dart';
 import 'package:talawa/widgets/custom_weekday_selector.dart';
 
+import '../../../helpers/test_helpers.dart';
 import '../../../helpers/test_locator.dart';
 
 /// Creates a EventScreen for tests.
@@ -24,6 +27,7 @@ import '../../../helpers/test_locator.dart';
 Widget createCustomRecurrenceScreen({
   ThemeMode themeMode = ThemeMode.light,
   required ThemeData theme,
+  CreateEventViewModel? model,
 }) =>
     BaseView<AppLanguage>(
       onModelReady: (model) => model.initialize(),
@@ -39,7 +43,9 @@ Widget createCustomRecurrenceScreen({
           themeMode: themeMode,
           theme: theme,
           home: Scaffold(
-            body: CustomRecurrencePage(),
+            body: CustomRecurrencePage(
+              model: model ?? CreateEventViewModel(),
+            ),
           ),
           navigatorKey: navigationService.navigatorKey,
           onGenerateRoute: router.generateRoute,
@@ -50,6 +56,7 @@ Widget createCustomRecurrenceScreen({
 void main() {
   SizeConfig().test();
   testSetupLocator();
+  getAndRegisterNavigationService();
 
   // setUp(() {
   //   registerServices();
@@ -75,9 +82,6 @@ void main() {
       // Verify if the AppBar renders with the correct title
       expect(find.text('Custom recurrence'), findsOneWidget);
 
-      await tester.tap(find.text('Done'));
-      await tester.pumpAndSettle();
-
       // Verify if the Done button is present
       expect(find.text('Done'), findsOneWidget);
     });
@@ -163,6 +167,21 @@ void main() {
       await tester.pumpAndSettle();
 
       expect(find.text("month"), findsOne);
+
+      // check if monthly recurrence dropdown shows up.
+      await tester.tap(find.text('Monthly on day 3'));
+      await tester.pumpAndSettle();
+      await tester.tap(find.text('Monthly on day 3').last);
+      await tester.pumpAndSettle();
+
+      // check if interval UI's middle part dissappears
+      // when clicked on day/year.
+      await tester.tap(find.text('month'));
+      await tester.pumpAndSettle();
+      await tester.tap(find.text('year'));
+      await tester.pumpAndSettle();
+
+      expect(find.text('Monthly on day 3'), findsNothing);
     });
 
     testWidgets('CustomWeekDaySelector', (tester) async {
@@ -189,8 +208,10 @@ void main() {
     });
 
     testWidgets('EventEndOptions', (tester) async {
+      final CreateEventViewModel model = CreateEventViewModel();
       final widget = createCustomRecurrenceScreen(
         theme: TalawaTheme.darkTheme,
+        model: model,
       );
       await tester.pumpWidget(widget);
       await tester.pump();
@@ -228,6 +249,55 @@ void main() {
       await tester.pumpAndSettle();
 
       expect(find.byType(DatePickerDialog), findsNothing);
+
+      await tester.tap(find.text('Never'));
+      await tester.pumpAndSettle();
+
+      expect(model.eventEndType, EventEndTypes.never);
+      expect(model.eventEndDate, null);
+
+      await tester.tap(find.text('On'));
+      await tester.pumpAndSettle();
+
+      expect(model.eventEndType, EventEndTypes.on);
+    });
+
+    testWidgets('Done button', (tester) async {
+      final CreateEventViewModel model = CreateEventViewModel();
+      final widget = createCustomRecurrenceScreen(
+        theme: TalawaTheme.darkTheme,
+        model: model,
+      );
+      await tester.pumpWidget(widget);
+      await tester.pump();
+
+      await tester.tap(find.text('Done'));
+      await tester.pumpAndSettle();
+
+      expect(model.eventEndDate, null);
+
+      await tester.tap(find.text('On'));
+      await tester.pumpAndSettle();
+
+      await tester.tap(find.text('Done'));
+      await tester.pumpAndSettle();
+
+      expect(model.eventEndDate, model.eventEndOnEndDate);
+
+      await tester.tap(find.text('After'));
+      await tester.pumpAndSettle();
+
+      final afterTextField = find.byType(CustomTextField).last;
+
+      await tester.tap(afterTextField);
+      await tester.pumpAndSettle();
+
+      await tester.enterText(afterTextField, '2');
+
+      await tester.tap(find.text('Done'));
+      await tester.pumpAndSettle();
+
+      expect(model.endOccurenceController.text, '2');
     });
   });
 }
diff --git a/test/views/after_auth_screens/events/create_event_page_test.dart b/test/views/after_auth_screens/events/create_event_page_test.dart
index 4448353173..5d5f5eb7a3 100644
--- a/test/views/after_auth_screens/events/create_event_page_test.dart
+++ b/test/views/after_auth_screens/events/create_event_page_test.dart
@@ -15,6 +15,7 @@ import 'package:talawa/view_model/after_auth_view_models/event_view_models/creat
 import 'package:talawa/view_model/lang_view_model.dart';
 import 'package:talawa/views/after_auth_screens/events/create_event_page.dart';
 import 'package:talawa/views/base_view.dart';
+import 'package:talawa/widgets/recurrence_dialog.dart';
 
 import '../../../helpers/test_helpers.dart';
 import '../../../helpers/test_locator.dart';
@@ -173,9 +174,6 @@ void main() {
       );
       await tester.pumpAndSettle();
 
-      await tester.tap(find.byIcon(Icons.restore));
-      await tester.pumpAndSettle();
-
       const List<String> frequencies = [
         "Does not repeat",
         "Every day",
@@ -185,14 +183,25 @@ void main() {
         "Custom...",
       ];
 
-      final customButtonFinder = find.text("Custom...");
+      String prev = frequencies[0];
+      for (int i = 1; i < 5; i++) {
+        expect(find.text(prev), findsAny);
+        await tester.tap(find.text(prev));
+        await tester.pumpAndSettle();
+        await tester.tap(find.text(frequencies[i]).last);
+        await tester.pumpAndSettle();
+        expect(find.byType(ShowRecurrenceDialog), findsNothing);
+        expect(find.text(frequencies[i]), findsOneWidget);
+        prev = frequencies[i];
+      }
 
-      await tester.tap(customButtonFinder);
+      expect(find.text(prev), findsAny);
+      await tester.tap(find.text(prev));
+      await tester.pumpAndSettle();
+      await tester.tap(find.text(frequencies[5]));
       await tester.pumpAndSettle();
 
-      for (final frequency in frequencies) {
-        expect(find.text(frequency), findsAny);
-      }
+      expect(find.byType(ShowRecurrenceDialog), findsNothing);
     });
 
     testWidgets("Checking tap Inkwell for setDate 2 datetime", (tester) async {
@@ -346,7 +355,7 @@ void main() {
       await tester.pump();
     });
 
-    testWidgets("Testing Keep public section", (tester) async {
+    testWidgets("Testing All day section", (tester) async {
       await tester.pumpWidget(
         createEventScreen(
           theme: TalawaTheme.lightTheme,
@@ -356,27 +365,27 @@ void main() {
       final appLocalization = AppLocalizations.of(
         navigationService.navigatorKey.currentContext!,
       );
-      final keepPublicText = find.descendant(
+      final allDayText = find.descendant(
         of: find.byType(Row),
         matching: find.text(
-          appLocalization!.strictTranslate('Keep Public'),
+          appLocalization!.strictTranslate('All day'),
         ),
       );
       final switches = find.descendant(
         of: find.byType(Row),
         matching: find.byType(Switch),
       );
-      expect(keepPublicText, findsOneWidget);
-      expect(switches, findsNWidgets(2));
+      expect(allDayText, findsOneWidget);
+      expect(switches, findsNWidgets(3));
       expect(
-        (tester.widget(keepPublicText) as Text?)?.style!.fontSize,
+        (tester.widget(allDayText) as Text?)?.style!.fontSize,
         16,
       );
-      expect((tester.firstWidget(switches) as Switch).value, true);
-      await tester.ensureVisible(switches.first);
-      await tester.tap(switches.first);
+      expect((tester.widgetList(switches).toList()[0] as Switch).value, true);
+      await tester.ensureVisible(switches.at(0));
+      await tester.tap(switches.at(0));
       await tester.pumpAndSettle();
-      expect((tester.firstWidget(switches) as Switch).value, false);
+      expect((tester.widgetList(switches).toList()[0] as Switch).value, false);
     });
 
     testWidgets("Testing Keep Registerable section", (tester) async {
@@ -400,7 +409,7 @@ void main() {
         matching: find.byType(Switch),
       );
       expect(keepRegisterableText, findsOneWidget);
-      expect(switches, findsNWidgets(2));
+      expect(switches, findsNWidgets(3));
       expect(
         (tester.widget(keepRegisterableText) as Text?)?.style!.fontSize,
         16,
@@ -412,6 +421,39 @@ void main() {
       expect((tester.widgetList(switches).toList()[1] as Switch).value, false);
     });
 
+    testWidgets("Testing Keep public section", (tester) async {
+      await tester.pumpWidget(
+        createEventScreen(
+          theme: TalawaTheme.lightTheme,
+        ),
+      );
+      await tester.pumpAndSettle();
+      final appLocalization = AppLocalizations.of(
+        navigationService.navigatorKey.currentContext!,
+      );
+      final keepPublicText = find.descendant(
+        of: find.byType(Row),
+        matching: find.text(
+          appLocalization!.strictTranslate('Keep Public'),
+        ),
+      );
+      final switches = find.descendant(
+        of: find.byType(Row),
+        matching: find.byType(Switch),
+      );
+      expect(keepPublicText, findsOneWidget);
+      expect(switches, findsNWidgets(3));
+      expect(
+        (tester.widget(keepPublicText) as Text?)?.style!.fontSize,
+        16,
+      );
+      expect((tester.widgetList(switches).toList()[2] as Switch).value, true);
+      await tester.ensureVisible(switches.at(2));
+      await tester.tap(switches.at(2));
+      await tester.pumpAndSettle();
+      expect((tester.widgetList(switches).toList()[2] as Switch).value, false);
+    });
+
     // testWidgets("Checking tap Inkwell work for admin list", (tester) async {
     //   await tester.pumpWidget(
     //     createEventScreen(
diff --git a/test/widget_tests/after_auth_screens/events/create_event_page_test.dart b/test/widget_tests/after_auth_screens/events/create_event_page_test.dart
index 3aae3aeb0b..55e8f5d6fb 100644
--- a/test/widget_tests/after_auth_screens/events/create_event_page_test.dart
+++ b/test/widget_tests/after_auth_screens/events/create_event_page_test.dart
@@ -358,7 +358,7 @@ void main() {
           matching: find.byType(Switch),
         );
         expect(keepPublicText, findsOneWidget);
-        expect(switches, findsNWidgets(2));
+        expect(switches, findsNWidgets(3));
         expect(
           (tester.widget(keepPublicText) as Text?)?.style!.fontSize,
           16,
@@ -390,7 +390,7 @@ void main() {
           matching: find.byType(Switch),
         );
         expect(keepRegisterableText, findsOneWidget);
-        expect(switches, findsNWidgets(2));
+        expect(switches, findsNWidgets(3));
         expect(
           (tester.widget(keepRegisterableText) as Text?)?.style!.fontSize,
           16,