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

#128 implement guide detail view #147

Merged
merged 8 commits into from
Aug 8, 2024

Conversation

mikolaj-jalocha
Copy link
Member

Screen Preview:

screen.mp4

Screenshots:

Screenshot 1 Screenshot 2

Loading Preview:

loading.webm

Notes:

When implementing the expansion tile, I took advantage of Flutter's built-in widget ExpansionTile. It resembles Figma's design nearly 100%, except the show less/more icon button is bigger in the mockup than in reality.

Customizing ExpansionTile to have our own version of the icon requires slightly more coding since we need to configure the animation ourselves. I found one possible solution here. Please tell me what you think. ;)

Figma's ExpansionTile

Figma ExpansionTile

Current ExpansionTile

Current ExpansionTile

@mikolaj-jalocha mikolaj-jalocha added the enhancement New feature or request label Aug 8, 2024
@mikolaj-jalocha mikolaj-jalocha linked an issue Aug 8, 2024 that may be closed by this pull request
textStyle: context.textTheme.body.copyWith(fontSize: 16),
),
),
ListView.separated(
Copy link
Member

Choose a reason for hiding this comment

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

oh damn. ListView inside a ListView and it works. Crazy but very good job :)

Copy link
Member Author

Choose a reason for hiding this comment

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

That's because Stack Overflow and those 2 magic lines:

shrinkWrap: true,
physics: const ClampingScrollPhysics(),

Copy link
Member

Choose a reason for hiding this comment

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

Yeah I know but still crazy

@@ -95,6 +96,10 @@ class AppRouter extends _$AppRouter {
path: "aboutUs",
page: AboutUsRoute.page,
),
AutoRoute(
path: "guide-detail/:id",
Copy link
Member

Choose a reason for hiding this comment

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

i would change to just "guide/:id" - what you think?

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree - follows convention!


// TODO(mikolaj-jalocha): add method parameter to navigate to guide detail.
Future<void> navigateGuideDetail() async {
await _router.push(GuideDetailRoute(id: "1"));
Copy link
Member

Choose a reason for hiding this comment

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

I guess i would already include this here as parameter and placed "1" in placeholder's invocation (in GestureDetector placeholder tile) . But it's obviously not that important, but we'll have one less place to change.

Copy link
Member Author

Choose a reason for hiding this comment

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

Very good idea!

Copy link
Member

@simon-the-shark simon-the-shark left a comment

Choose a reason for hiding this comment

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

Really elegant code. Almost none remarks from my side. I'm proud :P Good job

@mikolaj-jalocha mikolaj-jalocha merged commit 381f7a7 into main Aug 8, 2024
2 checks passed
@mikolaj-jalocha mikolaj-jalocha deleted the feat/128-implement-guide-detail-view branch August 8, 2024 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

feat/ Implement guide detail view
2 participants