fix padding
This commit is contained in:
parent
14ec487bbe
commit
a5ddce3d08
1 changed files with 39 additions and 29 deletions
|
|
@ -303,37 +303,47 @@ class RoomChat extends HookConsumerWidget {
|
|||
child: Stack(
|
||||
children: [
|
||||
Positioned.fill(
|
||||
child: switch (ref.watch(controllerProvider)) {
|
||||
AsyncData(:final value) ||
|
||||
AsyncLoading(:final value?) => SuperListView.builder(
|
||||
controller: scrollController,
|
||||
listController: listController.value,
|
||||
itemCount: value.length,
|
||||
itemBuilder: (_, index) => MessageWrapper(
|
||||
value[index],
|
||||
EventText(
|
||||
value[index],
|
||||
onTapReply: () => listController.value.animateToItem(
|
||||
index: index,
|
||||
scrollController: scrollController,
|
||||
alignment: 0.5,
|
||||
duration: (_) => Duration(milliseconds: 250),
|
||||
curve: (_) => Curves.easeInOut,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 8),
|
||||
child: switch (ref.watch(controllerProvider)) {
|
||||
AsyncData(:final value) ||
|
||||
AsyncLoading(:final value?) => CustomScrollView(
|
||||
controller: scrollController,
|
||||
slivers: [
|
||||
SuperSliverList.builder(
|
||||
listController: listController.value,
|
||||
itemCount: value.length,
|
||||
itemBuilder: (_, index) => MessageWrapper(
|
||||
value[index],
|
||||
EventText(
|
||||
value[index],
|
||||
onTapReply: () =>
|
||||
listController.value.animateToItem(
|
||||
index: index,
|
||||
scrollController: scrollController,
|
||||
alignment: 0.5,
|
||||
duration: (_) =>
|
||||
Duration(milliseconds: 250),
|
||||
curve: (_) => Curves.easeInOut,
|
||||
),
|
||||
getEventOptions: getEventOptions,
|
||||
),
|
||||
// TODO: Reimplement grouping
|
||||
isGrouped: false,
|
||||
// TODO: Reimplement flashing
|
||||
isFlashing: false,
|
||||
),
|
||||
),
|
||||
getEventOptions: getEventOptions,
|
||||
),
|
||||
// TODO: Reimplement grouping
|
||||
isGrouped: false,
|
||||
// TODO: Reimplement flashing
|
||||
isFlashing: false,
|
||||
SliverPadding(
|
||||
padding: EdgeInsetsGeometry.only(bottom: 64),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
AsyncLoading() => Loading(),
|
||||
AsyncError(:final error, :final stackTrace) => ErrorDialog(
|
||||
error,
|
||||
stackTrace,
|
||||
),
|
||||
},
|
||||
AsyncLoading() => Loading(),
|
||||
AsyncError(:final error, :final stackTrace) =>
|
||||
ErrorDialog(error, stackTrace),
|
||||
},
|
||||
),
|
||||
),
|
||||
ChatBox(
|
||||
node: composerNode,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue