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

Remove unnecessary import and update example project's dependency version #52

Merged
merged 3 commits into from
Sep 4, 2023
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## 0.1.0

- Remove unnecessary import and update example project's dependency version. [#52](https://github.com/woltapp/wolt_modal_sheet/pull/52)
- Add option to dynamically enable bottom sheet drag for a single page. [#45](https://github.com/woltapp/wolt_modal_sheet/pull/45)
- Add theme extensions for wolt modal sheet. [#44](https://github.com/woltapp/wolt_modal_sheet/pull/44)
- Enhancing Top Bar Configuration & Scroll Motion Animation. [#42](https://github.com/woltapp/wolt_modal_sheet/pull/42)
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,6 @@ packages:
path: ".."
relative: true
source: path
version: "0.0.4"
version: "0.1.0"
sdks:
dart: ">=3.0.0 <4.0.0"
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import 'package:flutter/material.dart';
import 'package:wolt_modal_sheet/src/content/components/main_content/wolt_modal_sheet_hero_image.dart';
import 'package:wolt_modal_sheet/src/modal_page/wolt_modal_sheet_page.dart';
import 'package:wolt_modal_sheet/src/modal_type/wolt_modal_type.dart';
import 'package:wolt_modal_sheet/src/theme/wolt_modal_sheet_default_theme_data.dart';
import 'package:wolt_modal_sheet/wolt_modal_sheet.dart';

Expand Down Expand Up @@ -49,9 +47,8 @@ class _WoltModalSheetMainContentState extends State<WoltModalSheetMainContent> {
defaultThemeData.heroImageHeight);
final pageHasTopBarLayer =
page.hasTopBarLayer ?? themeData?.hasTopBarLayer ?? defaultThemeData.hasTopBarLayer;
final navBarHeight = page.navBarHeight ??
themeData?.navBarHeight ??
defaultThemeData.navBarHeight;
final navBarHeight =
page.navBarHeight ?? themeData?.navBarHeight ?? defaultThemeData.navBarHeight;
final topBarHeight =
pageHasTopBarLayer || page.leadingNavBarWidget != null || page.trailingNavBarWidget != null
? navBarHeight
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:wolt_modal_sheet/src/modal_page/wolt_modal_sheet_page.dart';
import 'package:wolt_modal_sheet/src/theme/wolt_modal_sheet_default_theme_data.dart';
import 'package:wolt_modal_sheet/src/utils/wolt_layout_transformation_utils.dart';
import 'package:wolt_modal_sheet/wolt_modal_sheet.dart';
Expand All @@ -26,9 +25,8 @@ class WoltModalSheetTopBarTitleFlow extends StatelessWidget {
Widget build(BuildContext context) {
final themeData = Theme.of(context).extension<WoltModalSheetThemeData>();
final defaultThemeData = WoltModalSheetDefaultThemeData(context);
final topBarHeight = page.navBarHeight ??
themeData?.navBarHeight ??
defaultThemeData.navBarHeight;
final topBarHeight =
page.navBarHeight ?? themeData?.navBarHeight ?? defaultThemeData.navBarHeight;
final heroImageHeight = page.heroImage == null
? 0.0
: (page.heroImageHeight ?? themeData?.heroImageHeight ?? defaultThemeData.heroImageHeight);
Expand Down Expand Up @@ -71,9 +69,8 @@ class _TopBarTitleFlowDelegate extends FlowDelegate {
WoltModalSheetTopBarTitleFlow._topBarTitleTranslationYAmount;
const topBarTitleTranslationYEnd = topBarTitleTranslationYStart + topBarTitleTranslationYAmount;

final topBarTitleTranslationYAndOpacityStartPoint = heroImageHeight == 0
? 8
: heroImageHeight - topBarHeight;
final topBarTitleTranslationYAndOpacityStartPoint =
heroImageHeight == 0 ? 8 : heroImageHeight - topBarHeight;

/// Top Bar Title translation Y
final topBarTitleTranslationY = WoltLayoutTransformationUtils.calculateTransformationValue(
Expand Down