-
-
Notifications
You must be signed in to change notification settings - Fork 180
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
Version 0.6.2 can not response events when widget in the header, such as Inkwell、Button etc. #75
Comments
I have the same problem |
back to 0.6.1 |
me too |
I'm getting this is too |
I was getting this error in 0.6.2, |
same issue |
1 similar comment
same issue |
|
It should be fixed in version 0.6.3, can you try? |
2 day researched this issue, and finally find the reason |
This issue still exists when the sticky header is in a snapped state. It becomes impossible to click on anything rendered with the header. Thanks for amazing library! |
@amsayk have you a complete example I could run? I didn't reproduced what you described |
@letsar Here is a It works if you comment out the import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter_sticky_header/flutter_sticky_header.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return const CupertinoApp(
debugShowCheckedModeBanner: false,
title: 'Flutter Demo',
home: Scaffold(
body: MyHomePage(title: 'Flutter Demo Home Page'),
),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key, required this.title}) : super(key: key);
// This widget is the home page of your application. It is stateful, meaning
// that it has a State object (defined below) that contains fields that affect
// how it looks.
// This class is the configuration for the state. It holds the values (in this
// case the title) provided by the parent (in this case the App widget) and
// used by the build method of the State. Fields in a Widget subclass are
// always marked "final".
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return CupertinoPageScaffold(
child: CustomScrollView(
primary: true,
physics: const AlwaysScrollableScrollPhysics(parent: ClampingScrollPhysics()),
slivers: [
CupertinoSliverNavigationBar(
key: const ValueKey('NavBar'),
previousPageTitle: 'Back',
border: Border(
bottom: BorderSide(
color: Theme.of(context).dividerColor,
width: 1.0, // 0.0 means one physical pixel
),
),
stretch: true,
largeTitle: const Text('Details'),
),
SliverStickyHeader.builder(
builder: (context, state) => ListTile(
tileColor: Colors.grey,
shape: RoundedRectangleBorder(side: const BorderSide(color: Colors.black, width: 1), borderRadius: BorderRadius.circular(0)),
leading: const CircleAvatar(),
title: const Text('Title 1'),
trailing: MouseRegion(
cursor: SystemMouseCursors.click,
child: GestureDetector(
child: Icon(
Icons.settings,
size: 28.0,
color: Theme.of(context).primaryColor,
),
onTapDown: (details) => print('onTapDown: $details'),
),
),
),
sliver: SliverList(
delegate: SliverChildListDelegate(
List.generate(
10,
(index) => Container(
child: SizedBox(
height: 250.0,
child: Center(child: Text('Element $index')),
),
),
),
),
),
),
SliverStickyHeader.builder(
builder: (context, state) => ListTile(
tileColor: Colors.grey,
shape: RoundedRectangleBorder(side: const BorderSide(color: Colors.black, width: 1), borderRadius: BorderRadius.circular(0)),
leading: const CircleAvatar(),
title: const Text('Title 2'),
trailing: MouseRegion(
cursor: SystemMouseCursors.click,
child: GestureDetector(
child: Icon(
Icons.settings,
size: 28.0,
color: Theme.of(context).primaryColor,
),
onTapDown: (details) => print('onTapDown: $details'),
),
),
),
sliver: SliverList(
delegate: SliverChildListDelegate(
List.generate(
10,
(index) => Container(
child: SizedBox(
height: 250.0,
child: Center(child: Text('Element $index')),
),
),
),
),
),
),
SliverStickyHeader.builder(
builder: (context, state) => ListTile(
tileColor: Colors.grey,
shape: RoundedRectangleBorder(side: const BorderSide(color: Colors.black, width: 1), borderRadius: BorderRadius.circular(0)),
leading: const CircleAvatar(),
title: const Text('Title 3'),
trailing: MouseRegion(
cursor: SystemMouseCursors.click,
child: GestureDetector(
child: Icon(
Icons.settings,
size: 28.0,
color: Theme.of(context).primaryColor,
),
onTapDown: (details) => print('onTapDown: $details'),
),
),
),
sliver: SliverList(
delegate: SliverChildListDelegate(
List.generate(
10,
(index) => Container(
child: SizedBox(
height: 250.0,
child: Center(child: Text('Element $index')),
),
),
),
),
),
),
],
),
);
}
}
Hope it helps! |
Experiencing the same issue with versions above 0.6.1. |
I faced the same issue. |
It was happening with me on |
You can duplicate the issue by running the code as below.
The text was updated successfully, but these errors were encountered: