Skip to content

Commit

Permalink
Merge pull request #487 from builttoroam/align-develop-with-master
Browse files Browse the repository at this point in the history
Align develop with master
  • Loading branch information
IVLIVS-III authored May 20, 2023
2 parents 6d99ddd + 1e7ed58 commit 772ee6b
Show file tree
Hide file tree
Showing 15 changed files with 256 additions and 225 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@

<!-- 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.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
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
package com.builttoroam.devicecalendar.models

class Calendar(val id: String, val name: String, val color : Int, val accountName: String, val accountType: String, val ownerAccount: String?) {
class Calendar(
val id: String,
val name: String,
val color: Int,
val accountName: String,
val accountType: String,
val ownerAccount: String?
) {
var isReadOnly: Boolean = false
var isDefault: Boolean = false
}
}
2 changes: 1 addition & 1 deletion example/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ linter:
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
# https://dart.dev/guides/language/analysis-options
2 changes: 1 addition & 1 deletion example/ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
<string>arm64</string>
</array>
<key>MinimumOSVersion</key>
<string>9.0</string>
<string>11.0</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
platform :ios, '9.0'
platform :ios, '11.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
4 changes: 2 additions & 2 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ SPEC CHECKSUMS:
device_calendar: 9cb33f88a02e19652ec7b8b122ca778f751b1f7b
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_native_timezone: 5f05b2de06c9776b4cc70e1839f03de178394d22
integration_test: a1e7d09bd98eca2fc37aefd79d4f41ad37bdbbe5
integration_test: 13825b8a9334a850581300559b8839134b124670

PODFILE CHECKSUM: d3740c426905916d1f2ada0ddfce28cc99f7b7af
PODFILE CHECKSUM: 10625bdc9b9ef8574174815aabd5b048e6e29bff

COCOAPODS: 1.11.3
11 changes: 7 additions & 4 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -161,7 +161,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1240;
LastUpgradeCheck = 1300;
ORGANIZATIONNAME = "The Chromium Authors";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down Expand Up @@ -229,10 +229,12 @@
};
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Thin Binary";
outputPaths = (
Expand All @@ -243,6 +245,7 @@
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand Down Expand Up @@ -355,7 +358,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -405,7 +408,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1240"
LastUpgradeVersion = "1300"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
4 changes: 4 additions & 0 deletions example/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,9 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>
70 changes: 36 additions & 34 deletions example/lib/presentation/pages/calendar_event.dart
Original file line number Diff line number Diff line change
Expand Up @@ -289,36 +289,37 @@ class _CalendarEventPageState extends State<CalendarEventPage> {
setState(() => _event?.allDay = value),
title: const Text('All Day'),
),
Padding(
padding: const EdgeInsets.all(10.0),
child: DateTimePicker(
labelText: 'From',
enableTime: _event?.allDay == false,
selectedDate: _startDate,
selectedTime: _startTime,
selectDate: (DateTime date) {
setState(() {
var currentLocation =
timeZoneDatabase.locations[_timezone];
if (currentLocation != null) {
_startDate =
TZDateTime.from(date, currentLocation);
_event?.start = _combineDateWithTime(
_startDate, _startTime);
}
});
},
selectTime: (TimeOfDay time) {
setState(
() {
_startTime = time;
_event?.start = _combineDateWithTime(
_startDate, _startTime);
},
);
},
if (_startDate != null)
Padding(
padding: const EdgeInsets.all(10.0),
child: DateTimePicker(
labelText: 'From',
enableTime: _event?.allDay == false,
selectedDate: _startDate,
selectedTime: _startTime,
selectDate: (DateTime date) {
setState(() {
var currentLocation =
timeZoneDatabase.locations[_timezone];
if (currentLocation != null) {
_startDate =
TZDateTime.from(date, currentLocation);
_event?.start = _combineDateWithTime(
_startDate, _startTime);
}
});
},
selectTime: (TimeOfDay time) {
setState(
() {
_startTime = time;
_event?.start = _combineDateWithTime(
_startDate, _startTime);
},
);
},
),
),
),
if ((_event?.allDay == false) && Platform.isAndroid)
Padding(
padding: const EdgeInsets.all(10.0),
Expand Down Expand Up @@ -403,14 +404,14 @@ class _CalendarEventPageState extends State<CalendarEventPage> {
ListView.builder(
physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemCount: (_attendees ?? []).length,
itemCount: _attendees?.length ?? 0,
itemBuilder: (context, index) {
return Container(
color: (_attendees?[index].isOrganiser ?? false)
? MediaQuery.of(context).platformBrightness ==
Brightness.dark
? Colors.black26
: Colors.greenAccent[100]
Brightness.dark
? Colors.black26
: Colors.greenAccent[100]
: Colors.transparent,
child: ListTile(
onTap: () async {
Expand Down Expand Up @@ -537,7 +538,7 @@ class _CalendarEventPageState extends State<CalendarEventPage> {
spacing: 10.0,
children: [
const Icon(Icons.alarm),
if (_reminders?.isEmpty ?? false)
if (_reminders?.isEmpty ?? true)
Text(_calendar.isReadOnly == false
? 'Add reminders'
: 'Reminders'),
Expand Down Expand Up @@ -973,6 +974,7 @@ class _CalendarEventPageState extends State<CalendarEventPage> {
AutovalidateMode.always; // Start validating on every change.
showInSnackBar(
context, 'Please fix the errors in red before submitting.');
return;
} else {
form?.save();
_adjustStartEnd();
Expand Down
1 change: 0 additions & 1 deletion example/lib/presentation/pages/calendar_events.dart
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ class _CalendarEventsPageState extends State<CalendarEventsPage> {

Future _retrieveCalendarEvents() async {
final startDate = DateTime.now().add(const Duration(days: -30));
// final endDate = DateTime.now().add(Duration(days: 365 * 2));
final endDate = DateTime.now().add(const Duration(days: 365 * 10));
var calendarEventsResult = await _deviceCalendarPlugin.retrieveEvents(
_calendar.id,
Expand Down
2 changes: 1 addition & 1 deletion example/lib/presentation/pages/event_attendee.dart
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class _EventAttendeePageState extends State<EventAttendeePage> {
onTap: () async {
_deviceCalendarPlugin = DeviceCalendarPlugin();

var result = await _deviceCalendarPlugin
await _deviceCalendarPlugin
.showiOSEventModal(_eventId);
Navigator.popUntil(
context, ModalRoute.withName(AppRoutes.calendars));
Expand Down
Loading

0 comments on commit 772ee6b

Please sign in to comment.