Skip to content

Commit

Permalink
Merge pull request #19 from nrise/bug/WGJS-3935
Browse files Browse the repository at this point in the history
Fix QDS Route, BoxButton Bugs
  • Loading branch information
myeonginwoo authored Feb 5, 2025
2 parents 7d4ac1b + 832b372 commit 8bbed43
Show file tree
Hide file tree
Showing 23 changed files with 352 additions and 372 deletions.
16 changes: 8 additions & 8 deletions example/lib/dimmed_loading_test_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ class _DimmedLoadingTestState extends State<DimmedLoadingTestScreen> {
buttonColorType: const QdsBoxButtonColorType.secondary(),
buttonLabelType: const QdsBoxButtonLabelType.labelOnly(label: 'Escape'),
buttonSizeType: QdsBoxButtonSizeType.large(),
onPressed: () {
Navigator.pop(context);
},
),
onPressed: () {
Navigator.pop(context);
},
)
],
);
Expand All @@ -41,12 +41,12 @@ class _DimmedLoadingTestState extends State<DimmedLoadingTestScreen> {
buttonColorType: const QdsBoxButtonColorType.primary(),
buttonLabelType: const QdsBoxButtonLabelType.labelOnly(label: 'Dimmed State on'),
buttonSizeType: QdsBoxButtonSizeType.large(),
onPressed: () {
setState(() {
_canShowDimmedLoadingScreen = true;
});
},
),
onPressed: () {
setState(() {
_canShowDimmedLoadingScreen = true;
});
},
)
];

