Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
8f6aefa2
Commit
8f6aefa2
authored
Jan 11, 2017
by
Adam Barth
Committed by
GitHub
Jan 11, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove HostMessages (#7436)
This API was deprecated. Clients should use PlatformMessages instead.
parent
a0666f33
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
36 deletions
+0
-36
services.dart
packages/flutter/lib/services.dart
+0
-1
host_messages.dart
packages/flutter/lib/src/services/host_messages.dart
+0
-35
No files found.
packages/flutter/lib/services.dart
View file @
8f6aefa2
...
...
@@ -14,7 +14,6 @@ export 'src/services/asset_bundle.dart';
export
'src/services/binding.dart'
;
export
'src/services/clipboard.dart'
;
export
'src/services/haptic_feedback.dart'
;
export
'src/services/host_messages.dart'
;
export
'src/services/image_cache.dart'
;
export
'src/services/image_decoder.dart'
;
export
'src/services/image_provider.dart'
;
...
...
packages/flutter/lib/src/services/host_messages.dart
deleted
100644 → 0
View file @
a0666f33
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:async'
;
import
'platform_messages.dart'
;
/// Deprecated. Use [PlatformMessages] instead.
@deprecated
class
HostMessages
{
/// Send a message to the host application.
static
Future
<
String
>
sendToHost
(
String
channel
,
[
String
message
=
''
])
{
return
PlatformMessages
.
sendString
(
channel
,
message
);
}
/// Sends a JSON-encoded message to the host application and JSON-decodes the response.
static
Future
<
dynamic
>
sendJSON
(
String
channel
,
[
dynamic
json
])
{
return
PlatformMessages
.
sendJSON
(
channel
,
json
);
}
/// Register a callback for receiving messages from the host application.
static
void
addMessageHandler
(
String
channel
,
Future
<
String
>
callback
(
String
message
))
{
PlatformMessages
.
setStringMessageHandler
(
channel
,
callback
);
}
/// Register a callback for receiving JSON messages from the host application.
///
/// Messages received from the host application are decoded as JSON before
/// being passed to `callback`. The result of the callback is encoded as JSON
/// before being returned to the host application.
static
void
addJSONMessageHandler
(
String
channel
,
Future
<
dynamic
>
callback
(
dynamic
json
))
{
PlatformMessages
.
setJSONMessageHandler
(
channel
,
callback
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment