Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
98a5db6
Merge pull request #307 from builttoroam/develop
nickrandolph May 13, 2021
56500ce
Merge pull request #360 from builttoroam/develop
sowens-csd Nov 24, 2021
7e4fc9d
Merge pull request #381 from builttoroam/develop
thomassth Dec 20, 2021
031d3dd
Merge pull request #406 from builttoroam/develop
thomassth Jan 13, 2022
bc9d475
fix for ownerAccount null
thomassth Sep 30, 2022
682b43b
more calendar data displayed
thomassth Sep 30, 2022
9962835
example app dark mode
thomassth Oct 1, 2022
23ff57e
activate flutter lint
thomassth Oct 6, 2022
9147125
more linting fixes
thomassth Oct 7, 2022
30a6a5f
Update issue templates
thomassth Oct 7, 2022
145013c
packages cleanup
thomassth Oct 12, 2022
c4c140c
Fix create/update events in IOS
Oct 13, 2022
384890c
iOS: Fix error when adding attendees due to UUID is nil.
GoldenSoju Nov 1, 2022
2e1fa43
Updated version and changelog.
IVLIVS-III Dec 2, 2022
a945dd1
Merge pull request #461 from builttoroam/v4.3-cherry-picks
thomassth Dec 2, 2022
202c6e2
Updated dependencies.
IVLIVS-III Feb 9, 2023
49fc22c
Updated the iOS example app with auto-generated files.
IVLIVS-III Feb 9, 2023
862d387
Updated the android example app with auto-generated files.
IVLIVS-III Feb 9, 2023
e94d601
Removed Obj-C pass-through layer on iOS in preparation of a unified c…
IVLIVS-III Feb 9, 2023
3f29e93
Added macOS with shared code source 'eventkit'.
IVLIVS-III Feb 9, 2023
39aa9b8
Added generated file to flutter project.
IVLIVS-III Feb 9, 2023
c2cfb2f
Added macos to the example app.
IVLIVS-III Feb 9, 2023
3351d38
Fixed issues with macOS implementation.
IVLIVS-III Feb 9, 2023
28b0e77
Updated CHANGELOG and README.
IVLIVS-III Feb 9, 2023
1c1b8ca
Fixed a regression in iOS.
IVLIVS-III Feb 9, 2023
0c85ab0
parseRecurrenceRuleString() when else fix.
sgowda97 Feb 15, 2023
552fae0
Added a beta label to README and CHANGELOG.
IVLIVS-III Feb 17, 2023
e3799b1
Fixed failing test (dart analyze).
IVLIVS-III Feb 17, 2023
47c851c
Bumped version and updated changelog.
IVLIVS-III Feb 17, 2023
7453c64
Removed unused dependencies (again).
IVLIVS-III Mar 2, 2023
472905f
Fix retrieving events for more than 4 years range
VladyslavBilomeria May 13, 2023
a41b440
Simplify the range size calculation algorithm
VladyslavBilomeria May 19, 2023
7304e82
Remove logs-related code
VladyslavBilomeria May 19, 2023
6d99ddd
Merge pull request #486 from VladyslavBilomeria/fix/ios-retrieve-events
IVLIVS-III May 20, 2023
4fc2c39
Merge branch 'release' into develop
IVLIVS-III May 20, 2023
82acd9b
Updated example project for iOS.
IVLIVS-III May 20, 2023
1e7ed58
Fixed deprecation issues.
IVLIVS-III May 20, 2023
772ee6b
Merge pull request #487 from builttoroam/align-develop-with-master
IVLIVS-III May 20, 2023
379c99b
add proguard rules
ebsangam Jun 19, 2023
3c24520
Merge pull request #489 from ebsangam/develop
IVLIVS-III Jun 19, 2023
623f0bf
Request FullAccess on iOS17+ (#497)
junqi Sep 16, 2023
6d65268
included namespace
Oct 10, 2023
e991dcc
Merge pull request #508 from ash80/develop
IVLIVS-III Oct 10, 2023
bddadd0
pipeline update
thomassth Nov 7, 2023
a6352f6
Merge pull request #513 from builttoroam/workflow-update
IVLIVS-III Mar 19, 2024
d650f91
building fixes
Jul 14, 2024
634fd1b
added event color for android
Jul 14, 2024
7dce8d1
added removing of event color
Jul 14, 2024
a669955
added updating of calendar color for android and ios
Jul 22, 2024
f447041
fixes for iOS updateCalendarcolor
Jul 22, 2024
c333f31
small fix
Jul 23, 2024
cd0c652
added calendar color file
Jul 23, 2024
75ee949
made colorKey accessible in event
Aug 12, 2024
72b58f2
set eventcolor, loaded eventColorKey for event
Aug 12, 2024
e6e88e8
mvoed color picker file
Aug 12, 2024
35c49e6
removed old color picker
Aug 12, 2024
992240b
exposed color and colorKey
Sep 4, 2024
44c248c
fixed color picker import
Sep 11, 2024
ba0910b
fixes for setting event color
Sep 11, 2024
c702f17
clean up
Sep 11, 2024
2ee14a1
added serilization test for eventColor
Sep 11, 2024
b41223c
tiny formatting adjustment
Sep 11, 2024
7876962
set example kotlin version to 1.8..22
Sep 11, 2024
755ddfa
flutter_native_timezone made release builds fail, migrated to flutter…
Sep 13, 2024
7791f59
increased rrule version from 0.2.10 to 0.2.15
Sep 25, 2024
6a9733c
Merge pull request #546 from chris-wolf/develop
IVLIVS-III Sep 25, 2024
75d3caf
Updated dependencies.
IVLIVS-III Feb 9, 2023
3a81f2e
Updated the iOS example app with auto-generated files.
IVLIVS-III Feb 9, 2023
87c4381
Updated the android example app with auto-generated files.
IVLIVS-III Feb 9, 2023
43c2750
Removed Obj-C pass-through layer on iOS in preparation of a unified c…
IVLIVS-III Feb 9, 2023
4434277
Added macOS with shared code source 'eventkit'.
IVLIVS-III Feb 9, 2023
cd9b416
Added generated file to flutter project.
IVLIVS-III Feb 9, 2023
d85328a
Added macos to the example app.
IVLIVS-III Feb 9, 2023
e1a237b
Fixed issues with macOS implementation.
IVLIVS-III Feb 9, 2023
f7adb64
Updated CHANGELOG and README.
IVLIVS-III Feb 9, 2023
198a963
Fixed a regression in iOS.
IVLIVS-III Feb 9, 2023
64d6387
Added a beta label to README and CHANGELOG.
IVLIVS-III Feb 17, 2023
9b392c4
Unified darwin source.
IVLIVS-III Nov 23, 2024
1ab2cb4
Merge remote-tracking branch 'origin/feat/macos-support' into feat/ma…
IVLIVS-III Nov 23, 2024
58bef43
Fixed podspec platform.
IVLIVS-III Nov 23, 2024
30d6018
Updated iOS/macOS example.
IVLIVS-III Nov 23, 2024
0461211
Fixed .gitignore / checked-in filed mismatch.
IVLIVS-III Nov 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .DS_Store
Binary file not shown.
3 changes: 2 additions & 1 deletion .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ jobs:
flutter build apk
test-ios:
name: iOS build test
runs-on: macos-latest
runs-on: macos-13
steps:
- uses: maxim-lobanov/setup-xcode@v1
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
name: Development Release
# The type of runner that the job will run on
runs-on: ubuntu-latest
permissions:
id-token: write # Required for authentication using OIDC
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
Expand All @@ -36,15 +38,10 @@ jobs:
run: |
sed -i "0,/\#\# \[.*/s//## [${{steps.changelog_reader.outputs.version}}-$GITHUB_RUN_ID]/" CHANGELOG.md
cat CHANGELOG.md
- name: Setup credentials
run: |
cat <<EOF > $PUB_CACHE/credentials.json
${{ secrets.CREDENTIALS }}
EOF
- name: Publish package
run: flutter pub publish --force
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1
- name: Add entry to Github release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.changelog_reader.outputs.version }}+${{ github.run_id }}
prerelease: true
prerelease: true
11 changes: 4 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
release:
# The type of runner that the job will run on
runs-on: ubuntu-latest
permissions:
id-token: write # Required for authentication using OIDC
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
Expand All @@ -25,18 +27,13 @@ jobs:
channel: "stable"
- run: dart --version
- run: flutter --version
- name: Setup credentials
run: |
cat <<EOF > $PUB_CACHE/credentials.json
${{ secrets.CREDENTIALS }}
EOF
- name: Publish package
run: flutter pub publish --force
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1
- name: Get Changelog Entry
id: changelog_reader
uses: mindsers/[email protected]
- name: Add entry to Github release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.changelog_reader.outputs.version }}
body: ${{ steps.changelog_reader.outputs.changes }}
body: ${{ steps.changelog_reader.outputs.changes }}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@ example/ios/Flutter/Flutter.podspec
**/.settings
**/.project
**/.classpath
.vscode
.vscode

