From 48d687230fb92a1ace8834ed65f4a62fea03619b Mon Sep 17 00:00:00 2001 From: frozenrainyoo Date: Sat, 30 Jan 2021 23:31:01 +0900 Subject: [PATCH] Apply custom buttonPadding for doubleButton When button text length is short, doubleButton is hard to tab. so, need custom buttonPadding. --- lib/flutter_custom_dialog.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/flutter_custom_dialog.dart b/lib/flutter_custom_dialog.dart index fd072e9..a1d7708 100644 --- a/lib/flutter_custom_dialog.dart +++ b/lib/flutter_custom_dialog.dart @@ -102,12 +102,14 @@ class YYDialog { fontWeight1, fontFamily1, VoidCallback onTap1, + buttonPadding1 = const EdgeInsets.all(0.0), text2, color2, fontSize2, fontWeight2, fontFamily2, onTap2, + buttonPadding2 = const EdgeInsets.all(0.0), }) { return this.widget( SizedBox( @@ -122,7 +124,7 @@ class YYDialog { dismiss(); } }, - padding: EdgeInsets.all(0.0), + padding: buttonPadding1, child: Text( text1 ?? "", style: TextStyle( @@ -144,7 +146,7 @@ class YYDialog { dismiss(); } }, - padding: EdgeInsets.all(0.0), + padding: buttonPadding2, child: Text( text2 ?? "", style: TextStyle(