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
ff8e4061
Commit
ff8e4061
authored
Nov 04, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1912 from aghassemi/master
Adding RawImage component
parents
c44dd17d
1dce2c85
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
basic.dart
packages/flutter/lib/src/widgets/basic.dart
+36
-0
No files found.
packages/flutter/lib/src/widgets/basic.dart
View file @
ff8e4061
...
...
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:typed_data'
;
import
'dart:ui'
as
ui
;
import
'package:flutter/rendering.dart'
;
...
...
@@ -9,6 +10,7 @@ import 'package:flutter/services.dart';
import
'framework.dart'
;
export
'dart:typed_data'
show
Uint8List
;
export
'package:flutter/rendering.dart'
show
BackgroundImage
,
BlockDirection
,
...
...
@@ -1095,6 +1097,40 @@ class DefaultAssetBundle extends InheritedWidget {
bool
updateShouldNotify
(
DefaultAssetBundle
old
)
=>
bundle
!=
old
.
bundle
;
}
class
RawImage
extends
StatelessComponent
{
RawImage
({
Key
key
,
this
.
bytes
,
this
.
width
,
this
.
height
,
this
.
colorFilter
,
this
.
fit
,
this
.
repeat
:
ImageRepeat
.
noRepeat
,
this
.
centerSlice
})
:
super
(
key:
key
);
final
Uint8List
bytes
;
final
double
width
;
final
double
height
;
final
ColorFilter
colorFilter
;
final
ImageFit
fit
;
final
ImageRepeat
repeat
;
final
Rect
centerSlice
;
Widget
build
(
BuildContext
context
)
{
ImageResource
image
=
new
ImageResource
(
decodeImageFromList
(
bytes
));
return
new
ImageListener
(
image:
image
,
width:
width
,
height:
height
,
colorFilter:
colorFilter
,
fit:
fit
,
repeat:
repeat
,
centerSlice:
centerSlice
);
}
}
class
AssetImage
extends
StatelessComponent
{
AssetImage
({
Key
key
,
...
...
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