creativecreatorormaybenot
Committed by GitHub

Bump pigeon (#50)

* Bump pigeon

* Finish
  1 +## 0.2.0+2
  2 +
  3 +* Bumped pigeon to `0.1.14`.
  4 +
1 ## 0.2.0+1 5 ## 0.2.0+1
2 6
3 * Fix iOS build issue by bumping the `wakelock_web` dependency. 7 * Fix iOS build issue by bumping the `wakelock_web` dependency.
1 -// Autogenerated from Pigeon (v0.1.7), do not edit directly. 1 +// Autogenerated from Pigeon (v0.1.14), do not edit directly.
2 // See also: https://pub.dev/packages/pigeon 2 // See also: https://pub.dev/packages/pigeon
3 package creativemaybeno.wakelock 3 package creativemaybeno.wakelock
4 4
5 import io.flutter.plugin.common.BasicMessageChannel 5 import io.flutter.plugin.common.BasicMessageChannel
6 import io.flutter.plugin.common.BinaryMessenger 6 import io.flutter.plugin.common.BinaryMessenger
7 import io.flutter.plugin.common.StandardMessageCodec 7 import io.flutter.plugin.common.StandardMessageCodec
8 -import java.util.* 8 +import java.util.ArrayList
  9 +import java.util.HashMap
9 10
10 /** Generated class from Pigeon. */ 11 /** Generated class from Pigeon. */
11 object Messages { 12 object Messages {
12 - private fun wrapError(exception: Exception): HashMap<*, *> {  
13 - val errorMap = HashMap<String, Any?>()  
14 - errorMap["message"] = exception.toString()  
15 - errorMap["code"] = null  
16 - errorMap["details"] = null 13 + private fun wrapError(exception: Exception): HashMap {
  14 + val errorMap: HashMap<String, Object> = HashMap()
  15 + errorMap.put("message", exception.toString())
  16 + errorMap.put("code", exception.getClass().getSimpleName())
  17 + errorMap.put("details", null)
17 return errorMap 18 return errorMap
18 } 19 }
19 20
@@ -28,17 +29,17 @@ object Messages { @@ -28,17 +29,17 @@ object Messages {
28 enable = setterArg 29 enable = setterArg
29 } 30 }
30 31
31 - fun toMap(): HashMap<*, *> {  
32 - val toMapResult = HashMap<String, Any?>()  
33 - toMapResult["enable"] = enable 32 + fun toMap(): HashMap {
  33 + val toMapResult: HashMap<String, Object> = HashMap()
  34 + toMapResult.put("enable", enable)
34 return toMapResult 35 return toMapResult
35 } 36 }
36 37
37 companion object { 38 companion object {
38 - fun fromMap(map: HashMap<*, *>?): ToggleMessage { 39 + fun fromMap(map: HashMap): ToggleMessage {
39 val fromMapResult = ToggleMessage() 40 val fromMapResult = ToggleMessage()
40 - val enable = map!!["enable"]  
41 - fromMapResult.enable = enable as Boolean? 41 + val enable: Object = map.get("enable")
  42 + fromMapResult.enable = enable
42 return fromMapResult 43 return fromMapResult
43 } 44 }
44 } 45 }
@@ -55,17 +56,17 @@ object Messages { @@ -55,17 +56,17 @@ object Messages {
55 enabled = setterArg 56 enabled = setterArg
56 } 57 }
57 58
58 - fun toMap(): HashMap<*, *> {  
59 - val toMapResult = HashMap<String, Any?>()  
60 - toMapResult["enabled"] = enabled 59 + fun toMap(): HashMap {
  60 + val toMapResult: HashMap<String, Object> = HashMap()
  61 + toMapResult.put("enabled", enabled)
61 return toMapResult 62 return toMapResult
62 } 63 }
63 64
64 companion object { 65 companion object {
65 - fun fromMap(map: HashMap<*, *>): IsEnabledMessage { 66 + fun fromMap(map: HashMap): IsEnabledMessage {
66 val fromMapResult = IsEnabledMessage() 67 val fromMapResult = IsEnabledMessage()
67 - val enabled = map["enabled"]  
68 - fromMapResult.enabled = enabled as Boolean? 68 + val enabled: Object = map.get("enabled")
  69 + fromMapResult.enabled = enabled
69 return fromMapResult 70 return fromMapResult
70 } 71 }
71 } 72 }
@@ -80,16 +81,16 @@ object Messages { @@ -80,16 +81,16 @@ object Messages {
80 /** Sets up an instance of `WakelockApi` to handle messages through the `binaryMessenger` */ 81 /** Sets up an instance of `WakelockApi` to handle messages through the `binaryMessenger` */
81 fun setup(binaryMessenger: BinaryMessenger?, api: WakelockApi?) { 82 fun setup(binaryMessenger: BinaryMessenger?, api: WakelockApi?) {
82 run { 83 run {
83 - val channel = BasicMessageChannel(binaryMessenger!!, "dev.flutter.pigeon.WakelockApi.toggle", StandardMessageCodec()) 84 + val channel: BasicMessageChannel<Object> = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.WakelockApi.toggle", StandardMessageCodec())
84 if (api != null) { 85 if (api != null) {
85 - channel.setMessageHandler { message: Any?, reply: BasicMessageChannel.Reply<Any> ->  
86 - val wrapped = HashMap<String, HashMap<*, *>?>() 86 + channel.setMessageHandler { message, reply ->
  87 + val wrapped: HashMap<String, HashMap> = HashMap()
87 try { 88 try {
88 - val input = ToggleMessage.fromMap(message as HashMap<*, *>?) 89 + @SuppressWarnings("ConstantConditions") val input = ToggleMessage.fromMap(message as HashMap)
89 api.toggle(input) 90 api.toggle(input)
90 - wrapped["result"] = null 91 + wrapped.put("result", null)
91 } catch (exception: Exception) { 92 } catch (exception: Exception) {
92 - wrapped["error"] = wrapError(exception) 93 + wrapped.put("error", wrapError(exception))
93 } 94 }
94 reply.reply(wrapped) 95 reply.reply(wrapped)
95 } 96 }
@@ -98,15 +99,15 @@ object Messages { @@ -98,15 +99,15 @@ object Messages {
98 } 99 }
99 } 100 }
100 run { 101 run {
101 - val channel = BasicMessageChannel(binaryMessenger!!, "dev.flutter.pigeon.WakelockApi.isEnabled", StandardMessageCodec()) 102 + val channel: BasicMessageChannel<Object> = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.WakelockApi.isEnabled", StandardMessageCodec())
102 if (api != null) { 103 if (api != null) {
103 - channel.setMessageHandler { message: Any?, reply: BasicMessageChannel.Reply<Any> ->  
104 - val wrapped = HashMap<String, HashMap<*, *>>() 104 + channel.setMessageHandler { message, reply ->
  105 + val wrapped: HashMap<String, HashMap> = HashMap()
105 try { 106 try {
106 val output = api.isEnabled 107 val output = api.isEnabled
107 - wrapped["result"] = output.toMap() 108 + wrapped.put("result", output.toMap())
108 } catch (exception: Exception) { 109 } catch (exception: Exception) {
109 - wrapped["error"] = wrapError(exception) 110 + wrapped.put("error", wrapError(exception))
110 } 111 }
111 reply.reply(wrapped) 112 reply.reply(wrapped)
112 } 113 }
1 -// Autogenerated from Pigeon (v0.1.7), do not edit directly. 1 +// Autogenerated from Pigeon (v0.1.14), do not edit directly.
2 // See also: https://pub.dev/packages/pigeon 2 // See also: https://pub.dev/packages/pigeon
3 #import <Foundation/Foundation.h> 3 #import <Foundation/Foundation.h>
4 @protocol FlutterBinaryMessenger; 4 @protocol FlutterBinaryMessenger;
1 -// Autogenerated from Pigeon (v0.1.7), do not edit directly. 1 +// Autogenerated from Pigeon (v0.1.14), do not edit directly.
2 // See also: https://pub.dev/packages/pigeon 2 // See also: https://pub.dev/packages/pigeon
3 #import "messages.h" 3 #import "messages.h"
4 #import <Flutter/Flutter.h> 4 #import <Flutter/Flutter.h>
@@ -2,7 +2,7 @@ name: wakelock @@ -2,7 +2,7 @@ name: wakelock
2 description: >-2 2 description: >-2
3 Plugin that allows you to keep the device screen awake, i.e. prevent the screen from sleeping on 3 Plugin that allows you to keep the device screen awake, i.e. prevent the screen from sleeping on
4 Android, iOS, and web. 4 Android, iOS, and web.
5 -version: 0.2.0+1 5 +version: 0.2.0+2
6 homepage: https://github.com/creativecreatorormaybenot/wakelock/tree/master/wakelock 6 homepage: https://github.com/creativecreatorormaybenot/wakelock/tree/master/wakelock
7 7
8 environment: 8 environment:
@@ -23,7 +23,7 @@ dev_dependencies: @@ -23,7 +23,7 @@ dev_dependencies:
23 sdk: flutter 23 sdk: flutter
24 24
25 pedantic: ^1.9.2 25 pedantic: ^1.9.2
26 - pigeon: 0.1.7 26 + pigeon: ^0.1.14
27 27
28 flutter: 28 flutter:
29 plugin: 29 plugin:
1 ## 0.1.0 1 ## 0.1.0
2 2
  3 +* Updated messages with upgraded version of pigeon.
  4 +
  5 +## 0.1.0
  6 +
3 * Initial release. 7 * Initial release.
1 -// Autogenerated from Pigeon (v0.1.7), do not edit directly. 1 +// Autogenerated from Pigeon (v0.1.14), do not edit directly.
2 // See also: https://pub.dev/packages/pigeon 2 // See also: https://pub.dev/packages/pigeon
3 // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import 3 // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import
4 // @dart = 2.8 4 // @dart = 2.8
@@ -17,9 +17,6 @@ class ToggleMessage { @@ -17,9 +17,6 @@ class ToggleMessage {
17 17
18 // ignore: unused_element 18 // ignore: unused_element
19 static ToggleMessage _fromMap(Map<dynamic, dynamic> pigeonMap) { 19 static ToggleMessage _fromMap(Map<dynamic, dynamic> pigeonMap) {
20 - if (pigeonMap == null) {  
21 - return null;  
22 - }  
23 final ToggleMessage result = ToggleMessage(); 20 final ToggleMessage result = ToggleMessage();
24 result.enable = pigeonMap['enable']; 21 result.enable = pigeonMap['enable'];
25 return result; 22 return result;
@@ -37,9 +34,6 @@ class IsEnabledMessage { @@ -37,9 +34,6 @@ class IsEnabledMessage {
37 34
38 // ignore: unused_element 35 // ignore: unused_element
39 static IsEnabledMessage _fromMap(Map<dynamic, dynamic> pigeonMap) { 36 static IsEnabledMessage _fromMap(Map<dynamic, dynamic> pigeonMap) {
40 - if (pigeonMap == null) {  
41 - return null;  
42 - }  
43 final IsEnabledMessage result = IsEnabledMessage(); 37 final IsEnabledMessage result = IsEnabledMessage();
44 result.enabled = pigeonMap['enabled']; 38 result.enabled = pigeonMap['enabled'];
45 return result; 39 return result;
@@ -98,6 +92,9 @@ abstract class TestWakelockApi { @@ -98,6 +92,9 @@ abstract class TestWakelockApi {
98 { 92 {
99 const BasicMessageChannel<dynamic> channel = BasicMessageChannel<dynamic>( 93 const BasicMessageChannel<dynamic> channel = BasicMessageChannel<dynamic>(
100 'dev.flutter.pigeon.WakelockApi.toggle', StandardMessageCodec()); 94 'dev.flutter.pigeon.WakelockApi.toggle', StandardMessageCodec());
  95 + if (api == null) {
  96 + channel.setMockMessageHandler(null);
  97 + } else {
101 channel.setMockMessageHandler((dynamic message) async { 98 channel.setMockMessageHandler((dynamic message) async {
102 final Map<dynamic, dynamic> mapMessage = 99 final Map<dynamic, dynamic> mapMessage =
103 message as Map<dynamic, dynamic>; 100 message as Map<dynamic, dynamic>;
@@ -106,13 +103,18 @@ abstract class TestWakelockApi { @@ -106,13 +103,18 @@ abstract class TestWakelockApi {
106 return <dynamic, dynamic>{}; 103 return <dynamic, dynamic>{};
107 }); 104 });
108 } 105 }
  106 + }
109 { 107 {
110 const BasicMessageChannel<dynamic> channel = BasicMessageChannel<dynamic>( 108 const BasicMessageChannel<dynamic> channel = BasicMessageChannel<dynamic>(
111 'dev.flutter.pigeon.WakelockApi.isEnabled', StandardMessageCodec()); 109 'dev.flutter.pigeon.WakelockApi.isEnabled', StandardMessageCodec());
  110 + if (api == null) {
  111 + channel.setMockMessageHandler(null);
  112 + } else {
112 channel.setMockMessageHandler((dynamic message) async { 113 channel.setMockMessageHandler((dynamic message) async {
113 final IsEnabledMessage output = api.isEnabled(); 114 final IsEnabledMessage output = api.isEnabled();
114 return <dynamic, dynamic>{'result': output._toMap()}; 115 return <dynamic, dynamic>{'result': output._toMap()};
115 }); 116 });
116 } 117 }
117 } 118 }
  119 + }
118 } 120 }
@@ -2,7 +2,7 @@ name: wakelock_platform_interface @@ -2,7 +2,7 @@ name: wakelock_platform_interface
2 description: >-2 2 description: >-2
3 A common platform interface for the wakelock plugin used by the different platform 3 A common platform interface for the wakelock plugin used by the different platform
4 implementations. 4 implementations.
5 -version: 0.1.0 5 +version: 0.1.0+1
6 homepage: >-2 6 homepage: >-2
7 https://github.com/creativecreatorormaybenot/wakelock/tree/master/wakelock_platform_interface 7 https://github.com/creativecreatorormaybenot/wakelock/tree/master/wakelock_platform_interface
8 8