Files
frosty/lib/widgets/scroll_to_top_button.dart
Tommy Chow f68de827cd Refresh themes and styling (#394)
* consolidate themes

* update and tweak styles, add border styling

* add borders between video and chat

* tweak heights

* improve reply threads
- taller new design
- can now tap parent's reply
- fix crash when tapping self

* tweak border colors

* tweak theme

* tweak theme

* tweak theme

* add accent color picker in settings

* overhaul colors and styles

* remove print

* add divider to chat user modal and revert height

* increase deleted message opacity

* revert highlight color

* tweak color

* tweak colors

* tweak padding

* tweak padding

* tweak placeholder color

* revert input fill color

* use error color
2024-09-06 21:43:27 -07:00

33 lines
920 B
Dart

import 'package:flutter/material.dart';
class ScrollToTopButton extends StatelessWidget {
final ScrollController scrollController;
const ScrollToTopButton({super.key, required this.scrollController});
@override
Widget build(BuildContext context) {
return SafeArea(
child: Padding(
padding: const EdgeInsets.only(bottom: 8),
child: Tooltip(
message: 'Scroll to top',
preferBelow: false,
child: ElevatedButton(
onPressed: () => scrollController.animateTo(
0.0,
curve: Curves.easeOut,
duration: const Duration(milliseconds: 500),
),
style: ElevatedButton.styleFrom(
shape: const CircleBorder(),
padding: const EdgeInsets.all(12),
),
child: const Icon(Icons.arrow_upward_rounded),
),
),
),
);
}
}