Expand Down
202 changes: 101 additions & 101 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -148,47 +148,47 @@ class DesignSystemSamplePage extends StatelessWidget {
buttonColorType: const QdsBoxButtonColorType.primary(),
buttonLabelType: const QdsBoxButtonLabelType.labelOnly(label: 'PickerBottomSheet 띄우기'),
buttonSizeType: QdsBoxButtonSizeType.large(),
onPressed: () {
showWippyBottomSheet(
name: "PickerBottomSheet",
isDismissible: true,
context: context,
buildBottomSheet: (context) {
return const WippyPickerBottomSheet(
ctaText: "Select",
headerUiState: BottomSheetHeaderUiState(
title: BottomSheetHeaderTitle(
title: "City",
),
),
items: [
PickerItem(
displayName: "Tokyo",
),
PickerItem(
displayName: "Minato",
),
PickerItem(
displayName: "Shinjuku",
),
PickerItem(
displayName: "Koto",
),
PickerItem(
displayName: "Taito",
),
PickerItem(
displayName: "Sumida",
),
PickerItem(
displayName: "Koto",
)
],
);
},
);
},
),
onPressed: () {
showWippyBottomSheet(
name: "PickerBottomSheet",
isDismissible: true,
context: context,
buildBottomSheet: (context) {
return const WippyPickerBottomSheet(
ctaText: "Select",
headerUiState: BottomSheetHeaderUiState(
title: BottomSheetHeaderTitle(
title: "City",
),
),
items: [
PickerItem(
displayName: "Tokyo",
),
PickerItem(
displayName: "Minato",
),
PickerItem(
displayName: "Shinjuku",
),
PickerItem(
displayName: "Koto",
),
PickerItem(
displayName: "Taito",
),
PickerItem(
displayName: "Sumida",
),
PickerItem(
displayName: "Koto",
)
],
);
},
);
},
),
];
}
Expand Down Expand Up @@ -271,16 +271,16 @@ class DesignSystemSamplePage extends StatelessWidget {
buttonColorType: const QdsBoxButtonColorType.primary(),
buttonLabelType: const QdsBoxButtonLabelType.labelOnly(label: 'Go to Toast Test Page'),
buttonSizeType: QdsBoxButtonSizeType.large(),
onPressed: () {
Navigator.push(
context,
ScreenSlideTransitionPage(
child: const ToastTestScreen(),
name: "ToastTestScreen",
).createRoute(context),
);
},
),
onPressed: () {
Navigator.push(
context,
ScreenSlideTransitionPage(
child: const ToastTestScreen(),
name: "ToastTestScreen",
).createRoute(context),
);
},
)
];
}
Expand All @@ -292,48 +292,48 @@ class DesignSystemSamplePage extends StatelessWidget {
buttonColorType: const QdsBoxButtonColorType.primary(),
buttonLabelType: const QdsBoxButtonLabelType.labelOnly(label: 'Show SingleButton Popup'),
buttonSizeType: QdsBoxButtonSizeType.large(),
onPressed: () {
showDialog(
barrierDismissible: false,
context: context,
builder: (context) {
return WippyPopup(
uiState: WippyPopupUiState(
title: 'Title',
description: 'Description',
popupButtonType: PopupButtonType.singleButton(
label: 'Close',
onPressed: () {
Navigator.pop(context);
})),
);
});
},
),
onPressed: () {
showDialog(
barrierDismissible: false,
context: context,
builder: (context) {
return WippyPopup(
uiState: WippyPopupUiState(
title: 'Title',
description: 'Description',
popupButtonType: PopupButtonType.singleButton(
label: 'Close',
onPressed: () {
Navigator.pop(context);
})),
);
});
},
),
QdsBoxButton(
initUiState: QdsBoxButtonUiState(
buttonColorType: const QdsBoxButtonColorType.primary(),
buttonLabelType: const QdsBoxButtonLabelType.labelOnly(label: 'Show MultiButton Popup'),
buttonSizeType: QdsBoxButtonSizeType.large(),
onPressed: () {
showDialog(
barrierDismissible: false,
context: context,
builder: (context) {
return WippyPopup(
uiState: WippyPopupUiState(
title: 'Request Friend?',
popupButtonType: PopupButtonType.multiButton(
leftButtonLabel: 'No',
onPressedLeftButton: () {
Navigator.pop(context);
},
rightButtonLabel: 'Yes'),
));
});
},
),
onPressed: () {
showDialog(
barrierDismissible: false,
context: context,
builder: (context) {
return WippyPopup(
uiState: WippyPopupUiState(
title: 'Request Friend?',
popupButtonType: PopupButtonType.multiButton(
leftButtonLabel: 'No',
onPressedLeftButton: () {
Navigator.pop(context);
},
rightButtonLabel: 'Yes'),
));
});
},
)
];
}
Expand All @@ -345,16 +345,16 @@ class DesignSystemSamplePage extends StatelessWidget {
buttonColorType: const QdsBoxButtonColorType.primary(),
buttonLabelType: const QdsBoxButtonLabelType.labelOnly(label: 'Go to Empty States Page'),
buttonSizeType: QdsBoxButtonSizeType.large(),
onPressed: () {
Navigator.push(
context,
ScreenSlideTransitionPage(
child: const EmptyStatesTestScreen(),
name: "EmptyStatesTestScreen",
).createRoute(context),
);
},
),
onPressed: () {
Navigator.push(
context,
ScreenSlideTransitionPage(
child: const EmptyStatesTestScreen(),
name: "EmptyStatesTestScreen",
).createRoute(context),
);
},
)
];
}
Expand All @@ -367,16 +367,16 @@ class DesignSystemSamplePage extends StatelessWidget {
buttonColorType: const QdsBoxButtonColorType.primary(),
buttonLabelType: const QdsBoxButtonLabelType.labelOnly(label: 'Go to Dimmed Loading Page'),
buttonSizeType: QdsBoxButtonSizeType.large(),
onPressed: () {
Navigator.push(
context,
ScreenSlideTransitionPage(
child: const DimmedLoadingTestScreen(),
name: "DimmedLoadingTestScreen",
).createRoute(context),
);
},
),
onPressed: () {
Navigator.push(
context,
ScreenSlideTransitionPage(
child: const DimmedLoadingTestScreen(),
name: "DimmedLoadingTestScreen",
).createRoute(context),
);
},
)
];
}
Expand Down
16 changes: 8 additions & 8 deletions example/lib/toast_test_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ class ToastTestScreen extends StatelessWidget {
buttonColorType: const QdsBoxButtonColorType.primary(),
buttonLabelType: const QdsBoxButtonLabelType.labelOnly(label: 'Show Toast'),
buttonSizeType: QdsBoxButtonSizeType.large(),
onPressed: () {
BlocProvider.of<WippyToastBloc>(context).add(
const WippyToastUiEvent.show(
message: "Hi Hi Hi Hi Hi Hi",
messageKey: null,
),
);
},
),
onPressed: () {
BlocProvider.of<WippyToastBloc>(context).add(
const WippyToastUiEvent.show(
message: "Hi Hi Hi Hi Hi Hi",
messageKey: null,
),
);
},
),
),
IgnorePointer(
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.0.17"
version: "0.0.18"
rxdart:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies:
sdk: flutter
flutter_bloc: ^8.1.6
cupertino_icons: ^1.0.8
quantum_dots: ^0.0.17
quantum_dots: ^0.0.18

dev_dependencies:
flutter_test:
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec_overrides.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/qds_page_route.dart
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export 'src/page_route/screen_slide_transition_page.dart';
export 'src/page_route/tab_change_fade_transition_page.dart';
export 'src/page_route/screen_route_fade_transition_page.dart';
4 changes: 2 additions & 2 deletions lib/src/bottom_sheet/selectable_button_component.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ class SelectableButtonComponent extends StatelessWidget {
),
buttonColorType: const QdsBoxButtonColorType.tertiary(),
enable: leftEnable,
onPressed: (() => onClickLeftButton()),
),
onPressed: (() => onClickLeftButton()),
),
),
const SizedBox(width: 8),
Expand All @@ -50,8 +50,8 @@ class SelectableButtonComponent extends StatelessWidget {
),
buttonColorType: const QdsBoxButtonColorType.primary(),
enable: rightEnable,
onPressed: (() => onClickRightButton()),
),
onPressed: (() => onClickRightButton()),
),
),
],
Expand Down
14 changes: 7 additions & 7 deletions lib/src/bottom_sheet/wippy_picker_bottom_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ class WippyPickerBottomSheetState extends WippyBottomSheetState<WippyPickerBotto
buttonLabelType: QdsBoxButtonLabelType.labelOnly(label: widget.ctaText),
buttonColorType: QdsBoxButtonColorType.primary(),
buttonSizeType: QdsBoxButtonSizeType.large(),
onPressed: () {
final currentPickedItem = this.currentPickedItem;
if (currentPickedItem != null) {
widget._onSelected?.call(currentPickedItem);
Navigator.pop(context);
}
},
),
onPressed: () {
final currentPickedItem = this.currentPickedItem;
if (currentPickedItem != null) {
widget._onSelected?.call(currentPickedItem);
Navigator.pop(context);
}
},
),
),
SizedBox(height: 20),
Expand Down
6 changes: 3 additions & 3 deletions lib/src/button/extension_widget/bottom_cta_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ class BottomCtaButton extends StatelessWidget {
child: Padding(
padding: EdgeInsets.fromLTRB(16, 0, 16, 20),
child: QdsBoxButton(
onPressed: () {
_onPressed();
},
initUiState: QdsBoxButtonUiState(
buttonLabelType: _labelType,
state: _state,
buttonColorType: QdsBoxButtonColorType.primary(),
buttonSizeType: QdsBoxButtonSizeType.large(),
onPressed: () {
_onPressed();
},
),
),
),
Expand Down
Loading

0 comments on commit 8bbed43

Please sign in to comment.