Skip to content

Commit

Permalink
Merge pull request #83 from sparcs-kaist/#82-fix-taxidialog-button-ov…
Browse files Browse the repository at this point in the history
…erflow

Fix: taxiDialog button expanded
  • Loading branch information
happycastle114 authored Sep 12, 2023
2 parents 04558a2 + 10627dd commit 0ebe5ff
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 23 deletions.
7 changes: 4 additions & 3 deletions lib/constants/theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ final defaultDialogPadding =

final defaultDialogButtonSize = Size(147.50, 35);

final defaultDialogButtonInnerPadding = EdgeInsets.only(top: 9, bottom: 9);
final defaultDialogButtonInnerPadding =
EdgeInsets.symmetric(vertical: 9, horizontal: 15);

final defaultDialogButtonBorderRadius = BorderRadius.circular(8.0);

Expand Down Expand Up @@ -109,14 +110,14 @@ ThemeData buildTheme() {
labelLarge: TextStyle(
fontFamily: 'NanumSquare_acB',
color: Color(0xFFEEEEEE),
fontSize: 14,
fontSize: 13,
fontWeight: FontWeight.w700),

//Dialog Elevated 버튼 텍스트
labelMedium: TextStyle(
fontFamily: 'NanumSquare',
color: Color.fromARGB(255, 129, 129, 129),
fontSize: 14,
fontSize: 13,
fontWeight: FontWeight.w400)),
);
return base;
Expand Down
50 changes: 30 additions & 20 deletions lib/views/taxiDialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,27 +44,37 @@ class TaxiDialog extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
defaultDialogPadding,
ElevatedButton(
style: Theme.of(context).elevatedButtonTheme.style,
child: Text(leftButtonContent,
style: Theme.of(context).textTheme.labelMedium),
onPressed: () async {
if (Platform.isIOS) {
exit(0);
} else {
SystemNavigator.pop();
}
}),
Expanded(
child: ElevatedButton(
style: Theme.of(context).elevatedButtonTheme.style,
child: Text(
leftButtonContent,
style: Theme.of(context).textTheme.labelMedium,
overflow: TextOverflow.visible,
),
onPressed: () async {
if (Platform.isIOS) {
exit(0);
} else {
SystemNavigator.pop();
}
}),
),
defaultDialogVerticalMedianButtonPadding,
OutlinedButton(
style: Theme.of(context).outlinedButtonTheme.style,
child: Text(rightButtonContent,
style: Theme.of(context).textTheme.labelLarge),
onPressed: () async {
OpenStore.instance.open(
androidAppBundleId: dotenv.get("ANDROID_APPID"),
appStoreId: dotenv.get("IOS_APPID"));
}),
Expanded(
child: OutlinedButton(
style: Theme.of(context).outlinedButtonTheme.style,
child: Text(
rightButtonContent,
style: Theme.of(context).textTheme.labelLarge,
overflow: TextOverflow.visible,
),
onPressed: () async {
OpenStore.instance.open(
androidAppBundleId: dotenv.get("ANDROID_APPID"),
appStoreId: dotenv.get("IOS_APPID"));
}),
),
defaultDialogPadding,
],
),
Expand Down

0 comments on commit 0ebe5ff

Please sign in to comment.