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