diff --git a/lib/src/adaptiveWidgets/adaptive_app_bar.dart b/lib/src/adaptiveWidgets/adaptive_app_bar.dart index 76912fe4..389416aa 100644 --- a/lib/src/adaptiveWidgets/adaptive_app_bar.dart +++ b/lib/src/adaptiveWidgets/adaptive_app_bar.dart @@ -20,12 +20,12 @@ class AdaptiveAppBar extends AdaptiveWidget with Preferr this.actions, this.elevation, this.leadingIcon, - }) : super(key: key); + }) : super(childKey: key); @override AppBar buildMaterialWidget(BuildContext context) { return AppBar( - key: key, + key: childKey, leading: leadingIcon, title: title, actions: actions, @@ -41,7 +41,7 @@ class AdaptiveAppBar extends AdaptiveWidget with Preferr barBackgroundColor: primary, ), child: CupertinoNavigationBar( - key: key, + key: childKey, leading: leadingIcon, padding: EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), middle: Padding( diff --git a/lib/src/adaptiveWidgets/adaptive_dialog.dart b/lib/src/adaptiveWidgets/adaptive_dialog.dart index 4fa27e90..49da4597 100644 --- a/lib/src/adaptiveWidgets/adaptive_dialog.dart +++ b/lib/src/adaptiveWidgets/adaptive_dialog.dart @@ -13,12 +13,12 @@ class AdaptiveDialog extends AdaptiveWidget { this.title, this.content, this.actions, - }) : super(key: key); + }) : super(childKey: key); @override AlertDialog buildMaterialWidget(BuildContext context) { return AlertDialog( - key: key, + key: childKey, title: title, content: content, actions: actions, @@ -28,7 +28,7 @@ class AdaptiveDialog extends AdaptiveWidget { @override CupertinoAlertDialog buildCupertinoWidget(BuildContext context) { return CupertinoAlertDialog( - key: key, + key: childKey, title: title, content: content, actions: actions, diff --git a/lib/src/adaptiveWidgets/adaptive_dialog_action.dart b/lib/src/adaptiveWidgets/adaptive_dialog_action.dart index ac172a2f..cea494e3 100644 --- a/lib/src/adaptiveWidgets/adaptive_dialog_action.dart +++ b/lib/src/adaptiveWidgets/adaptive_dialog_action.dart @@ -11,12 +11,12 @@ class AdaptiveDialogAction extends AdaptiveWidget { Key key, this.androidIcon, this.iosIcon, - }) : super(key: key); + }) : super(childKey: key); @override Icon buildMaterialWidget(BuildContext context) { return Icon( androidIcon, - key: key, + key: childKey, ); } @@ -25,7 +25,7 @@ class AdaptiveIcon extends AdaptiveWidget { Icon buildCupertinoWidget(BuildContext context) { return Icon( iosIcon, - key: key, + key: childKey, ); } } diff --git a/lib/src/adaptiveWidgets/adaptive_icon_button.dart b/lib/src/adaptiveWidgets/adaptive_icon_button.dart index f2715861..f65abda7 100644 --- a/lib/src/adaptiveWidgets/adaptive_icon_button.dart +++ b/lib/src/adaptiveWidgets/adaptive_icon_button.dart @@ -14,12 +14,12 @@ class AdaptiveIconButton extends AdaptiveWidget { this.icon, this.onPressed, this.color, - }) : super(key: key); + }) : super(childKey: key); @override IconButton buildMaterialWidget(BuildContext context) { return IconButton( - key: key, + key: childKey, icon: icon, onPressed: onPressed, ); @@ -28,7 +28,7 @@ class AdaptiveIconButton extends AdaptiveWidget { @override CupertinoButton buildCupertinoWidget(BuildContext context) { return CupertinoButton( - key: key, + key: childKey, padding: EdgeInsets.fromLTRB(0.0, 0.0, 0.0, 0.0), child: icon, onPressed: onPressed, diff --git a/lib/src/adaptiveWidgets/adaptive_ink_well.dart b/lib/src/adaptiveWidgets/adaptive_ink_well.dart index 7e95d1d9..345c4cdb 100644 --- a/lib/src/adaptiveWidgets/adaptive_ink_well.dart +++ b/lib/src/adaptiveWidgets/adaptive_ink_well.dart @@ -11,12 +11,12 @@ class AdaptiveInkWell extends AdaptiveWidget { Key key, this.onTap, this.child, - }) : super(key: key); + }) : super(childKey: key); @override InkWell buildMaterialWidget(BuildContext context) { return InkWell( - key: key, + key: childKey, onTap: onTap, child: child, ); @@ -25,7 +25,7 @@ class AdaptiveInkWell extends AdaptiveWidget { @override GestureDetector buildCupertinoWidget(BuildContext context) { return GestureDetector( - key: key, + key: childKey, onTap: onTap, child: child, ); diff --git a/lib/src/adaptiveWidgets/adaptive_raised_button.dart b/lib/src/adaptiveWidgets/adaptive_raised_button.dart index 3b8680e0..9157bced 100644 --- a/lib/src/adaptiveWidgets/adaptive_raised_button.dart +++ b/lib/src/adaptiveWidgets/adaptive_raised_button.dart @@ -20,13 +20,14 @@ class AdaptiveRaisedButton extends AdaptiveWidget this.textColor, this.shape, this.child, - }) : super(key: key); + }) : super(childKey: key); @override ButtonTheme buildMaterialWidget(BuildContext context) { return ButtonTheme( minWidth: buttonWidth ?? buttonThemeMinWidth, child: RaisedButton( + key: childKey, color: color, textColor: textColor, child: child, @@ -39,6 +40,7 @@ class AdaptiveRaisedButton extends AdaptiveWidget @override CupertinoButton buildCupertinoWidget(BuildContext context) { return CupertinoButton( + key: childKey, padding: EdgeInsets.symmetric(vertical: 14.0, horizontal: 24.0), color: color, child: child, diff --git a/lib/src/adaptiveWidgets/adaptive_widget.dart b/lib/src/adaptiveWidgets/adaptive_widget.dart index af15b5d7..d93f7101 100644 --- a/lib/src/adaptiveWidgets/adaptive_widget.dart +++ b/lib/src/adaptiveWidgets/adaptive_widget.dart @@ -5,9 +5,9 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; abstract class AdaptiveWidget extends StatelessWidget { - final Key key; + final Key childKey; - AdaptiveWidget({this.key}); + AdaptiveWidget({@required this.childKey}); C buildCupertinoWidget(BuildContext context);