From 3c9e9b341063fbb9493920c7e0b735f888d16f79 Mon Sep 17 00:00:00 2001 From: liyuqian Date: Tue, 16 Oct 2018 11:02:55 -0700 Subject: [PATCH] Revert "Remove mixin so we can roll Google3 (#22819)" (#22926) This reverts commit c689c97d0579d2a215034359a3cbcdc61173d2ab. The Dart analyzer in Google3 has been upgraded so we won't need this. --- packages/flutter/lib/src/material/flat_button.dart | 2 +- packages/flutter/lib/src/material/material_button.dart | 4 +--- packages/flutter/lib/src/material/outline_button.dart | 2 +- packages/flutter/lib/src/material/raised_button.dart | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/flutter/lib/src/material/flat_button.dart b/packages/flutter/lib/src/material/flat_button.dart index d7d09f119b..51a7c47b57 100644 --- a/packages/flutter/lib/src/material/flat_button.dart +++ b/packages/flutter/lib/src/material/flat_button.dart @@ -161,7 +161,7 @@ class FlatButton extends MaterialButton { /// /// This class only exists to give FlatButtons created with [FlatButton.icon] /// a distinct class for the sake of [ButtonTheme]. It can not be instantiated. -class _FlatButtonWithIcon extends FlatButton implements MaterialButtonWithIconMixin { +class _FlatButtonWithIcon extends FlatButton with MaterialButtonWithIconMixin { _FlatButtonWithIcon({ Key key, @required VoidCallback onPressed, diff --git a/packages/flutter/lib/src/material/material_button.dart b/packages/flutter/lib/src/material/material_button.dart index 17ed76bd2e..ad83b239c3 100644 --- a/packages/flutter/lib/src/material/material_button.dart +++ b/packages/flutter/lib/src/material/material_button.dart @@ -282,6 +282,4 @@ class MaterialButton extends StatelessWidget { /// /// This mixin only exists to give the "label and icon" button widgets a distinct /// type for the sake of [ButtonTheme]. -abstract class MaterialButtonWithIconMixin { - MaterialButtonWithIconMixin._(); -} +mixin MaterialButtonWithIconMixin { } diff --git a/packages/flutter/lib/src/material/outline_button.dart b/packages/flutter/lib/src/material/outline_button.dart index ef4321fee3..31a3c72528 100644 --- a/packages/flutter/lib/src/material/outline_button.dart +++ b/packages/flutter/lib/src/material/outline_button.dart @@ -185,7 +185,7 @@ class OutlineButton extends MaterialButton { // // This class only exists to give RaisedButtons created with [RaisedButton.icon] // a distinct class for the sake of [ButtonTheme]. It can not be instantiated. -class _OutlineButtonWithIcon extends OutlineButton implements MaterialButtonWithIconMixin { +class _OutlineButtonWithIcon extends OutlineButton with MaterialButtonWithIconMixin { _OutlineButtonWithIcon({ Key key, @required VoidCallback onPressed, diff --git a/packages/flutter/lib/src/material/raised_button.dart b/packages/flutter/lib/src/material/raised_button.dart index a0bc45de04..97c34e0ec0 100644 --- a/packages/flutter/lib/src/material/raised_button.dart +++ b/packages/flutter/lib/src/material/raised_button.dart @@ -171,7 +171,7 @@ class RaisedButton extends MaterialButton { /// /// This class only exists to give RaisedButtons created with [RaisedButton.icon] /// a distinct class for the sake of [ButtonTheme]. It can not be instantiated. -class _RaisedButtonWithIcon extends RaisedButton implements MaterialButtonWithIconMixin { +class _RaisedButtonWithIcon extends RaisedButton with MaterialButtonWithIconMixin { _RaisedButtonWithIcon({ Key key, @required VoidCallback onPressed,