-
Notifications
You must be signed in to change notification settings - Fork 173
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
Add PlatformSliverAppBar class with example #427
Conversation
//! 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); | ||
} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Could you rebase. Sorry for the time it has taken to review |
There was a problem hiding this 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
The conflicts have been resolved without rebase. How do you think about this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.LGTM
Inspired by PR #425.