|
|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
import 'dart:io';
|
|
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/config/config.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/locator.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/services/permission/permission_service.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/theme/colors.dart';
|
|
|
|
|
@ -44,10 +45,10 @@ showReminderDialog(BuildContext context, DateTime dateTime, String doctorName, S
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future<void> _showReminderDialog(BuildContext context, DateTime dateTime, String doctorName, String eventId, String appoDateFormatted, String appoTimeFormatted,
|
|
|
|
|
Future<void> _showReminderDialog(BuildContext providedContext, DateTime dateTime, String doctorName, String eventId, String appoDateFormatted, String appoTimeFormatted,
|
|
|
|
|
{required Function onSuccess, String? title, String? description, Function(int)? onMultiDateSuccess, bool? isMultiAllowed}) async {
|
|
|
|
|
return showDialog<void>(
|
|
|
|
|
context: context,
|
|
|
|
|
context: providedContext,
|
|
|
|
|
barrierDismissible: true, // user must tap button!
|
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
|
return Dialog(
|
|
|
|
|
@ -81,7 +82,7 @@ Future<void> _showReminderDialog(BuildContext context, DateTime dateTime, String
|
|
|
|
|
if (onMultiDateSuccess == null) {
|
|
|
|
|
CalendarUtils calendarUtils = await CalendarUtils.getInstance();
|
|
|
|
|
await calendarUtils.createOrUpdateEvent(
|
|
|
|
|
title: title ?? TranslationBase.of(context).reminderTitle + " " + doctorName,
|
|
|
|
|
title: title ?? TranslationBase.of(providedContext).reminderTitle + " " + doctorName,
|
|
|
|
|
description: description ?? "At " + appoDateFormatted + " " + appoTimeFormatted,
|
|
|
|
|
scheduleDateTime: dateTime,
|
|
|
|
|
eventId: eventId);
|
|
|
|
|
|