Commit e4546584 authored by Alexandre Ardhuin's avatar Alexandre Ardhuin Committed by GitHub

enable always_require_non_null_named_parameters lint (#9948)

* enable always_require_non_null_named_parameters lint

* Update home.dart
parent 1f0b2d8a
...@@ -67,7 +67,7 @@ linter: ...@@ -67,7 +67,7 @@ linter:
# === style rules === # === style rules ===
- always_declare_return_types - always_declare_return_types
# - always_put_control_body_on_new_line # not yet tested # - always_put_control_body_on_new_line # not yet tested
# - always_require_non_null_named_parameters # not yet tested - always_require_non_null_named_parameters
- always_specify_types - always_specify_types
- annotate_overrides - annotate_overrides
# - avoid_annotating_with_dynamic # not yet tested # - avoid_annotating_with_dynamic # not yet tested
......
...@@ -65,7 +65,7 @@ linter: ...@@ -65,7 +65,7 @@ linter:
# === style rules === # === style rules ===
- always_declare_return_types - always_declare_return_types
# - always_put_control_body_on_new_line # not yet tested # - always_put_control_body_on_new_line # not yet tested
# - always_require_non_null_named_parameters # not yet tested - always_require_non_null_named_parameters
- always_specify_types - always_specify_types
- annotate_overrides - annotate_overrides
# - avoid_annotating_with_dynamic # not yet tested # - avoid_annotating_with_dynamic # not yet tested
......
...@@ -20,9 +20,9 @@ import 'package:flutter/material.dart'; ...@@ -20,9 +20,9 @@ import 'package:flutter/material.dart';
class CardItem extends StatelessWidget { class CardItem extends StatelessWidget {
CardItem({ CardItem({
Key key, Key key,
this.animation, @required this.animation,
this.onTap, this.onTap,
this.item, @required this.item,
this.selected: false this.selected: false
}) : super(key: key) { }) : super(key: key) {
assert(animation != null); assert(animation != null);
......
...@@ -371,9 +371,11 @@ class _AllSectionsView extends AnimatedWidget { ...@@ -371,9 +371,11 @@ class _AllSectionsView extends AnimatedWidget {
// app bar's height is _kAppBarMidHeight and only one section heading is // app bar's height is _kAppBarMidHeight and only one section heading is
// visible. // visible.
class _SnappingScrollPhysics extends ClampingScrollPhysics { class _SnappingScrollPhysics extends ClampingScrollPhysics {
_SnappingScrollPhysics({ ScrollPhysics parent, this.midScrollOffset }) : super(parent: parent) { _SnappingScrollPhysics({
assert(midScrollOffset != null); ScrollPhysics parent,
} @required this.midScrollOffset,
}) : assert(midScrollOffset != null),
super(parent: parent);
final double midScrollOffset; final double midScrollOffset;
......
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
import 'dart:ui' show Offset; import 'dart:ui' show Offset;
import 'package:flutter/foundation.dart';
import 'lsq_solver.dart'; import 'lsq_solver.dart';
export 'dart:ui' show Offset; export 'dart:ui' show Offset;
...@@ -13,7 +15,9 @@ class Velocity { ...@@ -13,7 +15,9 @@ class Velocity {
/// Creates a velocity. /// Creates a velocity.
/// ///
/// The [pixelsPerSecond] argument must not be null. /// The [pixelsPerSecond] argument must not be null.
const Velocity({ this.pixelsPerSecond }) : assert(pixelsPerSecond != null); const Velocity({
@required this.pixelsPerSecond,
}) : assert(pixelsPerSecond != null);
/// A velocity that isn't moving at all. /// A velocity that isn't moving at all.
static const Velocity zero = const Velocity(pixelsPerSecond: Offset.zero); static const Velocity zero = const Velocity(pixelsPerSecond: Offset.zero);
...@@ -90,10 +94,10 @@ class VelocityEstimate { ...@@ -90,10 +94,10 @@ class VelocityEstimate {
/// ///
/// [pixelsPerSecond], [confidence], [duration], and [offset] must not be null. /// [pixelsPerSecond], [confidence], [duration], and [offset] must not be null.
const VelocityEstimate({ const VelocityEstimate({
this.pixelsPerSecond, @required this.pixelsPerSecond,
this.confidence, @required this.confidence,
this.duration, @required this.duration,
this.offset, @required this.offset,
}) : assert(pixelsPerSecond != null), }) : assert(pixelsPerSecond != null),
assert(confidence != null), assert(confidence != null),
assert(duration != null), assert(duration != null),
......
...@@ -91,7 +91,7 @@ class DataRow { ...@@ -91,7 +91,7 @@ class DataRow {
this.key, this.key,
this.selected: false, this.selected: false,
this.onSelectChanged, this.onSelectChanged,
this.cells @required this.cells
}) : assert(cells != null); }) : assert(cells != null);
/// Creates the configuration for a row of a [DataTable], deriving /// Creates the configuration for a row of a [DataTable], deriving
...@@ -102,7 +102,7 @@ class DataRow { ...@@ -102,7 +102,7 @@ class DataRow {
int index, int index,
this.selected: false, this.selected: false,
this.onSelectChanged, this.onSelectChanged,
this.cells @required this.cells
}) : assert(cells != null), }) : assert(cells != null),
key = new ValueKey<int>(index); key = new ValueKey<int>(index);
......
...@@ -786,7 +786,7 @@ class LinearGradient extends Gradient { ...@@ -786,7 +786,7 @@ class LinearGradient extends Gradient {
const LinearGradient({ const LinearGradient({
this.begin: FractionalOffset.centerLeft, this.begin: FractionalOffset.centerLeft,
this.end: FractionalOffset.centerRight, this.end: FractionalOffset.centerRight,
this.colors, @required this.colors,
this.stops, this.stops,
this.tileMode: TileMode.clamp, this.tileMode: TileMode.clamp,
}) : assert(begin != null), }) : assert(begin != null),
...@@ -1000,7 +1000,7 @@ class RadialGradient extends Gradient { ...@@ -1000,7 +1000,7 @@ class RadialGradient extends Gradient {
const RadialGradient({ const RadialGradient({
this.center: FractionalOffset.center, this.center: FractionalOffset.center,
this.radius: 0.5, this.radius: 0.5,
this.colors, @required this.colors,
this.stops, this.stops,
this.tileMode: TileMode.clamp, this.tileMode: TileMode.clamp,
}) : assert(center != null), }) : assert(center != null),
...@@ -1262,7 +1262,7 @@ class DecorationImage { ...@@ -1262,7 +1262,7 @@ class DecorationImage {
/// ///
/// The [image] argument must not be null. /// The [image] argument must not be null.
const DecorationImage({ const DecorationImage({
this.image, @required this.image,
this.fit, this.fit,
this.repeat: ImageRepeat.noRepeat, this.repeat: ImageRepeat.noRepeat,
this.centerSlice, this.centerSlice,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment