@@ -242,7 +242,8 @@ public override Element createElement() {
242
242
}
243
243
244
244
class _CupertinoDialogRenderElement : RenderObjectElement {
245
- public _CupertinoDialogRenderElement ( _CupertinoDialogRenderWidget widget ) : base ( widget ) { }
245
+ public _CupertinoDialogRenderElement ( _CupertinoDialogRenderWidget widget ) : base ( widget ) {
246
+ }
246
247
247
248
Element _contentElement ;
248
249
Element _actionsElement ;
@@ -706,7 +707,7 @@ public override Widget build(BuildContext context) {
706
707
List < Widget > interactiveButtons = new List < Widget > ( ) ;
707
708
for ( int i = 0 ; i < this . widget . children . Count ; i += 1 ) {
708
709
interactiveButtons . Add (
709
- new _PressableActionButton (
710
+ new _PressableDialogActionButton (
710
711
child : this . widget . children [ i ]
711
712
)
712
713
) ;
@@ -724,8 +725,8 @@ public override Widget build(BuildContext context) {
724
725
}
725
726
}
726
727
727
- class _PressableActionButton : StatefulWidget {
728
- public _PressableActionButton (
728
+ class _PressableDialogActionButton : StatefulWidget {
729
+ public _PressableDialogActionButton (
729
730
Widget child
730
731
) {
731
732
this . child = child ;
@@ -734,15 +735,15 @@ Widget child
734
735
public readonly Widget child ;
735
736
736
737
public override State createState ( ) {
737
- return new _PressableActionButtonState ( ) ;
738
+ return new _PressableDialogActionButtonState ( ) ;
738
739
}
739
740
}
740
741
741
- class _PressableActionButtonState : State < _PressableActionButton > {
742
+ class _PressableDialogActionButtonState : State < _PressableDialogActionButton > {
742
743
bool _isPressed = false ;
743
744
744
745
public override Widget build ( BuildContext context ) {
745
- return new _ActionButtonParentDataWidget (
746
+ return new _DialogActionButtonParentDataWidget (
746
747
isPressed : this . _isPressed ,
747
748
child : new GestureDetector (
748
749
behavior : HitTestBehavior . opaque ,
@@ -755,8 +756,8 @@ public override Widget build(BuildContext context) {
755
756
}
756
757
}
757
758
758
- class _ActionButtonParentDataWidget : ParentDataWidget < _CupertinoDialogActionsRenderWidget > {
759
- public _ActionButtonParentDataWidget (
759
+ class _DialogActionButtonParentDataWidget : ParentDataWidget < _CupertinoDialogActionsRenderWidget > {
760
+ public _DialogActionButtonParentDataWidget (
760
761
Widget child ,
761
762
bool isPressed = false ,
762
763
Key key = null
@@ -767,8 +768,8 @@ public _ActionButtonParentDataWidget(
767
768
public readonly bool isPressed ;
768
769
769
770
public override void applyParentData ( RenderObject renderObject ) {
770
- D . assert ( renderObject . parentData is _ActionButtonParentData ) ;
771
- _ActionButtonParentData parentData = renderObject . parentData as _ActionButtonParentData ;
771
+ D . assert ( renderObject . parentData is _DialogActionButtonParentData ) ;
772
+ _DialogActionButtonParentData parentData = renderObject . parentData as _DialogActionButtonParentData ;
772
773
if ( parentData . isPressed != this . isPressed ) {
773
774
parentData . isPressed = this . isPressed ;
774
775
AbstractNodeMixinDiagnosticableTree targetParent = renderObject . parent ;
@@ -779,8 +780,8 @@ public override void applyParentData(RenderObject renderObject) {
779
780
}
780
781
}
781
782
782
- class _ActionButtonParentData : MultiChildLayoutParentData {
783
- public _ActionButtonParentData (
783
+ class _DialogActionButtonParentData : MultiChildLayoutParentData {
784
+ public _DialogActionButtonParentData (
784
785
bool isPressed = false
785
786
) {
786
787
this . isPressed = isPressed ;
@@ -991,8 +992,8 @@ List<RenderBox> _pressedButtons {
991
992
992
993
RenderBox currentChild = this . firstChild ;
993
994
while ( currentChild != null ) {
994
- D . assert ( currentChild . parentData is _ActionButtonParentData ) ;
995
- _ActionButtonParentData parentData = currentChild . parentData as _ActionButtonParentData ;
995
+ D . assert ( currentChild . parentData is _DialogActionButtonParentData ) ;
996
+ _DialogActionButtonParentData parentData = currentChild . parentData as _DialogActionButtonParentData ;
996
997
if ( parentData . isPressed ) {
997
998
childList . Add ( currentChild ) ;
998
999
}
@@ -1008,8 +1009,8 @@ bool _isButtonPressed {
1008
1009
get {
1009
1010
RenderBox currentChild = this . firstChild ;
1010
1011
while ( currentChild != null ) {
1011
- D . assert ( currentChild . parentData is _ActionButtonParentData ) ;
1012
- _ActionButtonParentData parentData = currentChild . parentData as _ActionButtonParentData ;
1012
+ D . assert ( currentChild . parentData is _DialogActionButtonParentData ) ;
1013
+ _DialogActionButtonParentData parentData = currentChild . parentData as _DialogActionButtonParentData ;
1013
1014
if ( parentData . isPressed ) {
1014
1015
return true ;
1015
1016
}
@@ -1022,8 +1023,8 @@ bool _isButtonPressed {
1022
1023
}
1023
1024
1024
1025
public override void setupParentData ( RenderObject child ) {
1025
- if ( ! ( child . parentData is _ActionButtonParentData ) ) {
1026
- child . parentData = new _ActionButtonParentData ( ) ;
1026
+ if ( ! ( child . parentData is _DialogActionButtonParentData ) ) {
1027
+ child . parentData = new _DialogActionButtonParentData ( ) ;
1027
1028
}
1028
1029
}
1029
1030
@@ -1279,13 +1280,15 @@ void _drawButtonBackgroundsAndDividersStacked(Canvas canvas, Offset offset) {
1279
1280
RenderBox prevChild = null ;
1280
1281
1281
1282
while ( child != null ) {
1282
- D . assert ( child . parentData is _ActionButtonParentData ) ;
1283
- _ActionButtonParentData currentButtonParentData = child . parentData as _ActionButtonParentData ;
1283
+ D . assert ( child . parentData is _DialogActionButtonParentData ) ;
1284
+ _DialogActionButtonParentData currentButtonParentData =
1285
+ child . parentData as _DialogActionButtonParentData ;
1284
1286
bool isButtonPressed = currentButtonParentData . isPressed ;
1285
1287
bool isPrevButtonPressed = false ;
1286
1288
if ( prevChild != null ) {
1287
- D . assert ( prevChild . parentData is _ActionButtonParentData ) ;
1288
- _ActionButtonParentData previousButtonParentData = prevChild . parentData as _ActionButtonParentData ;
1289
+ D . assert ( prevChild . parentData is _DialogActionButtonParentData ) ;
1290
+ _DialogActionButtonParentData previousButtonParentData =
1291
+ prevChild . parentData as _DialogActionButtonParentData ;
1289
1292
isPrevButtonPressed = previousButtonParentData . isPressed ;
1290
1293
}
1291
1294
0 commit comments