diff --git a/wakelock_plus/CHANGELOG.md b/wakelock_plus/CHANGELOG.md index 21d451e..f93ae80 100644 --- a/wakelock_plus/CHANGELOG.md +++ b/wakelock_plus/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.2.10 +* [#82](https://github.com/fluttercommunity/wakelock_plus/pull/82): fix: resolve symbol conflicts in wakelock_plus by updating Pigeon prefix. Thanks [weitsai](https://github.com/weitsai). + +## 1.2.9 +* [#70](https://github.com/fluttercommunity/wakelock_plus/pull/81) fixed resource bundle name in podspec. Thanks [Brazol](https://github.com/Brazol). + ## 1.2.8 * [#70](https://github.com/fluttercommunity/wakelock_plus/pull/70) chore(deps): Allow web ^1.0.0. Thanks [provokateurin](https://github.com/provokateurin). diff --git a/wakelock_plus/android/src/main/kotlin/dev/fluttercommunity/plus/wakelock/WakelockPlusMessages.g.kt b/wakelock_plus/android/src/main/kotlin/dev/fluttercommunity/plus/wakelock/WakelockPlusMessages.g.kt index de4e18f..e6701b1 100644 --- a/wakelock_plus/android/src/main/kotlin/dev/fluttercommunity/plus/wakelock/WakelockPlusMessages.g.kt +++ b/wakelock_plus/android/src/main/kotlin/dev/fluttercommunity/plus/wakelock/WakelockPlusMessages.g.kt @@ -1,4 +1,4 @@ -// Autogenerated from Pigeon (v21.2.0), do not edit directly. +// Autogenerated from Pigeon (v22.7.0), do not edit directly. // See also: https://pub.dev/packages/pigeon @file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") @@ -6,7 +6,9 @@ import android.util.Log import io.flutter.plugin.common.BasicMessageChannel import io.flutter.plugin.common.BinaryMessenger +import io.flutter.plugin.common.EventChannel import io.flutter.plugin.common.MessageCodec +import io.flutter.plugin.common.StandardMethodCodec import io.flutter.plugin.common.StandardMessageCodec import java.io.ByteArrayOutputStream import java.nio.ByteBuffer @@ -86,7 +88,7 @@ data class IsEnabledMessage ( ) } } -private object WakelockPlusMessagesPigeonCodec : StandardMessageCodec() { +private open class WakelockPlusMessagesPigeonCodec : StandardMessageCodec() { override fun readValueOfType(type: Byte, buffer: ByteBuffer): Any? { return when (type) { 129.toByte() -> { @@ -125,7 +127,7 @@ interface WakelockPlusApi { companion object { /** The codec used by WakelockPlusApi. */ val codec: MessageCodec by lazy { - WakelockPlusMessagesPigeonCodec + WakelockPlusMessagesPigeonCodec() } /** Sets up an instance of `WakelockPlusApi` to handle messages through the `binaryMessenger`. */ @JvmOverloads diff --git a/wakelock_plus/example/ios/Podfile.lock b/wakelock_plus/example/ios/Podfile.lock index 6ec0e84..48fcbdb 100644 --- a/wakelock_plus/example/ios/Podfile.lock +++ b/wakelock_plus/example/ios/Podfile.lock @@ -26,9 +26,9 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573 - package_info_plus: 58f0028419748fad15bf008b270aaa8e54380b1c - wakelock_plus: 78ec7c5b202cab7761af8e2b2b3d0671be6c4ae1 + package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4 + wakelock_plus: 373cfe59b235a6dd5837d0fb88791d2f13a90d56 PODFILE CHECKSUM: beab77b38961de946f08660e554f80ac174dc842 -COCOAPODS: 1.15.2 +COCOAPODS: 1.16.1 diff --git a/wakelock_plus/ios/Classes/WakelockPlusPlugin.m b/wakelock_plus/ios/Classes/WakelockPlusPlugin.m index 9532863..c5857fe 100644 --- a/wakelock_plus/ios/Classes/WakelockPlusPlugin.m +++ b/wakelock_plus/ios/Classes/WakelockPlusPlugin.m @@ -2,7 +2,7 @@ #import "messages.g.h" #import "UIApplication+idleTimerLock.h" -@interface WakelockPlusPlugin () +@interface WakelockPlusPlugin () @property (nonatomic, assign) BOOL enable; @@ -11,10 +11,10 @@ @interface WakelockPlusPlugin () @implementation WakelockPlusPlugin + (void)registerWithRegistrar:(NSObject*)registrar { WakelockPlusPlugin* instance = [[WakelockPlusPlugin alloc] init]; - SetUpFLTWakelockPlusApi(registrar.messenger, instance); + SetUpWAKELOCKPLUSWakelockPlusApi(registrar.messenger, instance); } -- (void)toggleMsg:(FLTToggleMessage*)input error:(FlutterError**)error { +- (void)toggleMsg:(WAKELOCKPLUSToggleMessage*)input error:(FlutterError**)error { BOOL enable = [input.enable boolValue]; if (!enable) { [[UIApplication sharedApplication] lock_idleTimerlockEnable:enable];//should disable first @@ -34,9 +34,9 @@ - (void)setIdleTimerDisabled:(BOOL)enable { } -- (FLTIsEnabledMessage*)isEnabledWithError:(FlutterError* __autoreleasing *)error { +- (WAKELOCKPLUSIsEnabledMessage*)isEnabledWithError:(FlutterError* __autoreleasing *)error { NSNumber *enabled = [NSNumber numberWithBool:[[UIApplication sharedApplication] isIdleTimerDisabled]]; - FLTIsEnabledMessage* result = [[FLTIsEnabledMessage alloc] init]; + WAKELOCKPLUSIsEnabledMessage* result = [[WAKELOCKPLUSIsEnabledMessage alloc] init]; result.enabled = enabled; return result; } diff --git a/wakelock_plus/ios/Classes/messages.g.h b/wakelock_plus/ios/Classes/messages.g.h index 3398c43..f73f840 100644 --- a/wakelock_plus/ios/Classes/messages.g.h +++ b/wakelock_plus/ios/Classes/messages.g.h @@ -1,4 +1,4 @@ -// Autogenerated from Pigeon (v21.2.0), do not edit directly. +// Autogenerated from Pigeon (v22.7.0), do not edit directly. // See also: https://pub.dev/packages/pigeon #import @@ -10,32 +10,32 @@ NS_ASSUME_NONNULL_BEGIN -@class FLTToggleMessage; -@class FLTIsEnabledMessage; +@class WAKELOCKPLUSToggleMessage; +@class WAKELOCKPLUSIsEnabledMessage; /// Message for toggling the wakelock on the platform side. -@interface FLTToggleMessage : NSObject +@interface WAKELOCKPLUSToggleMessage : NSObject + (instancetype)makeWithEnable:(nullable NSNumber *)enable; @property(nonatomic, strong, nullable) NSNumber * enable; @end /// Message for reporting the wakelock state from the platform side. -@interface FLTIsEnabledMessage : NSObject +@interface WAKELOCKPLUSIsEnabledMessage : NSObject + (instancetype)makeWithEnabled:(nullable NSNumber *)enabled; @property(nonatomic, strong, nullable) NSNumber * enabled; @end /// The codec used by all APIs. -NSObject *FLTGetMessagesCodec(void); +NSObject *WAKELOCKPLUSGetMessagesCodec(void); -@protocol FLTWakelockPlusApi -- (void)toggleMsg:(FLTToggleMessage *)msg error:(FlutterError *_Nullable *_Nonnull)error; +@protocol WAKELOCKPLUSWakelockPlusApi +- (void)toggleMsg:(WAKELOCKPLUSToggleMessage *)msg error:(FlutterError *_Nullable *_Nonnull)error; /// @return `nil` only when `error != nil`. -- (nullable FLTIsEnabledMessage *)isEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; +- (nullable WAKELOCKPLUSIsEnabledMessage *)isEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; @end -extern void SetUpFLTWakelockPlusApi(id binaryMessenger, NSObject *_Nullable api); +extern void SetUpWAKELOCKPLUSWakelockPlusApi(id binaryMessenger, NSObject *_Nullable api); -extern void SetUpFLTWakelockPlusApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); +extern void SetUpWAKELOCKPLUSWakelockPlusApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); NS_ASSUME_NONNULL_END diff --git a/wakelock_plus/ios/Classes/messages.g.m b/wakelock_plus/ios/Classes/messages.g.m index 19a06dd..9a7105c 100644 --- a/wakelock_plus/ios/Classes/messages.g.m +++ b/wakelock_plus/ios/Classes/messages.g.m @@ -1,4 +1,4 @@ -// Autogenerated from Pigeon (v21.2.0), do not edit directly. +// Autogenerated from Pigeon (v22.7.0), do not edit directly. // See also: https://pub.dev/packages/pigeon #import "messages.g.h" @@ -27,31 +27,31 @@ static id GetNullableObjectAtIndex(NSArray *array, NSInteger key) { return (result == [NSNull null]) ? nil : result; } -@interface FLTToggleMessage () -+ (FLTToggleMessage *)fromList:(NSArray *)list; -+ (nullable FLTToggleMessage *)nullableFromList:(NSArray *)list; +@interface WAKELOCKPLUSToggleMessage () ++ (WAKELOCKPLUSToggleMessage *)fromList:(NSArray *)list; ++ (nullable WAKELOCKPLUSToggleMessage *)nullableFromList:(NSArray *)list; - (NSArray *)toList; @end -@interface FLTIsEnabledMessage () -+ (FLTIsEnabledMessage *)fromList:(NSArray *)list; -+ (nullable FLTIsEnabledMessage *)nullableFromList:(NSArray *)list; +@interface WAKELOCKPLUSIsEnabledMessage () ++ (WAKELOCKPLUSIsEnabledMessage *)fromList:(NSArray *)list; ++ (nullable WAKELOCKPLUSIsEnabledMessage *)nullableFromList:(NSArray *)list; - (NSArray *)toList; @end -@implementation FLTToggleMessage +@implementation WAKELOCKPLUSToggleMessage + (instancetype)makeWithEnable:(nullable NSNumber *)enable { - FLTToggleMessage* pigeonResult = [[FLTToggleMessage alloc] init]; + WAKELOCKPLUSToggleMessage* pigeonResult = [[WAKELOCKPLUSToggleMessage alloc] init]; pigeonResult.enable = enable; return pigeonResult; } -+ (FLTToggleMessage *)fromList:(NSArray *)list { - FLTToggleMessage *pigeonResult = [[FLTToggleMessage alloc] init]; ++ (WAKELOCKPLUSToggleMessage *)fromList:(NSArray *)list { + WAKELOCKPLUSToggleMessage *pigeonResult = [[WAKELOCKPLUSToggleMessage alloc] init]; pigeonResult.enable = GetNullableObjectAtIndex(list, 0); return pigeonResult; } -+ (nullable FLTToggleMessage *)nullableFromList:(NSArray *)list { - return (list) ? [FLTToggleMessage fromList:list] : nil; ++ (nullable WAKELOCKPLUSToggleMessage *)nullableFromList:(NSArray *)list { + return (list) ? [WAKELOCKPLUSToggleMessage fromList:list] : nil; } - (NSArray *)toList { return @[ @@ -60,19 +60,19 @@ + (nullable FLTToggleMessage *)nullableFromList:(NSArray *)list { } @end -@implementation FLTIsEnabledMessage +@implementation WAKELOCKPLUSIsEnabledMessage + (instancetype)makeWithEnabled:(nullable NSNumber *)enabled { - FLTIsEnabledMessage* pigeonResult = [[FLTIsEnabledMessage alloc] init]; + WAKELOCKPLUSIsEnabledMessage* pigeonResult = [[WAKELOCKPLUSIsEnabledMessage alloc] init]; pigeonResult.enabled = enabled; return pigeonResult; } -+ (FLTIsEnabledMessage *)fromList:(NSArray *)list { - FLTIsEnabledMessage *pigeonResult = [[FLTIsEnabledMessage alloc] init]; ++ (WAKELOCKPLUSIsEnabledMessage *)fromList:(NSArray *)list { + WAKELOCKPLUSIsEnabledMessage *pigeonResult = [[WAKELOCKPLUSIsEnabledMessage alloc] init]; pigeonResult.enabled = GetNullableObjectAtIndex(list, 0); return pigeonResult; } -+ (nullable FLTIsEnabledMessage *)nullableFromList:(NSArray *)list { - return (list) ? [FLTIsEnabledMessage fromList:list] : nil; ++ (nullable WAKELOCKPLUSIsEnabledMessage *)nullableFromList:(NSArray *)list { + return (list) ? [WAKELOCKPLUSIsEnabledMessage fromList:list] : nil; } - (NSArray *)toList { return @[ @@ -81,29 +81,29 @@ + (nullable FLTIsEnabledMessage *)nullableFromList:(NSArray *)list { } @end -@interface FLTMessagesPigeonCodecReader : FlutterStandardReader +@interface WAKELOCKPLUSMessagesPigeonCodecReader : FlutterStandardReader @end -@implementation FLTMessagesPigeonCodecReader +@implementation WAKELOCKPLUSMessagesPigeonCodecReader - (nullable id)readValueOfType:(UInt8)type { switch (type) { case 129: - return [FLTToggleMessage fromList:[self readValue]]; + return [WAKELOCKPLUSToggleMessage fromList:[self readValue]]; case 130: - return [FLTIsEnabledMessage fromList:[self readValue]]; + return [WAKELOCKPLUSIsEnabledMessage fromList:[self readValue]]; default: return [super readValueOfType:type]; } } @end -@interface FLTMessagesPigeonCodecWriter : FlutterStandardWriter +@interface WAKELOCKPLUSMessagesPigeonCodecWriter : FlutterStandardWriter @end -@implementation FLTMessagesPigeonCodecWriter +@implementation WAKELOCKPLUSMessagesPigeonCodecWriter - (void)writeValue:(id)value { - if ([value isKindOfClass:[FLTToggleMessage class]]) { + if ([value isKindOfClass:[WAKELOCKPLUSToggleMessage class]]) { [self writeByte:129]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FLTIsEnabledMessage class]]) { + } else if ([value isKindOfClass:[WAKELOCKPLUSIsEnabledMessage class]]) { [self writeByte:130]; [self writeValue:[value toList]]; } else { @@ -112,43 +112,43 @@ - (void)writeValue:(id)value { } @end -@interface FLTMessagesPigeonCodecReaderWriter : FlutterStandardReaderWriter +@interface WAKELOCKPLUSMessagesPigeonCodecReaderWriter : FlutterStandardReaderWriter @end -@implementation FLTMessagesPigeonCodecReaderWriter +@implementation WAKELOCKPLUSMessagesPigeonCodecReaderWriter - (FlutterStandardWriter *)writerWithData:(NSMutableData *)data { - return [[FLTMessagesPigeonCodecWriter alloc] initWithData:data]; + return [[WAKELOCKPLUSMessagesPigeonCodecWriter alloc] initWithData:data]; } - (FlutterStandardReader *)readerWithData:(NSData *)data { - return [[FLTMessagesPigeonCodecReader alloc] initWithData:data]; + return [[WAKELOCKPLUSMessagesPigeonCodecReader alloc] initWithData:data]; } @end -NSObject *FLTGetMessagesCodec(void) { +NSObject *WAKELOCKPLUSGetMessagesCodec(void) { static FlutterStandardMessageCodec *sSharedObject = nil; static dispatch_once_t sPred = 0; dispatch_once(&sPred, ^{ - FLTMessagesPigeonCodecReaderWriter *readerWriter = [[FLTMessagesPigeonCodecReaderWriter alloc] init]; + WAKELOCKPLUSMessagesPigeonCodecReaderWriter *readerWriter = [[WAKELOCKPLUSMessagesPigeonCodecReaderWriter alloc] init]; sSharedObject = [FlutterStandardMessageCodec codecWithReaderWriter:readerWriter]; }); return sSharedObject; } -void SetUpFLTWakelockPlusApi(id binaryMessenger, NSObject *api) { - SetUpFLTWakelockPlusApiWithSuffix(binaryMessenger, api, @""); +void SetUpWAKELOCKPLUSWakelockPlusApi(id binaryMessenger, NSObject *api) { + SetUpWAKELOCKPLUSWakelockPlusApiWithSuffix(binaryMessenger, api, @""); } -void SetUpFLTWakelockPlusApiWithSuffix(id binaryMessenger, NSObject *api, NSString *messageChannelSuffix) { +void SetUpWAKELOCKPLUSWakelockPlusApiWithSuffix(id binaryMessenger, NSObject *api, NSString *messageChannelSuffix) { messageChannelSuffix = messageChannelSuffix.length > 0 ? [NSString stringWithFormat: @".%@", messageChannelSuffix] : @""; { FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.wakelock_plus_platform_interface.WakelockPlusApi.toggle", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FLTGetMessagesCodec()]; + codec:WAKELOCKPLUSGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(toggleMsg:error:)], @"FLTWakelockPlusApi api (%@) doesn't respond to @selector(toggleMsg:error:)", api); + NSCAssert([api respondsToSelector:@selector(toggleMsg:error:)], @"WAKELOCKPLUSWakelockPlusApi api (%@) doesn't respond to @selector(toggleMsg:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; - FLTToggleMessage *arg_msg = GetNullableObjectAtIndex(args, 0); + WAKELOCKPLUSToggleMessage *arg_msg = GetNullableObjectAtIndex(args, 0); FlutterError *error; [api toggleMsg:arg_msg error:&error]; callback(wrapResult(nil, error)); @@ -162,12 +162,12 @@ void SetUpFLTWakelockPlusApiWithSuffix(id binaryMessenge [[FlutterBasicMessageChannel alloc] initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.wakelock_plus_platform_interface.WakelockPlusApi.isEnabled", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FLTGetMessagesCodec()]; + codec:WAKELOCKPLUSGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(isEnabledWithError:)], @"FLTWakelockPlusApi api (%@) doesn't respond to @selector(isEnabledWithError:)", api); + NSCAssert([api respondsToSelector:@selector(isEnabledWithError:)], @"WAKELOCKPLUSWakelockPlusApi api (%@) doesn't respond to @selector(isEnabledWithError:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; - FLTIsEnabledMessage *output = [api isEnabledWithError:&error]; + WAKELOCKPLUSIsEnabledMessage *output = [api isEnabledWithError:&error]; callback(wrapResult(output, error)); }]; } else { diff --git a/wakelock_plus/ios/wakelock_plus.podspec b/wakelock_plus/ios/wakelock_plus.podspec index 2b83d31..0e6b79b 100644 --- a/wakelock_plus/ios/wakelock_plus.podspec +++ b/wakelock_plus/ios/wakelock_plus.podspec @@ -20,5 +20,5 @@ Plugin that allows you to keep the device screen awake, i.e. prevent the screen # Flutter.framework does not contain a i386 slice. s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } - s.resource_bundles = {'thermal' => ['Resources/PrivacyInfo.xcprivacy']} + s.resource_bundles = {'wakelock_plus_privacy' => ['Resources/PrivacyInfo.xcprivacy']} end diff --git a/wakelock_plus/pigeons/messages.dart b/wakelock_plus/pigeons/messages.dart index 9ee49a1..f179cf0 100644 --- a/wakelock_plus/pigeons/messages.dart +++ b/wakelock_plus/pigeons/messages.dart @@ -16,7 +16,7 @@ class IsEnabledMessage { objcHeaderOut: 'ios/Classes/messages.g.h', objcSourceOut: 'ios/Classes/messages.g.m', objcOptions: ObjcOptions( - prefix: 'FLT', + prefix: 'WAKELOCKPLUS', ), kotlinOptions: KotlinOptions(errorClassName: "WakelockPlusFlutterError"), kotlinOut: diff --git a/wakelock_plus/pubspec.yaml b/wakelock_plus/pubspec.yaml index 5beb3eb..1815519 100644 --- a/wakelock_plus/pubspec.yaml +++ b/wakelock_plus/pubspec.yaml @@ -2,7 +2,7 @@ name: wakelock_plus description: >-2 Plugin that allows you to keep the device screen awake, i.e. prevent the screen from sleeping on Android, iOS, macOS, Windows, Linux, and web. -version: 1.2.8 +version: 1.2.10 repository: https://github.com/fluttercommunity/wakelock_plus/tree/main/wakelock_plus environment: @@ -15,7 +15,7 @@ dependencies: flutter_web_plugins: sdk: flutter meta: ^1.11.0 - wakelock_plus_platform_interface: ^1.2.1 + wakelock_plus_platform_interface: ^1.2.2 # Windows dependencies # win32 is compatible across v5 for Win32 only (not COM) @@ -32,7 +32,7 @@ dev_dependencies: flutter_test: sdk: flutter flutter_lints: ^5.0.0 - pigeon: ^21.2.0 # dart run pigeon --input "pigeons/messages.dart" + pigeon: ^22.7.0 # dart run pigeon --input "pigeons/messages.dart" # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec @@ -99,4 +99,4 @@ flutter: # https://flutter.dev/custom-fonts/#from-packages assets: - - packages/wakelock_plus/assets/no_sleep.js + - assets/no_sleep.js diff --git a/wakelock_plus_platform_interface/CHANGELOG.md b/wakelock_plus_platform_interface/CHANGELOG.md index f89553b..41df490 100644 --- a/wakelock_plus_platform_interface/CHANGELOG.md +++ b/wakelock_plus_platform_interface/CHANGELOG.md @@ -1,3 +1,6 @@ +## [1.2.2] +* [#82](https://github.com/fluttercommunity/wakelock_plus/pull/82): fix: resolve symbol conflicts in wakelock_plus by updating Pigeon prefix. Thanks [weitsai](https://github.com/weitsai). + ## 1.2.1 * [#41](https://github.com/fluttercommunity/wakelock_plus/pull/41): Fix: dependency minimums adjustments. Thanks [diegotori](https://github.com/diegotori). diff --git a/wakelock_plus_platform_interface/lib/messages.g.dart b/wakelock_plus_platform_interface/lib/messages.g.dart index 14bdf76..fac93c4 100644 --- a/wakelock_plus_platform_interface/lib/messages.g.dart +++ b/wakelock_plus_platform_interface/lib/messages.g.dart @@ -1,4 +1,4 @@ -// Autogenerated from Pigeon (v21.2.0), do not edit directly. +// Autogenerated from Pigeon (v22.7.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers @@ -74,7 +74,10 @@ class _PigeonCodec extends StandardMessageCodec { const _PigeonCodec(); @override void writeValue(WriteBuffer buffer, Object? value) { - if (value is ToggleMessage) { + if (value is int) { + buffer.putUint8(4); + buffer.putInt64(value); + } else if (value is ToggleMessage) { buffer.putUint8(129); writeValue(buffer, value.encode()); } else if (value is IsEnabledMessage) { diff --git a/wakelock_plus_platform_interface/pubspec.yaml b/wakelock_plus_platform_interface/pubspec.yaml index cb3b825..e747f54 100644 --- a/wakelock_plus_platform_interface/pubspec.yaml +++ b/wakelock_plus_platform_interface/pubspec.yaml @@ -2,7 +2,7 @@ name: wakelock_plus_platform_interface description: >-2 A common platform interface for the wakelock_plus plugin used by the different platform implementations. -version: 1.2.1 +version: 1.2.2 repository: >-2 https://github.com/fluttercommunity/wakelock_plus/tree/main/wakelock_plus_platform_interface @@ -20,4 +20,4 @@ dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^4.0.0 + flutter_lints: ^5.0.0 diff --git a/wakelock_plus_platform_interface/test/messages.g.dart b/wakelock_plus_platform_interface/test/messages.g.dart index c458d1f..3175f44 100644 --- a/wakelock_plus_platform_interface/test/messages.g.dart +++ b/wakelock_plus_platform_interface/test/messages.g.dart @@ -1,4 +1,4 @@ -// Autogenerated from Pigeon (v21.2.0), do not edit directly. +// Autogenerated from Pigeon (v22.7.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, unnecessary_import, no_leading_underscores_for_local_identifiers // ignore_for_file: avoid_relative_lib_imports @@ -14,7 +14,10 @@ class _PigeonCodec extends StandardMessageCodec { const _PigeonCodec(); @override void writeValue(WriteBuffer buffer, Object? value) { - if (value is ToggleMessage) { + if (value is int) { + buffer.putUint8(4); + buffer.putInt64(value); + } else if (value is ToggleMessage) { buffer.putUint8(129); writeValue(buffer, value.encode()); } else if (value is IsEnabledMessage) {