Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
flutter_wakelock
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
creativecreatorormaybenot
2020-10-24 21:45:13 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2020-10-24 21:45:13 +0000
Commit
ae37c194c391962779094bd007e649ea30667ac1
ae37c194
1 parent
99305b82
Bump pigeon (#50)
* Bump pigeon * Finish
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
53 additions
and
42 deletions
wakelock/CHANGELOG.md
wakelock/android/src/main/kotlin/creativemaybeno/wakelock/Messages.kt
wakelock/ios/Classes/messages.h
wakelock/ios/Classes/messages.m
wakelock/pubspec.yaml
wakelock_platform_interface/CHANGELOG.md
wakelock_platform_interface/lib/messages.dart
wakelock_platform_interface/pubspec.yaml
wakelock/CHANGELOG.md
View file @
ae37c19
## 0.2.0+2
*
Bumped pigeon to
`0.1.14`
.
## 0.2.0+1
*
Fix iOS build issue by bumping the
`wakelock_web`
dependency.
...
...
wakelock/android/src/main/kotlin/creativemaybeno/wakelock/Messages.kt
View file @
ae37c19
// Autogenerated from Pigeon (v0.1.
7
), do not edit directly.
// Autogenerated from Pigeon (v0.1.
14
), do not edit directly.
// See also: https://pub.dev/packages/pigeon
package creativemaybeno.wakelock
import io.flutter.plugin.common.BasicMessageChannel
import io.flutter.plugin.common.BinaryMessenger
import io.flutter.plugin.common.StandardMessageCodec
import java.util.*
import java.util.ArrayList
import java.util.HashMap
/** Generated class from Pigeon. */
object Messages {
private fun wrapError(exception: Exception): HashMap<*, *> {
val errorMap = HashMap<String, Any?>()
errorMap["message"] = exception.toString()
errorMap["code"] = null
errorMap["details"] = null
private fun wrapError(exception: Exception): HashMap {
val errorMap: HashMap<String, Object> = HashMap()
errorMap.put("message", exception.toString())
errorMap.put("code", exception.getClass().getSimpleName())
errorMap.put("details", null)
return errorMap
}
...
...
@@ -28,17 +29,17 @@ object Messages {
enable = setterArg
}
fun toMap(): HashMap<*, *> {
val toMapResult = HashMap<String, Any?>()
toMapResult["enable"] = enable
fun toMap(): HashMap {
val toMapResult: HashMap<String, Object> = HashMap()
toMapResult.put("enable", enable)
return toMapResult
}
companion object {
fun fromMap(map: HashMap<*, *>?
): ToggleMessage {
fun fromMap(map: HashMap
): ToggleMessage {
val fromMapResult = ToggleMessage()
val enable = map!!["enable"]
fromMapResult.enable = enable as Boolean?
val enable: Object = map.get("enable")
fromMapResult.enable = enable
return fromMapResult
}
}
...
...
@@ -55,17 +56,17 @@ object Messages {
enabled = setterArg
}
fun toMap(): HashMap<*, *> {
val toMapResult = HashMap<String, Any?>()
toMapResult["enabled"] = enabled
fun toMap(): HashMap {
val toMapResult: HashMap<String, Object> = HashMap()
toMapResult.put("enabled", enabled)
return toMapResult
}
companion object {
fun fromMap(map: HashMap<*, *>
): IsEnabledMessage {
fun fromMap(map: HashMap
): IsEnabledMessage {
val fromMapResult = IsEnabledMessage()
val enabled = map["enabled"]
fromMapResult.enabled = enabled as Boolean?
val enabled: Object = map.get("enabled")
fromMapResult.enabled = enabled
return fromMapResult
}
}
...
...
@@ -80,16 +81,16 @@ object Messages {
/** Sets up an instance of `WakelockApi` to handle messages through the `binaryMessenger` */
fun setup(binaryMessenger: BinaryMessenger?, api: WakelockApi?) {
run {
val channel = BasicMessageChannel(binaryMessenger!!
, "dev.flutter.pigeon.WakelockApi.toggle", StandardMessageCodec())
val channel: BasicMessageChannel<Object> = BasicMessageChannel(binaryMessenger
, "dev.flutter.pigeon.WakelockApi.toggle", StandardMessageCodec())
if (api != null) {
channel.setMessageHandler { message: Any?, reply: BasicMessageChannel.Reply<Any> ->
val wrapped = HashMap<String, HashMap<*, *>?>()
channel.setMessageHandler { message, reply ->
val wrapped: HashMap<String, HashMap> = HashMap()
try {
val input = ToggleMessage.fromMap(message as HashMap<*, *>?
)
@SuppressWarnings("ConstantConditions") val input = ToggleMessage.fromMap(message as HashMap
)
api.toggle(input)
wrapped["result"] = null
wrapped.put("result", null)
} catch (exception: Exception) {
wrapped["error"] = wrapError(exception
)
wrapped.put("error", wrapError(exception)
)
}
reply.reply(wrapped)
}
...
...
@@ -98,15 +99,15 @@ object Messages {
}
}
run {
val channel = BasicMessageChannel(binaryMessenger!!
, "dev.flutter.pigeon.WakelockApi.isEnabled", StandardMessageCodec())
val channel: BasicMessageChannel<Object> = BasicMessageChannel(binaryMessenger
, "dev.flutter.pigeon.WakelockApi.isEnabled", StandardMessageCodec())
if (api != null) {
channel.setMessageHandler { message: Any?, reply: BasicMessageChannel.Reply<Any> ->
val wrapped = HashMap<String, HashMap<*, *>>()
channel.setMessageHandler { message, reply ->
val wrapped: HashMap<String, HashMap> = HashMap()
try {
val output = api.isEnabled
wrapped["result"] = output.toMap(
)
wrapped.put("result", output.toMap()
)
} catch (exception: Exception) {
wrapped["error"] = wrapError(exception
)
wrapped.put("error", wrapError(exception)
)
}
reply.reply(wrapped)
}
...
...
wakelock/ios/Classes/messages.h
View file @
ae37c19
// Autogenerated from Pigeon (v0.1.
7
), do not edit directly.
// Autogenerated from Pigeon (v0.1.
14
), do not edit directly.
// See also: https://pub.dev/packages/pigeon
#import <Foundation/Foundation.h>
@protocol
FlutterBinaryMessenger
;
...
...
wakelock/ios/Classes/messages.m
View file @
ae37c19
// Autogenerated from Pigeon (v0.1.
7
), do not edit directly.
// Autogenerated from Pigeon (v0.1.
14
), do not edit directly.
// See also: https://pub.dev/packages/pigeon
#import "messages.h"
#import <Flutter/Flutter.h>
...
...
wakelock/pubspec.yaml
View file @
ae37c19
...
...
@@ -2,7 +2,7 @@ name: wakelock
description
:
>-2
Plugin that allows you to keep the device screen awake, i.e. prevent the screen from sleeping on
Android, iOS, and web.
v
ersion: 0.2.0+
1
v
ersion: 0.2.0+
2
h
omepage: https://github.com/creativecreatorormaybenot/wakelock/tree/master/wakelock
e
nvironment:
...
...
@@ -23,7 +23,7 @@ dev_dependencies:
sdk: flutter
pedantic: ^1.9.2
pigeon:
0.1.7
pigeon:
^0.1.14
f
lutter:
plugin:
...
...
wakelock_platform_interface/CHANGELOG.md
View file @
ae37c19
## 0.1.0
*
Updated messages with upgraded version of pigeon.
## 0.1.0
*
Initial release.
...
...
wakelock_platform_interface/lib/messages.dart
View file @
ae37c19
// Autogenerated from Pigeon (v0.1.
7
), do not edit directly.
// Autogenerated from Pigeon (v0.1.
14
), 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
// @dart = 2.8
...
...
@@ -17,9 +17,6 @@ class ToggleMessage {
// ignore: unused_element
static
ToggleMessage
_fromMap
(
Map
<
dynamic
,
dynamic
>
pigeonMap
)
{
if
(
pigeonMap
==
null
)
{
return
null
;
}
final
ToggleMessage
result
=
ToggleMessage
();
result
.
enable
=
pigeonMap
[
'enable'
];
return
result
;
...
...
@@ -37,9 +34,6 @@ class IsEnabledMessage {
// ignore: unused_element
static
IsEnabledMessage
_fromMap
(
Map
<
dynamic
,
dynamic
>
pigeonMap
)
{
if
(
pigeonMap
==
null
)
{
return
null
;
}
final
IsEnabledMessage
result
=
IsEnabledMessage
();
result
.
enabled
=
pigeonMap
[
'enabled'
];
return
result
;
...
...
@@ -98,6 +92,9 @@ abstract class TestWakelockApi {
{
const
BasicMessageChannel
<
dynamic
>
channel
=
BasicMessageChannel
<
dynamic
>(
'dev.flutter.pigeon.WakelockApi.toggle'
,
StandardMessageCodec
());
if
(
api
==
null
)
{
channel
.
setMockMessageHandler
(
null
);
}
else
{
channel
.
setMockMessageHandler
((
dynamic
message
)
async
{
final
Map
<
dynamic
,
dynamic
>
mapMessage
=
message
as
Map
<
dynamic
,
dynamic
>;
...
...
@@ -106,13 +103,18 @@ abstract class TestWakelockApi {
return
<
dynamic
,
dynamic
>{};
});
}
}
{
const
BasicMessageChannel
<
dynamic
>
channel
=
BasicMessageChannel
<
dynamic
>(
'dev.flutter.pigeon.WakelockApi.isEnabled'
,
StandardMessageCodec
());
if
(
api
==
null
)
{
channel
.
setMockMessageHandler
(
null
);
}
else
{
channel
.
setMockMessageHandler
((
dynamic
message
)
async
{
final
IsEnabledMessage
output
=
api
.
isEnabled
();
return
<
dynamic
,
dynamic
>{
'result'
:
output
.
_toMap
()};
});
}
}
}
}
...
...
wakelock_platform_interface/pubspec.yaml
View file @
ae37c19
...
...
@@ -2,7 +2,7 @@ name: wakelock_platform_interface
description
:
>-2
A common platform interface for the wakelock plugin used by the different platform
implementations.
v
ersion: 0.1.0
v
ersion: 0.1.0
+1
h
omepage: >-2
https://github.com/creativecreatorormaybenot/wakelock/tree/master/wakelock_platform_interface
...
...
Please
register
or
login
to post a comment