Skip to content

Commit e2a341c

Browse files
committed
[macos] Support macOS < 10.15 #4
1 parent fd92288 commit e2a341c

12 files changed

+43
-20
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.1.1
2+
3+
- [macos] Support macOS < 10.15 #4
4+
15
## 0.1.0
26

37
- First release.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021 LiJianying <[email protected]>
3+
Copyright (c) 2022 LiJianying <[email protected]>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README-ZH.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747

4848
```yaml
4949
dependencies:
50-
local_notifier: ^0.1.0
50+
local_notifier: ^0.1.1
5151
```
5252
5353

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Add this to your package's pubspec.yaml file:
4747

4848
```yaml
4949
dependencies:
50-
local_notifier: ^0.1.0
50+
local_notifier: ^0.1.1
5151
```
5252
5353
Or

example/macos/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
platform :osx, '10.15'
1+
platform :osx, '10.11'
22

33
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
44
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

example/macos/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ EXTERNAL SOURCES:
1515

1616
SPEC CHECKSUMS:
1717
FlutterMacOS: 57701585bf7de1b3fc2bb61f6378d73bbdea8424
18-
local_notifier: 67b44a2825d7d99946ccd15c02d4e7910ded79c8
18+
local_notifier: e9506bc66fc70311e8bc7291fb70f743c081e4ff
1919

20-
PODFILE CHECKSUM: 0d3963a09fc94f580682bd88480486da345dc3f0
20+
PODFILE CHECKSUM: 6eac6b3292e5142cfc23bdeb71848a40ec51c14c
2121

2222
COCOAPODS: 1.11.2

example/macos/Runner.xcodeproj/project.pbxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@
403403
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
404404
GCC_WARN_UNUSED_FUNCTION = YES;
405405
GCC_WARN_UNUSED_VARIABLE = YES;
406-
MACOSX_DEPLOYMENT_TARGET = 10.15;
406+
MACOSX_DEPLOYMENT_TARGET = 10.11;
407407
MTL_ENABLE_DEBUG_INFO = NO;
408408
SDKROOT = macosx;
409409
SWIFT_COMPILATION_MODE = wholemodule;
@@ -482,7 +482,7 @@
482482
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
483483
GCC_WARN_UNUSED_FUNCTION = YES;
484484
GCC_WARN_UNUSED_VARIABLE = YES;
485-
MACOSX_DEPLOYMENT_TARGET = 10.15;
485+
MACOSX_DEPLOYMENT_TARGET = 10.11;
486486
MTL_ENABLE_DEBUG_INFO = YES;
487487
ONLY_ACTIVE_ARCH = YES;
488488
SDKROOT = macosx;
@@ -529,7 +529,7 @@
529529
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
530530
GCC_WARN_UNUSED_FUNCTION = YES;
531531
GCC_WARN_UNUSED_VARIABLE = YES;
532-
MACOSX_DEPLOYMENT_TARGET = 10.15;
532+
MACOSX_DEPLOYMENT_TARGET = 10.11;
533533
MTL_ENABLE_DEBUG_INFO = NO;
534534
SDKROOT = macosx;
535535
SWIFT_COMPILATION_MODE = wholemodule;

example/pubspec.lock

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,21 @@ packages:
8787
path: ".."
8888
relative: true
8989
source: path
90-
version: "0.1.0"
90+
version: "0.1.1"
9191
matcher:
9292
dependency: transitive
9393
description:
9494
name: matcher
9595
url: "https://pub.dartlang.org"
9696
source: hosted
9797
version: "0.12.11"
98+
material_color_utilities:
99+
dependency: transitive
100+
description:
101+
name: material_color_utilities
102+
url: "https://pub.dartlang.org"
103+
source: hosted
104+
version: "0.1.3"
98105
meta:
99106
dependency: transitive
100107
description:
@@ -162,7 +169,7 @@ packages:
162169
name: test_api
163170
url: "https://pub.dartlang.org"
164171
source: hosted
165-
version: "0.4.3"
172+
version: "0.4.8"
166173
typed_data:
167174
dependency: transitive
168175
description:

lib/src/local_notifier.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import 'dart:async';
22

33
import 'package:flutter/services.dart';
4-
import 'package:local_notifier/local_notifier.dart';
54

65
import 'local_notification.dart';
76

8-
typedef LocalNotificationHandler = void Function(
9-
LocalNotification notification);
7+
// typedef LocalNotificationHandler = void Function(
8+
// LocalNotification notification);
109

1110
class LocalNotifier {
1211
LocalNotifier._() {
@@ -18,8 +17,8 @@ class LocalNotifier {
1817

1918
final MethodChannel _channel = const MethodChannel('local_notifier');
2019

21-
List<LocalNotification> _notificationList = [];
22-
Map<String, LocalNotificationHandler> _notificationHandlerMap = {};
20+
// List<LocalNotification> _notificationList = [];
21+
// Map<String, LocalNotificationHandler> _notificationHandlerMap = {};
2322

2423
Future<void> _methodCallHandler(MethodCall call) async {
2524
print(call.method);
@@ -30,6 +29,7 @@ class LocalNotifier {
3029
print(eventName);
3130
}
3231

32+
/// Immediately shows the notification to the user.
3333
Future<void> notify(LocalNotification notification) async {
3434
final Map<String, dynamic> arguments = notification.toJson();
3535
await _channel.invokeMethod('notify', arguments);

macos/local_notifier.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ A new flutter plugin project.
1616
s.source_files = 'Classes/**/*'
1717
s.dependency 'FlutterMacOS'
1818

19-
s.platform = :osx, '10.15'
19+
s.platform = :osx, '10.11'
2020
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
2121
s.swift_version = '5.0'
2222
end

pubspec.lock

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,13 @@ packages:
7474
url: "https://pub.dartlang.org"
7575
source: hosted
7676
version: "0.12.11"
77+
material_color_utilities:
78+
dependency: transitive
79+
description:
80+
name: material_color_utilities
81+
url: "https://pub.dartlang.org"
82+
source: hosted
83+
version: "0.1.3"
7784
meta:
7885
dependency: transitive
7986
description:
@@ -134,7 +141,7 @@ packages:
134141
name: test_api
135142
url: "https://pub.dartlang.org"
136143
source: hosted
137-
version: "0.4.3"
144+
version: "0.4.8"
138145
typed_data:
139146
dependency: transitive
140147
description:

pubspec.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
name: local_notifier
2-
description: This plugin allows Flutter desktop apps to notify local notifications.
3-
version: 0.1.0
2+
description: This plugin allows Flutter desktop apps to displaying local notifications.
3+
version: 0.1.1
44
homepage: https://github.com/leanflutter/local_notifier
55

6+
platforms:
7+
linux:
8+
macos:
9+
windows:
10+
611
environment:
712
sdk: ">=2.12.0 <3.0.0"
813
flutter: ">=1.20.0"

0 commit comments

Comments
 (0)