Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bottomSheetHeader 레이아웃 수정 #27

Merged
merged 1 commit into from
Feb 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.29"
version: "0.0.30"
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.29
quantum_dots: ^0.0.30

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.

7 changes: 5 additions & 2 deletions lib/src/bottom_sheet/title/bottom_sheet_header.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class BottomSheetHeader extends StatelessWidget {
final hasLeading = _uiState.leading != null;
final hasActions = _uiState.actions != null;
final description = _uiState.title.description;
final hasLeadingAndActions = hasLeading || hasActions;

return Container(
width: double.infinity,
Expand All @@ -31,7 +32,7 @@ class BottomSheetHeader extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
if (hasLeading)
if (hasLeadingAndActions) ...[
Container(
alignment: Alignment.centerLeft,
width: _leadingAndActionsAreaSize,
Expand All @@ -42,14 +43,15 @@ class BottomSheetHeader extends StatelessWidget {
)
: const SizedBox(),
),
],
Expanded(
child: Text(
_uiState.title.title,
textAlign: TextAlign.center,
style: headline20Bold.copyWith(color: wippyGray900),
),
),
if (hasActions)
if (hasLeadingAndActions) ...[
Container(
alignment: Alignment.centerRight,
width: _leadingAndActionsAreaSize,
Expand All @@ -63,6 +65,7 @@ class BottomSheetHeader extends StatelessWidget {
)
: const SizedBox(),
),
],
],
),
if (description != null) ...[
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: quantum_dots
description: the design system for wippy global product
version: 0.0.29
version: 0.0.30
homepage: https://github.com/nrise/Quantum-Dots
topics:
- animations
Expand Down