add @required (#9579)

This commit is contained in:
Alexandre Ardhuin
2017-04-25 08:59:43 +02:00
committed by GitHub
parent c288c7064f
commit 31828609dc
4 changed files with 13 additions and 4 deletions

View File

@@ -81,7 +81,10 @@ class PaletteTabView extends StatelessWidget {
static const List<int> primaryKeys = const <int>[50, 100, 200, 300, 400, 500, 600, 700, 800, 900];
static const List<int> accentKeys = const <int>[100, 200, 400, 700];
PaletteTabView({ Key key, this.colors }) : super(key: key) {
PaletteTabView({
Key key,
@required this.colors,
}) : super(key: key) {
assert(colors != null && colors.isValid);
}

View File

@@ -325,7 +325,7 @@ class _OrderPageState extends State<OrderPage> {
// final value of the order field.
class ShrineOrderRoute extends ShrinePageRoute<Order> {
ShrineOrderRoute({
this.order,
@required this.order,
WidgetBuilder builder,
RouteSettings settings: const RouteSettings(),
}) : super(builder: builder, settings: settings) {

View File

@@ -4,6 +4,7 @@
import 'dart:math' as math;
import 'package:flutter/foundation.dart';
import 'package:flutter/rendering.dart';
import 'basic.dart';
@@ -177,7 +178,7 @@ class _SingleChildViewport extends SingleChildRenderObjectWidget {
class _RenderSingleChildViewport extends RenderBox with RenderObjectWithChildMixin<RenderBox> implements RenderAbstractViewport {
_RenderSingleChildViewport({
AxisDirection axisDirection: AxisDirection.down,
ViewportOffset offset,
@required ViewportOffset offset,
RenderBox child,
}) : _axisDirection = axisDirection,
_offset = offset {

View File

@@ -16,7 +16,12 @@ import 'build.dart';
export '../android/android_device.dart' show AndroidDevice;
class ApkKeystoreInfo {
ApkKeystoreInfo({ this.keystore, this.password, this.keyAlias, @required this.keyPassword }) {
ApkKeystoreInfo({
@required this.keystore,
this.password,
this.keyAlias,
@required this.keyPassword,
}) {
assert(keystore != null);
}