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
88d6cea7
Commit
88d6cea7
authored
Apr 25, 2016
by
Adam Barth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3521 from abarth/media_size
Improve docs for MediaQueryData.size
parents
86723ab9
e7dd8707
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
media_query.dart
packages/flutter/lib/src/widgets/media_query.dart
+11
-1
No files found.
packages/flutter/lib/src/widgets/media_query.dart
View file @
88d6cea7
...
...
@@ -18,14 +18,24 @@ enum Orientation {
/// The result of a media query.
class
MediaQueryData
{
/// Creates data for a media query with explicit values.
///
/// Consider using [MediaQueryData.fromWindow] to create data based on a
/// [ui.Window].
const
MediaQueryData
({
this
.
size
,
this
.
devicePixelRatio
,
this
.
padding
});
/// Creates data for a media query based on the given window.
MediaQueryData
.
fromWindow
(
ui
.
Window
window
)
:
size
=
window
.
size
,
devicePixelRatio
=
window
.
devicePixelRatio
,
padding
=
new
EdgeInsets
.
fromWindowPadding
(
window
.
padding
);
/// The size of the media (e.g, the size of the screen).
/// The size of the media in logical pixel (e.g, the size of the screen).
///
/// Logical pixels are roughly the same visual size across devices. Physical
/// pixels are the size of the actual hardware pixels on the device. The
/// number of physical pixels per logical pixel is described by the
/// [devicePixelRatio].
final
Size
size
;
/// The number of device pixels for each logical pixel. This number might not
...
...
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