Skip to content

Commit 9b7418f

Browse files
committed
msglist [nfs]: More whitespace and formatting changes for ScrollToBottomButton
1 parent 82a2ece commit 9b7418f

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

lib/widgets/message_list.dart

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,9 @@ class _MessageListState extends State<MessageList> {
195195
Positioned(
196196
bottom: 0,
197197
right: 0,
198-
child: ScrollToBottomButton(scrollController: scrollController, visibleValue: _scrollToBottomVisibleValue),
199-
),
200-
]
201-
),
202-
))))));
198+
child: ScrollToBottomButton(
199+
scrollController: scrollController,
200+
visibleValue: _scrollToBottomVisibleValue))])))))));
203201
}
204202

205203
Widget _buildListView(context) {
@@ -243,23 +241,26 @@ class ScrollToBottomButton extends StatelessWidget {
243241
// Calculate time necessary if we're capping speed at 8pixels/ms (== 8000pixels/s)
244242
final speedLimit = (distance / 8).ceil();
245243
final int durationMs = max(300, speedLimit);
246-
scrollController.animateTo(0, duration: Duration(milliseconds: durationMs), curve: Curves.easeIn);
244+
scrollController.animateTo(
245+
0,
246+
duration: Duration(milliseconds: durationMs),
247+
curve: Curves.easeIn);
247248
}
248249

249250
@override
250251
Widget build(BuildContext context) {
251252
return ValueListenableBuilder<bool>(
252-
builder: (BuildContext context, bool value, Widget? child) {
253-
return (value && child != null) ? child : const SizedBox.shrink();
254-
},
255-
valueListenable: visibleValue,
256-
// TODO: fix hardcoded values for size and style here
257-
child: IconButton(
258-
tooltip: "Scroll to bottom",
259-
icon: const Icon(Icons.expand_circle_down_rounded),
260-
iconSize: 40,
261-
color: const HSLColor.fromAHSL(0.5,240,0.96,0.68).toColor(),
262-
onPressed: () => _navigateToBottom(context)));
253+
builder: (BuildContext context, bool value, Widget? child) {
254+
return (value && child != null) ? child : const SizedBox.shrink();
255+
},
256+
valueListenable: visibleValue,
257+
// TODO: fix hardcoded values for size and style here
258+
child: IconButton(
259+
tooltip: "Scroll to bottom",
260+
icon: const Icon(Icons.expand_circle_down_rounded),
261+
iconSize: 40,
262+
color: const HSLColor.fromAHSL(0.5,240,0.96,0.68).toColor(),
263+
onPressed: () => _navigateToBottom(context)));
263264
}
264265
}
265266

0 commit comments

Comments
 (0)