Comments (9)
This issue still exists, please reopen.
from flutter_sticky_headers.
@slightfoot is it possible to reopen this issue? Many thanks.
from flutter_sticky_headers.
@FlutterCommunityBot any solution for this issue?
from flutter_sticky_headers.
still waiting for the solution.. because i have the same issue..
from flutter_sticky_headers.
I can reproduce when entering to other page then go back. I believe it's same root cause.
from flutter_sticky_headers.
Can't replicate the issue on Flutter v3.0.0 and sticky_headers 0.3.0. Please retest and if it's still a problem provide example so we can resolve it.
from flutter_sticky_headers.
Hi, I'm currently experiencing the same issue mentioned above.
Currently on Flutter v3.3.6 and sticky_headers 0.3.0+2.
Here is the full code:
import 'package:flutter/material.dart';
import 'package:sticky_headers/sticky_headers.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(
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
final firstList = ['Hello', 'What is up?', 'You alright?'];
final secondList = ['Bye', 'Adios'];
final thirdList = ['Apple', 'Banana', 'Cherry', 'Durian', 'Figs'];
@override
Widget build(BuildContext context) {
final combinedList = [firstList, secondList, thirdList];
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Column(
children: [
Expanded(
child: Center(
child: CustomScrollView(
reverse: true,
slivers: <Widget>[
SliverList(
delegate: SliverChildBuilderDelegate((context, index) {
return reversedMessageList(combinedList[index]);
}, childCount: combinedList.length)),
],
),
),
),
TextField(
style: Theme.of(context).textTheme.bodyText1,
keyboardType: TextInputType.multiline,
maxLines: 10,
minLines: 1,
textCapitalization: TextCapitalization.sentences,
decoration: const InputDecoration(
labelText: 'Message',
),
),
],
),
floatingActionButton: FloatingActionButton(
onPressed: () {},
child: const Icon(Icons.add),
),
);
}
Widget reversedMessageList(List<String> messages) {
//All messages sharing the same date, where date is displayed as StickyHeader
return StickyHeader(
overlapHeaders: false,
content: Column(
children: <Widget>[
for (int i = 0; i < messages.length; i++)
Container(
decoration: const BoxDecoration(
color: Color(0xD9B2924A),
borderRadius: BorderRadius.all(Radius.circular(20))),
child: Padding(
padding: const EdgeInsets.all(20),
child: Text(messages[i])))
],
),
header: Padding(
padding: const EdgeInsets.all(5),
child: Center(
child: Container(
decoration: const BoxDecoration(
color: Color(0xD9590E98),
borderRadius: BorderRadius.all(Radius.circular(20))),
child: Padding(
padding: const EdgeInsets.all(8),
child: Text('Number of messages ${messages.length}'))))),
);
}
}
22-11-15-22-32-52.mp4
from flutter_sticky_headers.
still exist
from flutter_sticky_headers.
A solution that works for me is to add WidgetsBindingObserver
mixin to the widget encapsulating the list view, add it as an observer to WidgetsBinding.instance
and implement didChangeMetrics
as follows:
@override
void didChangeMetrics() {
super.didChangeMetrics();
setState(() {});
}
hope this helps
from flutter_sticky_headers.
Related Issues (20)
- A ScrollPositionWithSingleContext was used after being disposed. HOT 2
- dependency doesn't support null safety HOT 4
- version 0.1.8+1 App crash flash back HOT 1
- Not working with ScrollablePositionedList HOT 1
- Is there a way that below headers is hide and only the active top header is visible?
- Not working with android api 31 HOT 1
- Plugin can't run with Flutter 3.0.0 HOT 1
- gridview line header HOT 3
- Rect argument contained a NaN value HOT 1
- [BUG] StickyHeader not working inside a CustomScrollView HOT 3
- Listview Subheaders
- [BUG] Jumpy header inside CustomScrollView with center key HOT 9
- Nested StickyHeaders
- This issue still exist in 0.3.0+2 -> Headers don't get stick to top after disappearing keyboard. #44
- How to update the state once the header sticks to the top?
- [BUG] Wrong layout when header height is more than content.
- Sticky headers not working after application is resumed - but only if dark theme is configured HOT 1
- Error with Flutter 3.13.1 - Does not build HOT 1
- Privacy manifest file for iOS is missing
- One pixel gap(glitch) between sticky header and app bar while scrolling HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_sticky_headers.