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
2a2784e8
Commit
2a2784e8
authored
Dec 11, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #882 from abarth/image_docs
Add dartdoc for image classes
parents
e8367f53
40dda1ed
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
240 additions
and
19 deletions
+240
-19
icon_theme.dart
packages/flutter/lib/src/material/icon_theme.dart
+1
-0
material.dart
packages/flutter/lib/src/material/material.dart
+1
-0
material_button.dart
packages/flutter/lib/src/material/material_button.dart
+3
-0
scaffold.dart
packages/flutter/lib/src/material/scaffold.dart
+1
-0
theme.dart
packages/flutter/lib/src/material/theme.dart
+4
-1
box_painter.dart
packages/flutter/lib/src/painting/box_painter.dart
+4
-0
image.dart
packages/flutter/lib/src/rendering/image.dart
+8
-2
basic.dart
packages/flutter/lib/src/widgets/basic.dart
+208
-12
locale_query.dart
packages/flutter/lib/src/widgets/locale_query.dart
+1
-0
media_query.dart
packages/flutter/lib/src/widgets/media_query.dart
+1
-1
overlay.dart
packages/flutter/lib/src/widgets/overlay.dart
+1
-1
page_storage.dart
packages/flutter/lib/src/widgets/page_storage.dart
+3
-1
routes.dart
packages/flutter/lib/src/widgets/routes.dart
+3
-0
scrollable.dart
packages/flutter/lib/src/widgets/scrollable.dart
+1
-1
No files found.
packages/flutter/lib/src/material/icon_theme.dart
View file @
2a2784e8
...
...
@@ -18,6 +18,7 @@ class IconTheme extends InheritedWidget {
final
IconThemeData
data
;
/// The data from the closest instance of this class that encloses the given context.
static
IconThemeData
of
(
BuildContext
context
)
{
IconTheme
result
=
context
.
inheritFromWidgetOfType
(
IconTheme
);
return
result
?.
data
;
...
...
packages/flutter/lib/src/material/material.dart
View file @
2a2784e8
...
...
@@ -93,6 +93,7 @@ class Material extends StatefulComponent {
final
Color
color
;
final
TextStyle
textStyle
;
/// The ink controller from the closest instance of this class that encloses the given context.
static
MaterialInkController
of
(
BuildContext
context
)
{
final
RenderInkFeatures
result
=
context
.
ancestorRenderObjectOfType
(
RenderInkFeatures
);
return
result
;
...
...
packages/flutter/lib/src/material/material_button.dart
View file @
2a2784e8
...
...
@@ -23,6 +23,9 @@ class ButtonTheme extends InheritedWidget {
final
ButtonColor
color
;
/// The color from the closest instance of this class that encloses the given context.
///
/// Defaults to [ButtonColor.normal] if none exists.
static
ButtonColor
of
(
BuildContext
context
)
{
ButtonTheme
result
=
context
.
inheritFromWidgetOfType
(
ButtonTheme
);
return
result
?.
color
??
ButtonColor
.
normal
;
...
...
packages/flutter/lib/src/material/scaffold.dart
View file @
2a2784e8
...
...
@@ -111,6 +111,7 @@ class Scaffold extends StatefulComponent {
final
Widget
floatingActionButton
;
final
Widget
drawer
;
/// The state from the closest instance of this class that encloses the given context.
static
ScaffoldState
of
(
BuildContext
context
)
=>
context
.
ancestorStateOfType
(
ScaffoldState
);
ScaffoldState
createState
()
=>
new
ScaffoldState
();
...
...
packages/flutter/lib/src/material/theme.dart
View file @
2a2784e8
...
...
@@ -22,9 +22,12 @@ class Theme extends InheritedWidget {
static
final
ThemeData
_kFallbackTheme
=
new
ThemeData
.
fallback
();
/// The data from the closest instance of this class that encloses the given context.
///
/// Defaults to the fallback theme data if none exists.
static
ThemeData
of
(
BuildContext
context
)
{
Theme
theme
=
context
.
inheritFromWidgetOfType
(
Theme
);
return
theme
==
null
?
_kFallbackTheme
:
theme
.
data
;
return
theme
?.
data
??
_kFallbackTheme
;
}
bool
updateShouldNotify
(
Theme
old
)
=>
data
!=
old
.
data
;
...
...
packages/flutter/lib/src/painting/box_painter.dart
View file @
2a2784e8
...
...
@@ -630,6 +630,10 @@ class BackgroundImage {
final
ColorFilter
colorFilter
;
/// How to align the image within its bounds.
///
/// An alignment of (0.0, 0.0) aligns the image to the top-left corner of its
/// layout bounds. An alignment of (1.0, 0.5) aligns the image to the middle
/// of the right edge of its layout bounds.
final
FractionalOffset
alignment
;
/// The image to be painted into the background.
...
...
packages/flutter/lib/src/rendering/image.dart
View file @
2a2784e8
...
...
@@ -49,6 +49,9 @@ class RenderImage extends RenderBox {
}
/// If non-null, requires the image to have this width.
///
/// If null, the image will pick a size that best preserves its intrinsic
/// aspect ratio.
double
get
width
=>
_width
;
double
_width
;
void
set
width
(
double
value
)
{
...
...
@@ -58,7 +61,10 @@ class RenderImage extends RenderBox {
markNeedsLayout
();
}
/// If non-null, requires the image to have this height.
/// If non-null, require the image to have this height.
///
/// If null, the image will pick a size that best preserves its intrinsic
/// aspect ratio.
double
get
height
=>
_height
;
double
_height
;
void
set
height
(
double
value
)
{
...
...
@@ -98,7 +104,7 @@ class RenderImage extends RenderBox {
markNeedsPaint
();
}
///
Not yet implemented
.
///
How to repeat this image if it doesn't fill its layout bounds
.
ImageRepeat
get
repeat
=>
_repeat
;
ImageRepeat
_repeat
;
void
set
repeat
(
ImageRepeat
value
)
{
...
...
packages/flutter/lib/src/widgets/basic.dart
View file @
2a2784e8
This diff is collapsed.
Click to expand it.
packages/flutter/lib/src/widgets/locale_query.dart
View file @
2a2784e8
...
...
@@ -18,6 +18,7 @@ class LocaleQuery<T extends LocaleQueryData> extends InheritedWidget {
final
T
data
;
/// The data from the closest instance of this class that encloses the given context.
static
LocaleQueryData
of
(
BuildContext
context
)
{
LocaleQuery
query
=
context
.
inheritFromWidgetOfType
(
LocaleQuery
);
return
query
==
null
?
null
:
query
.
data
;
...
...
packages/flutter/lib/src/widgets/media_query.dart
View file @
2a2784e8
...
...
@@ -52,7 +52,7 @@ class MediaQuery extends InheritedWidget {
/// The result of media queries in this subtree.
final
MediaQueryData
data
;
///
Returns the media query data for
the given context.
///
The data from the closest instance of this class that encloses
the given context.
///
/// You can use this function to query the size an orientation of the screen.
/// When that information changes, your widget will be scheduled to be rebuilt,
...
...
packages/flutter/lib/src/widgets/overlay.dart
View file @
2a2784e8
...
...
@@ -57,7 +57,7 @@ class Overlay extends StatefulComponent {
/// The entries to include in the overlay initially.
final
List
<
OverlayEntry
>
initialEntries
;
/// The
closest enclosing overlay of
the given context.
/// The
state from the closest instance of this class that encloses
the given context.
static
OverlayState
of
(
BuildContext
context
)
=>
context
.
ancestorStateOfType
(
OverlayState
);
OverlayState
createState
()
=>
new
OverlayState
();
...
...
packages/flutter/lib/src/widgets/page_storage.dart
View file @
2a2784e8
...
...
@@ -84,7 +84,9 @@ class PageStorage extends StatelessComponent {
final
Widget
child
;
final
PageStorageBucket
bucket
;
/// Might return null if there is no PageStorage in this context.
/// The bucket from the closest instance of this class that encloses the given context.
///
/// Returns null if none exists.
static
PageStorageBucket
of
(
BuildContext
context
)
{
PageStorage
widget
=
context
.
ancestorWidgetOfType
(
PageStorage
);
return
widget
?.
bucket
;
...
...
packages/flutter/lib/src/widgets/routes.dart
View file @
2a2784e8
...
...
@@ -384,6 +384,9 @@ abstract class ModalRoute<T> extends TransitionRoute<T> with LocalHistoryRoute<T
final
RouteSettings
settings
;
/// Returns the modal route most closely associated with the given context.
///
/// Returns null if the given context is not associated with a modal route.
static
ModalRoute
of
(
BuildContext
context
)
{
_ModalScopeStatus
widget
=
context
.
inheritFromWidgetOfType
(
_ModalScopeStatus
);
return
widget
?.
route
;
...
...
packages/flutter/lib/src/widgets/scrollable.dart
View file @
2a2784e8
...
...
@@ -57,7 +57,7 @@ abstract class Scrollable extends StatefulComponent {
final
SnapOffsetCallback
snapOffsetCallback
;
final
double
snapAlignmentOffset
;
///
Returns the closest enclosing scrollable for
the given context.
///
The state from the closest instance of this class that encloses
the given context.
static
ScrollableState
of
(
BuildContext
context
)
{
return
context
.
ancestorStateOfType
(
ScrollableState
);
}
...
...
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