Skip to content

Commit a255919

Browse files
committed
function inlined [nfc]: _materialDialogActionText made inline in _adaptiveAction
1 parent ac69783 commit a255919

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

lib/widgets/dialog.dart

-14
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,6 @@ import 'package:flutter/material.dart';
33
import 'package:flutter_gen/gen_l10n/zulip_localizations.dart';
44
import 'package:flutter/foundation.dart';
55

6-
Widget _materialDialogActionText(String text) {
7-
return Text(
8-
text,
9-
10-
// As suggested by
11-
// https://api.flutter.dev/flutter/material/AlertDialog/actions.html :
12-
// > It is recommended to set the Text.textAlign to TextAlign.end
13-
// > for the Text within the TextButton, so that buttons whose
14-
// > labels wrap to an extra line align with the overall
15-
// > OverflowBar's alignment within the dialog.
16-
textAlign: TextAlign.end,
17-
);
18-
}
19-
206
/// A platform-appropriate action for [AlertDialog.adaptive]'s [actions] param.
217
Widget _adaptiveAction({required VoidCallback onPressed, required String text}) {
228
switch (defaultTargetPlatform) {

0 commit comments

Comments
 (0)