# macOS
.DS_Store
36 changes: 36 additions & 0 deletions .metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled.

version:
revision: 32fb2f948e9b1a2d1b876ebee3558be7f51b457f
channel: stable

project_type: plugin

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: 32fb2f948e9b1a2d1b876ebee3558be7f51b457f
base_revision: 32fb2f948e9b1a2d1b876ebee3558be7f51b457f
- platform: android
create_revision: 32fb2f948e9b1a2d1b876ebee3558be7f51b457f
base_revision: 32fb2f948e9b1a2d1b876ebee3558be7f51b457f
- platform: ios
create_revision: 32fb2f948e9b1a2d1b876ebee3558be7f51b457f
base_revision: 32fb2f948e9b1a2d1b876ebee3558be7f51b457f
- platform: macos
create_revision: 32fb2f948e9b1a2d1b876ebee3558be7f51b457f
base_revision: 32fb2f948e9b1a2d1b876ebee3558be7f51b457f

# User provided section

# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,21 @@

<!-- To benefit from the current changelog reader in CI/CD, please follow the changelog format from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). -->

## [4.2.1](https://github.com/builttoroam/device_calendar/releases/tag/4.2.1)
## [4.4.0](https://github.com/builttoroam/device_calendar/releases/tag/4.4.0)

- Added macOS 10.15+ (Beta) as a supported platform (tested only on Intel based Macs)

## [4.3.1](https://github.com/builttoroam/device_calendar/releases/tag/4.3.1)

- Fixed an [issue](https://github.com/builttoroam/device_calendar/issues/470) that prevented the plugin from being used with Kotlin 1.7.10

## [4.3.0](https://github.com/builttoroam/device_calendar/releases/tag/4.3.0)

- Updated multiple underlying dependencies
- *Note:* `timezone 0.9.0` [removed named database files](https://pub.dev/packages/timezone/changelog#090). If you are only using `device_calendar`, you can ignore this note.
- Added support for all-day multi-day events on iOS
- Fixed iOS issue of adding attendees to events
- Fixed Android issue of the `ownerAccount` being null

## [4.2.0](https://github.com/builttoroam/device_calendar/releases/tag/4.2.0)

Expand Down
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ If you don't need any timezone specific features in your app, you may use `flutt
```dart
import 'package:flutter_native_timezone/flutter_native_timezone.dart';

initializeTimeZones();

// As an example, our default timezone is UTC.
Location _currentLocation = getLocation('Etc/UTC');

Expand Down Expand Up @@ -78,6 +80,8 @@ The following will need to be added to the `AndroidManifest.xml` file for your a
```

### Proguard / R8 exceptions
> NOTE: From v4.3.2 developers no longer need to add proguard rule in their app.


By default, all android apps go through R8 for file shrinking when building a release version. Currently, it interferes with some functions such as `retrieveCalendars()`.

Expand Down Expand Up @@ -107,4 +111,17 @@ For iOS 10+ support, you'll need to modify the `Info.plist` to add the following
<string>Access contacts for event attendee editing.</string>
```

For iOS 17+ support, add the following key/value pair as well.

```xml
<key>NSCalendarsFullAccessUsageDescription</key>
<string>Access most functions for calendar viewing and editing.</string>
```

Note that on iOS, this is a Swift plugin. There is a known issue being tracked [here](https://github.com/flutter/flutter/issues/16049) by the Flutter team, where adding a plugin developed in Swift to an Objective-C project causes problems. If you run into such issues, please look at the suggested workarounds there.

## macOS Integration (Beta)

Available for macOS 10.15+. Tested only on Intel based Macs.

Make sure, you enable 'Calendar' in the 'App Sandbox' section under 'Signing & Capabilities' in Xcode.
8 changes: 5 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ group 'com.builttoroam.devicecalendar'
version '1.0-SNAPSHOT'

buildscript {
ext.kotlin_version = '1.6.0'
ext.kotlin_version = '1.8.22'
repositories {
google()
mavenCentral()
Expand All @@ -25,14 +25,15 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 30
compileSdkVersion 34

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
minSdkVersion 16
minSdkVersion 19
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'proguard-rules.pro'
}
lintOptions {
disable 'InvalidPackage'
Expand All @@ -45,6 +46,7 @@ android {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
namespace 'com.builttoroam.devicecalendar'
}

dependencies {
Expand Down
1 change: 1 addition & 0 deletions android/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-keep class com.builttoroam.devicecalendar.** { *; }
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ import com.builttoroam.devicecalendar.common.ErrorCodes.Companion as EC
import com.builttoroam.devicecalendar.common.ErrorMessages.Companion as EM
import org.dmfs.rfc5545.recur.Freq as RruleFreq
import org.dmfs.rfc5545.recur.RecurrenceRule as Rrule
import android.provider.CalendarContract.Colors
import androidx.collection.SparseArrayCompat

private const val RETRIEVE_CALENDARS_REQUEST_CODE = 0
private const val RETRIEVE_EVENTS_REQUEST_CODE = RETRIEVE_CALENDARS_REQUEST_CODE + 1
Expand Down Expand Up @@ -625,6 +627,8 @@ class CalendarDelegate(binding: ActivityPluginBinding?, context: Context) :
values.put(Events.DTEND, end)
values.put(Events.EVENT_END_TIMEZONE, endTimeZone)
values.put(Events.DURATION, duration)
values.put(Events.EVENT_COLOR_KEY, event.eventColorKey)
values.put(Events.EVENT_COLOR, event.eventColor)
return values
}

Expand Down Expand Up @@ -938,6 +942,8 @@ class CalendarDelegate(binding: ActivityPluginBinding?, context: Context) :
val endTimeZone = cursor.getString(Cst.EVENT_PROJECTION_END_TIMEZONE_INDEX)
val availability = parseAvailability(cursor.getInt(Cst.EVENT_PROJECTION_AVAILABILITY_INDEX))
val eventStatus = parseEventStatus(cursor.getInt(Cst.EVENT_PROJECTION_STATUS_INDEX))
val eventColor = cursor.getInt(Cst.EVENT_PROJECTION_EVENT_COLOR_INDEX)
val eventColorKey = cursor.getInt(Cst.EVENT_PROJECTION_EVENT_COLOR_KEY_INDEX)
val event = Event()
event.eventTitle = title ?: "New Event"
event.eventId = eventId.toString()
Expand All @@ -953,6 +959,8 @@ class CalendarDelegate(binding: ActivityPluginBinding?, context: Context) :
event.eventEndTimeZone = endTimeZone
event.availability = availability
event.eventStatus = eventStatus
event.eventColor = if (eventColor == 0) null else eventColor
event.eventColorKey = if (eventColorKey == 0) null else eventColorKey

return event
}
Expand Down Expand Up @@ -1125,6 +1133,73 @@ class CalendarDelegate(binding: ActivityPluginBinding?, context: Context) :
return reminders
}

/**
* load available event colors for the given account name
* unable to find official documentation, so logic is based on https://android.googlesource.com/platform/packages/apps/Calendar.git/+/refs/heads/pie-release/src/com/android/calendar/EventInfoFragment.java
**/
private fun retrieveColors(accountName: String, colorType: Int): List<Pair<Int, Int>> {
val contentResolver: ContentResolver? = _context?.contentResolver
val uri: Uri = Colors.CONTENT_URI
val colors = mutableListOf<Int>()
val displayColorKeyMap = SparseArrayCompat<Int>()

val projection = arrayOf(
Colors.COLOR,
Colors.COLOR_KEY,
)

// load only event colors for the given account name
val selection = "${Colors.COLOR_TYPE} = ? AND ${Colors.ACCOUNT_NAME} = ?"
val selectionArgs = arrayOf(colorType.toString(), accountName)


val cursor: Cursor? = contentResolver?.query(uri, projection, selection, selectionArgs, null)
cursor?.use {
while (it.moveToNext()) {
val color = it.getInt(it.getColumnIndexOrThrow(Colors.COLOR))
val colorKey = it.getInt(it.getColumnIndexOrThrow(Colors.COLOR_KEY))
displayColorKeyMap.put(color, colorKey);
colors.add(color)
}
cursor.close();
// sort colors by colorValue, since they are loaded unordered
colors.sortWith(HsvColorComparator())
}
return colors.map { Pair(it, displayColorKeyMap[it]!! ) }.toList()
}

fun retrieveEventColors(accountName: String): List<Pair<Int, Int>> {
return retrieveColors(accountName, Colors.TYPE_EVENT)
}
fun retrieveCalendarColors(accountName: String): List<Pair<Int, Int>> {
return retrieveColors(accountName, Colors.TYPE_CALENDAR)
}

fun updateCalendarColor(calendarId: Long, newColorKey: Int?, newColor: Int?): Boolean {
val contentResolver: ContentResolver? = _context?.contentResolver
val uri: Uri = ContentUris.withAppendedId(CalendarContract.Calendars.CONTENT_URI, calendarId)
val values = ContentValues().apply {
put(CalendarContract.Calendars.CALENDAR_COLOR_KEY, newColorKey)
put(CalendarContract.Calendars.CALENDAR_COLOR, newColor)
}
val rows = contentResolver?.update(uri, values, null, null)
return (rows ?: 0) > 0
}

/**
* Compares colors based on their hue values in the HSV color space.
* https://android.googlesource.com/platform/prebuilts/fullsdk/sources/+/refs/heads/androidx-compose-integration-release/android-34/com/android/colorpicker/HsvColorComparator.java
*/
private class HsvColorComparator : Comparator<Int> {
override fun compare(color1: Int, color2: Int): Int {
val hsv1 = FloatArray(3)
val hsv2 = FloatArray(3)
Color.colorToHSV(color1, hsv1)
Color.colorToHSV(color2, hsv2)
return hsv1[0].compareTo(hsv2[0])
}
}

@Synchronized
private fun generateUniqueRequestCodeAndCacheParameters(parameters: CalendarMethodsParametersCacheModel): Int {
// TODO we can ran out of Int's at some point so this probably should re-use some of the freed ones
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,14 @@ private const val DELETE_EVENT_INSTANCE_METHOD = "deleteEventInstance"
private const val CREATE_OR_UPDATE_EVENT_METHOD = "createOrUpdateEvent"
private const val CREATE_CALENDAR_METHOD = "createCalendar"
private const val DELETE_CALENDAR_METHOD = "deleteCalendar"
private const val RETRIEVE_EVENT_COLORS_METHOD = "retrieveEventColors"
private const val RETRIEVE_CALENDAR_COLORS_METHOD = "retrieveCalendarColors"
private const val UPDATE_CALENDAR_COLOR = "updateCalendarColor"

// Method arguments
private const val CALENDAR_ID_ARGUMENT = "calendarId"
private const val CALENDAR_NAME_ARGUMENT = "calendarName"
private const val CALENDAR_ACCOUNT_NAME_ARGUMENT = "accountName"
private const val START_DATE_ARGUMENT = "startDate"
private const val END_DATE_ARGUMENT = "endDate"
private const val EVENT_IDS_ARGUMENT = "eventIds"
Expand Down Expand Up @@ -66,6 +70,8 @@ private const val LOCAL_ACCOUNT_NAME_ARGUMENT = "localAccountName"
private const val EVENT_AVAILABILITY_ARGUMENT = "availability"
private const val ATTENDANCE_STATUS_ARGUMENT = "attendanceStatus"
private const val EVENT_STATUS_ARGUMENT = "eventStatus"
private const val EVENT_COLOR_KEY_ARGUMENT = "eventColorKey"
private const val CALENDAR_COLOR_KEY_ARGUMENT = "calendarColorKey"

class DeviceCalendarPlugin : FlutterPlugin, MethodCallHandler, ActivityAware {

Expand Down Expand Up @@ -171,6 +177,35 @@ class DeviceCalendarPlugin : FlutterPlugin, MethodCallHandler, ActivityAware {
val calendarId = call.argument<String>(CALENDAR_ID_ARGUMENT)
_calendarDelegate.deleteCalendar(calendarId!!, result)
}
RETRIEVE_EVENT_COLORS_METHOD -> {
val accountName = call.argument<String>(CALENDAR_ACCOUNT_NAME_ARGUMENT)
if (accountName == null) {
result.success(intArrayOf())
return;
}
val colors = _calendarDelegate.retrieveEventColors(accountName!!, )
result.success(colors.map { listOf(it.first, it.second) })
}
RETRIEVE_CALENDAR_COLORS_METHOD -> {
val accountName = call.argument<String>(CALENDAR_ACCOUNT_NAME_ARGUMENT)
if (accountName == null) {
result.success(intArrayOf())
return;
}
val colors = _calendarDelegate.retrieveCalendarColors(accountName)
result.success(colors.map { listOf(it.first, it.second) })
}
UPDATE_CALENDAR_COLOR -> {
val calendarId = call.argument<Number>(CALENDAR_ID_ARGUMENT)?.toLong()
if (calendarId == null) {
result.success(false)
return
}
val newColorKey = (call.argument<Number>(CALENDAR_COLOR_KEY_ARGUMENT))?.toInt()
val newColor = (call.argument<Number>(CALENDAR_COLOR_ARGUMENT))?.toInt()
val success = _calendarDelegate.updateCalendarColor(calendarId, newColorKey, newColor)
result.success(success)
}
else -> {
result.notImplemented()
}
Expand All @@ -192,6 +227,7 @@ class DeviceCalendarPlugin : FlutterPlugin, MethodCallHandler, ActivityAware {
event.eventURL = call.argument<String>(EVENT_URL_ARGUMENT)
event.availability = parseAvailability(call.argument<String>(EVENT_AVAILABILITY_ARGUMENT))
event.eventStatus = parseEventStatus(call.argument<String>(EVENT_STATUS_ARGUMENT))
event.eventColorKey = call.argument<Int>(EVENT_COLOR_KEY_ARGUMENT)

if (call.hasArgument(RECURRENCE_RULE_ARGUMENT) && call.argument<Map<String, Any>>(
RECURRENCE_RULE_ARGUMENT
Expand Down
Loading
Loading