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:
# === style rules ===
- always_declare_return_types
# - 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
- annotate_overrides
# - avoid_annotating_with_dynamic # not yet tested
......
......@@ -65,7 +65,7 @@ linter:
# === style rules ===
- always_declare_return_types
# - 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
- annotate_overrides
# - avoid_annotating_with_dynamic # not yet tested
......
......@@ -20,9 +20,9 @@ import 'package:flutter/material.dart';
class CardItem extends StatelessWidget {
CardItem({
Key key,
this.animation,
@required this.animation,
this.onTap,
this.item,
@required this.item,
this.selected: false
}) : super(key: key) {
assert(animation != null);
......
......@@ -371,9 +371,11 @@ class _AllSectionsView extends AnimatedWidget {
// app bar's height is _kAppBarMidHeight and only one section heading is
// visible.
class _SnappingScrollPhysics extends ClampingScrollPhysics {
_SnappingScrollPhysics({ ScrollPhysics parent, this.midScrollOffset }) : super(parent: parent) {
assert(midScrollOffset != null);
}
_SnappingScrollPhysics({
ScrollPhysics parent,
@required this.midScrollOffset,
}) : assert(midScrollOffset != null),
super(parent: parent);
final double midScrollOffset;
......
......@@ -4,6 +4,8 @@
import 'dart:ui' show Offset;
import 'package:flutter/foundation.dart';
import 'lsq_solver.dart';
export 'dart:ui' show Offset;
......@@ -13,7 +15,9 @@ class Velocity {
/// Creates a velocity.
///
/// 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.
static const Velocity zero = const Velocity(pixelsPerSecond: Offset.zero);
......@@ -90,10 +94,10 @@ class VelocityEstimate {
///
/// [pixelsPerSecond], [confidence], [duration], and [offset] must not be null.
const VelocityEstimate({
this.pixelsPerSecond,
this.confidence,
this.duration,
this.offset,
@required this.pixelsPerSecond,
@required this.confidence,
@required this.duration,
@required this.offset,
}) : assert(pixelsPerSecond != null),
assert(confidence != null),
assert(duration != null),
......
......@@ -91,7 +91,7 @@ class DataRow {
this.key,
this.selected: false,
this.onSelectChanged,
this.cells
@required this.cells
}) : assert(cells != null);
/// Creates the configuration for a row of a [DataTable], deriving
......@@ -102,7 +102,7 @@ class DataRow {
int index,
this.selected: false,
this.onSelectChanged,
this.cells
@required this.cells
}) : assert(cells != null),
key = new ValueKey<int>(index);
......
......@@ -786,7 +786,7 @@ class LinearGradient extends Gradient {
const LinearGradient({
this.begin: FractionalOffset.centerLeft,
this.end: FractionalOffset.centerRight,
this.colors,
@required this.colors,
this.stops,
this.tileMode: TileMode.clamp,
}) : assert(begin != null),
......@@ -1000,7 +1000,7 @@ class RadialGradient extends Gradient {
const RadialGradient({
this.center: FractionalOffset.center,
this.radius: 0.5,
this.colors,
@required this.colors,
this.stops,
this.tileMode: TileMode.clamp,
}) : assert(center != null),
......@@ -1262,7 +1262,7 @@ class DecorationImage {
///
/// The [image] argument must not be null.
const DecorationImage({
this.image,
@required this.image,
this.fit,
this.repeat: ImageRepeat.noRepeat,
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