Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7164c53

Browse files
Replace 'FlatButton' with 'TextButton'
Replace 'FlatButton' with 'TextButton'
1 parent 7103d3c commit 7164c53

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

β€Žlib/flutter_custom_dialog.dart

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -117,44 +117,48 @@ class YYDialog {
117117
child: Row(
118118
mainAxisAlignment: getRowMainAxisAlignment(gravity),
119119
children: <Widget>[
120-
FlatButton(
120+
TextButton(
121121
onPressed: () {
122122
if (onTap1 != null) onTap1();
123123
if (isClickAutoDismiss) {
124124
dismiss();
125125
}
126126
},
127-
padding: buttonPadding1,
128-
child: Text(
129-
text1 ?? "",
130-
style: TextStyle(
127+
style: TextButton.styleFrom(
128+
padding: buttonPadding1,
129+
textStyle: TextStyle(
131130
color: color1 ?? null,
132131
fontSize: fontSize1 ?? null,
133132
fontWeight: fontWeight1,
134133
fontFamily: fontFamily1,
135-
),
134+
)
135+
),
136+
child: Text(
137+
text1 ?? "",
136138
),
137139
),
138140
Visibility(
139141
visible: withDivider,
140142
child: VerticalDivider(),
141143
),
142-
FlatButton(
144+
TextButton(
143145
onPressed: () {
144146
if (onTap2 != null) onTap2();
145147
if (isClickAutoDismiss) {
146148
dismiss();
147149
}
148150
},
149-
padding: buttonPadding2,
151+
style: TextButton.styleFrom(
152+
padding: buttonPadding2,
153+
textStyle: TextStyle(
154+
color: color2 ?? Colors.black,
155+
fontSize: fontSize2 ?? 14.0,
156+
fontWeight: fontWeight2,
157+
fontFamily: fontFamily2,
158+
),
159+
),
150160
child: Text(
151161
text2 ?? "",
152-
style: TextStyle(
153-
color: color2 ?? Colors.black,
154-
fontSize: fontSize2 ?? 14.0,
155-
fontWeight: fontWeight2,
156-
fontFamily: fontFamily2,
157-
),
158162
),
159163
)
160164
],

0 commit comments

Comments
(0)

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /