Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
gmalpha_flutter
Project
Project
Details
Activity
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
mobile
gmalpha_flutter
Commits
5246f696
Commit
5246f696
authored
6 years ago
by
ouxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
image channel test
parent
3a00032b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
assetsChannel.dart
lib/assetsChannel.dart
+13
-1
No files found.
lib/assetsChannel.dart
View file @
5246f696
...
...
@@ -15,7 +15,8 @@ class _AssestPlatformChannelState extends State<AssestPlatformChannel> {
EventChannel
(
'GMAssetsEventChannelName'
);
String
_batteryLevel
=
'Battery level: unknown.'
;
ByteData
_imageData
;
Object
_imageData
;
Future
<
void
>
_editPortrait
()
async
{
String
batteryLevel
;
...
...
@@ -39,6 +40,7 @@ class _AssestPlatformChannelState extends State<AssestPlatformChannel> {
void
_onEvent
(
Object
event
)
{
_imageData
=
event
;
print
(
event
.
runtimeType
);
Image
.
memory
(
event
);
setState
(()
{
});
}
...
...
@@ -70,6 +72,16 @@ class _AssestPlatformChannelState extends State<AssestPlatformChannel> {
onPressed:
_editPortrait
,
),
),
Container
(
color:
Colors
.
pink
[
300
],
width:
300
,
height:
300
,
child:
Image
.
memory
(
_imageData
,
color:
Colors
.
purple
,
width:
200
,
height:
200
,
),
)
],
),
],
...
...
This diff is collapsed.
Click to expand it.
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