-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
Not working with CustomScrollView #14
Comments
Hi @czaku, not a bug, just not implemented yet. |
Thanks, anything that you are planning to release anytime soon? Asking for a friend :P |
Honestly, I tried implementing it before but didn't manage to finish it, I need some kind of help and more free time :D |
Thanks, I don’t think I am good enough in Dart and Flutter yet, but might give it a try!
Thanks,
Lukasz Czak
Mobile: +44 7895547572
…On 26 Apr 2022, 09:37 +0100, Tornike ***@***.***>, wrote:
> Thanks, anything that you are planning to release anytime soon? Asking for a friend :P
Honestly, I tried implementing it before but didn't manage to finish it, I need some kind of help and more free time :D
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Trying to implement App Store like dismiss feature that has a full page scrollview. This is the ONLY library that achieves something close. This scrollview dismiss feature is holding it back. Hope you get to finish it 🥺 |
Hang on guys, almost there wfe.mov |
@Tkko this looks just BEAUTIFUL :) |
@Tkko hi, sorry if I am bothering :/ |
I have to test it for a few days, but before that you can test the behavior by depending on the feature_branch or on the demo website (on the mobile or in the desktop with developers options opened) Few thing no to handle from my side, depending on the
|
@Tkko the video you posted 7 days ago in the above comments show no artifacts. Was that using |
Sadly, It was |
Looks like the modal_bottom_sheet has same behavior |
I made Stretchy_headers.movDismissiblePage(
direction: DismissiblePageDismissDirection.down,
onDismissed: RoutesService.to.doBack,
child: StretchyHeader.listView(
headerData: HeaderData(
blurContent: false,
headerHeight: Get.width / NibRatioDimension.squareLike.value,
header: Hero(
tag: space?.id,
child: _SpaceCoverImage(
space: controller.space!,
height: Get.width / NibRatioDimension.squareLike.value,
),
),
),
children: [ /* children below image */ ],
),
),
),
); |
Guys, It's finally merged, checkout it on pub, and tell me if anything goes wrong. Version 1.0.0 |
@Tkko thank you very much. |
@aytunch Correct, seems like multi directional drag doesn't work well on Web desktop.
If anyone can test the behavior on Windows and Linux, it would be much appreciated ❤️ |
Do you have any ideas on how to avoid scrolling during dismissal animation? |
Hey @Rogue85 I'm not sure how to fix it. |
I was able to achieve this with SnapshotWidget. It's not the best solution, but I haven't found another one. |
@Rogue85 Maybe check out https://pub.dev/packages/flutter_top_blocked_bouncing_scroll_physics, it basically prevents over-scrolling on top while applying the typical bouncing physics on bottom. @Tkko: My question is actually the other way around. Is there any way to prevent the DismissiblePage to fire while still scrolling? The behaviour that I'm currently experiencing is that when scrolling down and then up again (mid scroll), DismissiblePage tends to start the dismissing animation although the scroll view has not yet returned to its initial offset. See here: Screen.Recording.2023-06-20.at.17.53.51.movIn the video I let go of the pointer, but it also occurs when keeping the finger/mouse on the screen, i.e. one fluid up then down. Here's the code from the video above: import 'package:dismissible_page/dismissible_page.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: MyHomePage(),
);
}
}
class MyHomePage extends StatelessWidget {
const MyHomePage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("My App"),
),
body: Center(
child: ElevatedButton(
child: Text("Open"),
onPressed: () => context.pushTransparentRoute(
DismissiblePage(
direction: DismissiblePageDismissDirection.down,
child: Scaffold(
body: CustomScrollView(
physics: BouncingScrollPhysics(),
slivers: [
SliverAppBar(
title: Text("Scrollable dismissible page"),
),
SliverList.builder(
itemCount: 30,
itemBuilder: (context, index) => ListTile(
title: Text("Item $index"),
),
)
],
),
),
onDismissed: Navigator.of(context).pop,
),
),
),
),
);
}
} It might be related to the Is there any way to ensure that the dismissible page only starts dismissing when the scroll view is actually at the top? I've already tried attaching listeners to the scroll controller of the scroll view which based on the current offset disables the dismissible page through a local state variable. However, that didn't seem to work well and felt very clunky. |
Hey @astubenbord, what happens in the video is that when you scroll up, over scroll event is fired which calls |
@astubenbord Can you depend on master branch and verify if the issue is fixed?
|
Wow, that was quick, thanks! Will test and report back on thursday if that's fine with you? |
@Tkko First of all sorry for the late reply. The above problem does not occur anymore, thanks a lot! However, when starting the dismissal and then scrolling back up, the page stays in that "dismiss state" instead of first scrolling the whole page back up again before scrolling the inner page content. See below: Screen.Recording.2023-06-26.at.09.19.49.mov |
Doesn't work when on top of a page that has a CustomScrollView and some slivers inside (SliverList) etc. Only dismisses sideways. If there is no scrollable content in CustomScrollView then works also in vertical. Any tips on how to approach view structure or is it a bug?
The text was updated successfully, but these errors were encountered: