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
9b5d1fbe
Commit
9b5d1fbe
authored
Apr 06, 2017
by
Ian Hickson
Committed by
GitHub
Apr 06, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provide more widget const constructors. (#9247)
Still many more to go.
parent
93b90362
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
161 additions
and
195 deletions
+161
-195
fractional_offset.dart
packages/flutter/lib/src/painting/fractional_offset.dart
+3
-1
banner.dart
packages/flutter/lib/src/widgets/banner.dart
+7
-8
basic.dart
packages/flutter/lib/src/widgets/basic.dart
+148
-183
framework.dart
packages/flutter/lib/src/widgets/framework.dart
+3
-3
No files found.
packages/flutter/lib/src/painting/fractional_offset.dart
View file @
9b5d1fbe
...
...
@@ -14,7 +14,9 @@ class FractionalOffset {
/// Creates a fractional offset.
///
/// The [dx] and [dy] arguments must not be null.
const
FractionalOffset
(
this
.
dx
,
this
.
dy
);
const
FractionalOffset
(
this
.
dx
,
this
.
dy
)
:
assert
(
dx
!=
null
),
assert
(
dy
!=
null
);
/// The distance fraction in the horizontal direction.
///
...
...
packages/flutter/lib/src/widgets/banner.dart
View file @
9b5d1fbe
...
...
@@ -167,19 +167,18 @@ class Banner extends StatelessWidget {
/// Creates a banner.
///
/// The [message] and [location] arguments must not be null.
Banner
({
const
Banner
({
Key
key
,
this
.
child
,
@required
this
.
message
,
@required
this
.
location
,
this
.
color
:
_kColor
,
this
.
textStyle
:
_kTextStyle
,
})
:
super
(
key:
key
)
{
assert
(
message
!=
null
);
assert
(
location
!=
null
);
assert
(
color
!=
null
);
assert
(
textStyle
!=
null
);
}
})
:
assert
(
message
!=
null
),
assert
(
location
!=
null
),
assert
(
color
!=
null
),
assert
(
textStyle
!=
null
),
super
(
key:
key
);
/// The widget to show behind the banner.
final
Widget
child
;
...
...
@@ -215,7 +214,7 @@ class Banner extends StatelessWidget {
/// Does nothing in release mode.
class
CheckedModeBanner
extends
StatelessWidget
{
/// Creates a checked mode banner.
CheckedModeBanner
({
const
CheckedModeBanner
({
Key
key
,
@required
this
.
child
})
:
super
(
key:
key
);
...
...
packages/flutter/lib/src/widgets/basic.dart
View file @
9b5d1fbe
This diff is collapsed.
Click to expand it.
packages/flutter/lib/src/widgets/framework.dart
View file @
9b5d1fbe
...
...
@@ -1339,9 +1339,9 @@ abstract class MultiChildRenderObjectWidget extends RenderObjectWidget {
/// The [children] argument must not be null and must not contain any null
/// objects.
MultiChildRenderObjectWidget
({
Key
key
,
this
.
children
:
const
<
Widget
>[]
})
:
super
(
key:
key
)
{
assert
(
children
!=
null
);
assert
(!
children
.
any
((
Widget
child
)
=>
child
==
null
));
:
assert
(
children
!=
null
),
super
(
key:
key
)
{
assert
(!
children
.
any
((
Widget
child
)
=>
child
==
null
));
// https://github.com/dart-lang/sdk/issues/29276
}
/// The widgets below this widget in the tree.
...
...
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