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

Add PlatformSliverAppBar class with example #427

Merged
merged 2 commits into from
Jan 31, 2024

Conversation

bookshiyi
Copy link
Contributor

Inspired by PR #425.

Comment on lines +261 to +297
//! Copied from file: /opt/homebrew/Caskroom/flutter/3.10.0/flutter/packages/flutter/lib/src/cupertino/nav_bar.dart
const Color _kDefaultNavBarBorderColor = Color(0x4D000000);

const Border _kDefaultNavBarBorder = Border(
bottom: BorderSide(
color: _kDefaultNavBarBorderColor,
width: 0.0, // 0.0 means one physical pixel
),
);

const _HeroTag _defaultHeroTag = _HeroTag(null);

@immutable
class _HeroTag {
const _HeroTag(this.navigator);

final NavigatorState? navigator;

// Let the Hero tag be described in tree dumps.
@override
String toString() =>
'Default Hero tag for Cupertino navigation bars with navigator $navigator';

@override
bool operator ==(Object other) {
if (identical(this, other)) {
return true;
}
if (other.runtimeType != runtimeType) {
return false;
}
return other is _HeroTag && other.navigator == navigator;
}

@override
int get hashCode => identityHashCode(navigator);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding these local variables, I didn't find a better solution, so I had to copy and paste them here intact.

Copy link
Collaborator

@aqwert aqwert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@aqwert
Copy link
Collaborator

aqwert commented Jan 24, 2024

Could you rebase. Sorry for the time it has taken to review

Copy link
Collaborator

@aqwert aqwert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you rebase please and resolve the conflicts

@bookshiyi
Copy link
Contributor Author

bookshiyi commented Jan 24, 2024

Can you rebase please and resolve the conflicts

The conflicts have been resolved without rebase. How do you think about this?

@bookshiyi bookshiyi requested a review from aqwert January 25, 2024 07:42
Copy link
Collaborator

@aqwert aqwert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.LGTM

@aqwert aqwert merged commit a18063d into stryder-dev:master Jan 31, 2024
@bookshiyi bookshiyi deleted the #425-PlatformSliverAppBar branch January 31, 2024 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants