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
ChatsList don't like listview behavior #25
Comments
There is nothing wrong with reporting a bug. On the contrary, reporting a bug leads to a better library! Using the example app, replace this to test your problem (juste copy paste the whole thing into the files): chat_viewmodel.dart
chats_screen.dart
Here is the result: As you can see, the last item is displayed fully above the |
@themadmrj thanks for your detailed analysis. I shall test your code first.
I am using a custom bottom navbar, which from this lib: https://github.com/rickywen911/custom_bubble_navigation_bar
It's true, for blurred effect, needs stacked way so that content can viewed on the behind of navbar. But problems is, the last item, can not jump above the navbar and stucked at the very bottom. |
@themadmrj Oh, I just realise the difference: THe exmple provided, it doesn't have any content behind navbar. so it shouldn't have my problem. My problem mainly is content is fullscreen, and the last item can not jump above navbar. I paste some code hope it's not too messy: Scaffold(
extendBody: true,
// backgroundColor: Colors.red,
// backgroundColor: Colors.transparent,
backgroundColor: Theme.of(context).dialogBackgroundColor,
appBar: PreferredSize(
preferredSize: const Size(double.infinity, kToolbarHeight),
child: getNavBar(_homeBloc, _chatBloc)),
bottomNavigationBar: CustomNavigationBar(
// iconSize: 30.0,
selectedColor: COLOR_PRIMARY_APP,
strokeColor: COLOR_PRIMARY_APP.withAlpha(70),
bubbleCurve: Curves.bounceInOut,
unSelectedColor: Colors.grey[600],
backgroundColor: Theme.of(context).dialogBackgroundColor,
borderRadius: Radius.circular(16.0),
blurEffect: true,
opacity: 0.7,
items: [
CustomNavigationBarItem(
icon: Icon(FluentIcons.chat_24_filled),
),
CustomNavigationBarItem(
icon: Icon(
FluentIcons.contact_card_24_filled,
),
),
CustomNavigationBarItem(
icon: Icon(
FluentIcons.lightbulb_24_filled,
),
),
],
currentIndex: _currentIndex,
onTap: (index) {
HapticFeedback.lightImpact();
_homeBloc.setIndex(index);
print('crtIndex;;;;; $index');
setState(() {
_currentIndex = index;
});
},
isFloating: true,
),
// bottomNavigationBar: BottomNavigationBar(
// // iconSize: 30.0,
// // selectedColor: COLOR_PRIMARY_APP,
// // strokeColor: Colors.red,
// // unSelectedColor: Colors.grey[600],
// backgroundColor: Colors.white,
// // borderRadius: Radius.circular(16.0),
// // blurEffect: true,
// // opacity: 0.6,
// items: [
// BottomNavigationBarItem(
// icon: Icon(FluentIcons.chat_24_filled), label: "aaa"),
// BottomNavigationBarItem(
// icon: Icon(
// FluentIcons.contact_card_24_filled,
// ),
// label: "aaa"),
// BottomNavigationBarItem(
// icon: Icon(
// FluentIcons.lightbulb_24_filled,
// ),
// label: "aaa"),
// ],
// currentIndex: _currentIndex,
// onTap: (index) {
// setState(() {
// _currentIndex = index;
// });
// },
// isFloating: true,
// ),
body: contactsPage); Here is using And contactsPage with: @override
Widget build(BuildContext context) {
ContactBloc contactBloc = new ContactBloc();
HomeBloc homeBloc = BlocProvider.of(context);
homeBloc.setIndex(1);
return StreamBuilder(
stream: contactBloc.contactsStream,
builder: (context, snapshot) {
if (snapshot.hasData) {
List<Contact> cs = snapshot.data;
return ListView.builder(
itemCount: cs.length,
itemBuilder: (context, i) {
return Column(children: <Widget>[
_buildContactRow(cs[i]),
Divider(
indent: 32, height: 1, color: Colors.grey.withAlpha(20))
]);
});
} else {
return SpinKitFadingCircle(
color: COLOR_PRIMARY_APP,
);
}
});
}
contactsPage only is a ListView. It can solve with last item. But same main page scafffold, using ChatsLists, there will blind the last item. |
Indeed, it is as you say, the last item will not move above the navbar. Sadly I cannot help you with this specific usecase. As you can see, |
thanks, I have posted an issue to that lib: https://github.com/bnxm/implicitly_animated_reorderable_list/issues/77 |
this is normal ListView:
this is ChatsList
Hi, I am not here report a bug or problem of this package. On the opposite using this lib I managed to build a useful chat App.
But I found a slightly bias behavior might not notice by you. As you can see, when the List scroll to the bottom, ChatsList can not handle with the bottomBar, while ListView can handle, on the other words, ListView the last item will not blind by the navigationBar, this can be notice easily if your bottomBar blurred.
Is there a way to replace ChatsList with ListView while also preserve all other features? I really don't know why they behavior such bias
The text was updated successfully, but these errors were encountered: