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
0400107c
Commit
0400107c
authored
Jan 31, 2017
by
Ian Hickson
Committed by
GitHub
Jan 31, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply @required according to the rules, for all of widgets/* (#7730)
parent
8f7d0a45
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
33 additions
and
32 deletions
+33
-32
animated_cross_fade.dart
packages/flutter/lib/src/widgets/animated_cross_fade.dart
+2
-2
banner.dart
packages/flutter/lib/src/widgets/banner.dart
+1
-1
container.dart
packages/flutter/lib/src/widgets/container.dart
+1
-1
dismissable.dart
packages/flutter/lib/src/widgets/dismissable.dart
+1
-1
focus.dart
packages/flutter/lib/src/widgets/focus.dart
+2
-2
framework.dart
packages/flutter/lib/src/widgets/framework.dart
+1
-1
implicit_animations.dart
packages/flutter/lib/src/widgets/implicit_animations.dart
+1
-1
notification_listener.dart
packages/flutter/lib/src/widgets/notification_listener.dart
+1
-1
page_storage.dart
packages/flutter/lib/src/widgets/page_storage.dart
+1
-1
raw_keyboard_listener.dart
packages/flutter/lib/src/widgets/raw_keyboard_listener.dart
+3
-4
routes.dart
packages/flutter/lib/src/widgets/routes.dart
+2
-2
title.dart
packages/flutter/lib/src/widgets/title.dart
+2
-1
transitions.dart
packages/flutter/lib/src/widgets/transitions.dart
+14
-14
title_test.dart
packages/flutter/test/widgets/title_test.dart
+1
-0
No files found.
packages/flutter/lib/src/widgets/animated_cross_fade.dart
View file @
0400107c
...
...
@@ -45,8 +45,8 @@ class AnimatedCrossFade extends StatefulWidget {
/// order to have finer control, e.g., creating an overlap between the fades.
AnimatedCrossFade
({
Key
key
,
this
.
firstChild
,
this
.
secondChild
,
@required
this
.
firstChild
,
@required
this
.
secondChild
,
this
.
firstCurve
:
Curves
.
linear
,
this
.
secondCurve
:
Curves
.
linear
,
this
.
sizeCurve
:
Curves
.
linear
,
...
...
packages/flutter/lib/src/widgets/banner.dart
View file @
0400107c
...
...
@@ -168,7 +168,7 @@ class CheckedModeBanner extends StatelessWidget {
/// Creates a checked mode banner.
CheckedModeBanner
({
Key
key
,
this
.
child
@required
this
.
child
})
:
super
(
key:
key
);
/// The widget to show behind the banner.
...
...
packages/flutter/lib/src/widgets/container.dart
View file @
0400107c
...
...
@@ -91,7 +91,7 @@ class Container extends StatelessWidget {
BoxConstraints
constraints
,
this
.
margin
,
this
.
transform
,
this
.
child
this
.
child
,
})
:
constraints
=
(
width
!=
null
||
height
!=
null
)
?
constraints
?.
tighten
(
width:
width
,
height:
height
)
...
...
packages/flutter/lib/src/widgets/dismissable.dart
View file @
0400107c
...
...
@@ -73,7 +73,7 @@ class Dismissable extends StatefulWidget {
/// according to their keys and avoids this pitfall.
Dismissable
({
@required
Key
key
,
this
.
child
,
@required
this
.
child
,
this
.
background
,
this
.
secondaryBackground
,
this
.
onResize
,
...
...
packages/flutter/lib/src/widgets/focus.dart
View file @
0400107c
...
...
@@ -24,7 +24,7 @@ class _FocusScope extends InheritedWidget {
this
.
scopeFocused
,
this
.
focusedScope
,
this
.
focusedWidget
,
Widget
child
@required
Widget
child
,
})
:
super
(
key:
key
,
child:
child
)
{
assert
(
scopeFocused
!=
null
);
}
...
...
@@ -113,7 +113,7 @@ class Focus extends StatefulWidget {
Focus
({
@required
GlobalKey
key
,
this
.
initiallyFocusedScope
,
this
.
child
@required
this
.
child
,
})
:
super
(
key:
key
)
{
assert
(
key
!=
null
);
}
...
...
packages/flutter/lib/src/widgets/framework.dart
View file @
0400107c
...
...
@@ -1071,7 +1071,7 @@ abstract class State<T extends StatefulWidget> {
/// [ParentDataWidget].
abstract
class
ProxyWidget
extends
Widget
{
/// Creates a widget that has exactly one child widget.
const
ProxyWidget
({
Key
key
,
this
.
child
})
:
super
(
key:
key
);
const
ProxyWidget
({
Key
key
,
@required
this
.
child
})
:
super
(
key:
key
);
/// The widget below this widget in the tree.
final
Widget
child
;
...
...
packages/flutter/lib/src/widgets/implicit_animations.dart
View file @
0400107c
...
...
@@ -375,7 +375,7 @@ class AnimatedPositioned extends ImplicitlyAnimatedWidget {
/// The [curve] and [duration] arguments must not be null.
AnimatedPositioned
({
Key
key
,
this
.
child
,
@required
this
.
child
,
this
.
left
,
this
.
top
,
this
.
right
,
...
...
packages/flutter/lib/src/widgets/notification_listener.dart
View file @
0400107c
...
...
@@ -72,7 +72,7 @@ class NotificationListener<T extends Notification> extends StatelessWidget {
/// Creates a widget that listens for notifications.
NotificationListener
({
Key
key
,
this
.
child
,
@required
this
.
child
,
this
.
onNotification
})
:
super
(
key:
key
);
...
...
packages/flutter/lib/src/widgets/page_storage.dart
View file @
0400107c
...
...
@@ -107,7 +107,7 @@ class PageStorage extends StatelessWidget {
PageStorage
({
Key
key
,
@required
this
.
bucket
,
this
.
child
@required
this
.
child
})
:
super
(
key:
key
)
{
assert
(
bucket
!=
null
);
}
...
...
packages/flutter/lib/src/widgets/raw_keyboard_listener.dart
View file @
0400107c
...
...
@@ -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
'package:flutter/foundation.dart'
;
import
'package:flutter/services.dart'
;
import
'basic.dart'
;
...
...
@@ -30,7 +31,7 @@ class RawKeyboardListener extends StatefulWidget {
Key
key
,
this
.
focused
:
false
,
this
.
onKey
,
this
.
child
@required
this
.
child
,
})
:
super
(
key:
key
)
{
assert
(
child
!=
null
);
}
...
...
@@ -98,7 +99,5 @@ class _RawKeyboardListenerState extends State<RawKeyboardListener> {
}
@override
Widget
build
(
BuildContext
context
)
{
return
config
.
child
;
}
Widget
build
(
BuildContext
context
)
=>
config
.
child
;
}
packages/flutter/lib/src/widgets/routes.dart
View file @
0400107c
...
...
@@ -333,7 +333,7 @@ class _ModalScopeStatus extends InheritedWidget {
Key
key
,
this
.
isCurrent
,
this
.
route
,
Widget
child
@required
Widget
child
})
:
super
(
key:
key
,
child:
child
)
{
assert
(
isCurrent
!=
null
);
assert
(
route
!=
null
);
...
...
@@ -366,7 +366,7 @@ class _ModalScope extends StatefulWidget {
_ModalScope
({
Key
key
,
this
.
route
,
this
.
page
@required
this
.
page
,
})
:
super
(
key:
key
);
final
ModalRoute
<
dynamic
>
route
;
...
...
packages/flutter/lib/src/widgets/title.dart
View file @
0400107c
...
...
@@ -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
'package:flutter/foundation.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter/widgets.dart'
;
...
...
@@ -12,7 +13,7 @@ class Title extends StatelessWidget {
Key
key
,
this
.
title
,
this
.
color
,
this
.
child
@required
this
.
child
,
})
:
super
(
key:
key
)
{
assert
(
color
==
null
||
color
.
alpha
==
0xFF
);
}
...
...
packages/flutter/lib/src/widgets/transitions.dart
View file @
0400107c
...
...
@@ -91,7 +91,7 @@ class SlideTransition extends AnimatedWidget {
Key
key
,
Animation
<
FractionalOffset
>
position
,
this
.
transformHitTests
:
true
,
this
.
child
this
.
child
,
})
:
super
(
key:
key
,
animation:
position
);
/// The animation that controls the position of the child.
...
...
@@ -116,7 +116,7 @@ class SlideTransition extends AnimatedWidget {
return
new
FractionalTranslation
(
translation:
position
.
value
,
transformHitTests:
transformHitTests
,
child:
child
child:
child
,
);
}
}
...
...
@@ -131,7 +131,7 @@ class ScaleTransition extends AnimatedWidget {
Key
key
,
Animation
<
double
>
scale
,
this
.
alignment
:
FractionalOffset
.
center
,
this
.
child
this
.
child
,
})
:
super
(
key:
key
,
animation:
scale
);
/// The animation that controls the scale of the child.
...
...
@@ -158,7 +158,7 @@ class ScaleTransition extends AnimatedWidget {
return
new
Transform
(
transform:
transform
,
alignment:
alignment
,
child:
child
child:
child
,
);
}
}
...
...
@@ -171,7 +171,7 @@ class RotationTransition extends AnimatedWidget {
RotationTransition
({
Key
key
,
Animation
<
double
>
turns
,
this
.
child
this
.
child
,
})
:
super
(
key:
key
,
animation:
turns
);
/// The animation that controls the rotation of the child.
...
...
@@ -190,7 +190,7 @@ class RotationTransition extends AnimatedWidget {
return
new
Transform
(
transform:
transform
,
alignment:
FractionalOffset
.
center
,
child:
child
child:
child
,
);
}
}
...
...
@@ -210,7 +210,7 @@ class SizeTransition extends AnimatedWidget {
this
.
axis
:
Axis
.
vertical
,
Animation
<
double
>
sizeFactor
,
this
.
axisAlignment
:
0.5
,
this
.
child
this
.
child
,
})
:
super
(
key:
key
,
animation:
sizeFactor
)
{
assert
(
axis
!=
null
);
}
...
...
@@ -241,7 +241,7 @@ class SizeTransition extends AnimatedWidget {
alignment:
alignment
,
heightFactor:
axis
==
Axis
.
vertical
?
sizeFactor
.
value
:
null
,
widthFactor:
axis
==
Axis
.
horizontal
?
sizeFactor
.
value
:
null
,
child:
child
child:
child
,
)
);
}
...
...
@@ -258,7 +258,7 @@ class FadeTransition extends AnimatedWidget {
FadeTransition
({
Key
key
,
Animation
<
double
>
opacity
,
this
.
child
this
.
child
,
})
:
super
(
key:
key
,
animation:
opacity
);
/// The animation that controls the opacity of the child.
...
...
@@ -310,7 +310,7 @@ class PositionedTransition extends AnimatedWidget {
PositionedTransition
({
Key
key
,
Animation
<
RelativeRect
>
rect
,
this
.
child
@required
this
.
child
,
})
:
super
(
key:
key
,
animation:
rect
);
/// The animation that controls the child's size and position.
...
...
@@ -326,7 +326,7 @@ class PositionedTransition extends AnimatedWidget {
right:
rect
.
value
.
right
,
bottom:
rect
.
value
.
bottom
,
left:
rect
.
value
.
left
,
child:
child
child:
child
,
);
}
}
...
...
@@ -350,7 +350,7 @@ class RelativePositionedTransition extends AnimatedWidget {
Key
key
,
@required
Animation
<
Rect
>
rect
,
@required
this
.
size
,
this
.
child
@required
this
.
child
,
})
:
super
(
key:
key
,
animation:
rect
);
/// The animation that controls the child's size and position.
...
...
@@ -373,7 +373,7 @@ class RelativePositionedTransition extends AnimatedWidget {
right:
offsets
.
right
,
bottom:
offsets
.
bottom
,
left:
offsets
.
left
,
child:
child
child:
child
,
);
}
}
...
...
@@ -412,7 +412,7 @@ class AnimatedBuilder extends AnimatedWidget {
Key
key
,
@required
Animation
<
Object
>
animation
,
@required
this
.
builder
,
this
.
child
this
.
child
,
})
:
super
(
key:
key
,
animation:
animation
)
{
assert
(
builder
!=
null
);
}
...
...
packages/flutter/test/widgets/title_test.dart
View file @
0400107c
...
...
@@ -10,6 +10,7 @@ void main() {
Widget
widget
=
new
Title
(
color:
const
Color
(
0xFF00FF00
),
title:
'Awesome app'
,
child:
new
Container
(),
);
expect
(
widget
.
toString
,
isNot
(
throwsException
));
});
...
...
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