mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-04-20 22:13:48 +00:00
formats all dart files using `dart format .` from the root project dir this makes the code style repeatable by new contributors and makes PR review easier
26 lines
773 B
Dart
26 lines
773 B
Dart
import 'package:flutter/material.dart';
|
|
import '../helpers/chat_scroll_controller.dart';
|
|
|
|
class JumpToBottomButton extends StatelessWidget {
|
|
final ChatScrollController scrollController;
|
|
|
|
const JumpToBottomButton({super.key, required this.scrollController});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return ValueListenableBuilder<bool>(
|
|
valueListenable: scrollController.showJumpToBottom,
|
|
builder: (context, show, _) {
|
|
if (!show) return const SizedBox.shrink();
|
|
return Positioned(
|
|
right: 16,
|
|
bottom: 16,
|
|
child: FloatingActionButton.small(
|
|
onPressed: scrollController.jumpToBottom,
|
|
child: const Icon(Icons.keyboard_arrow_down),
|
|
),
|
|
);
|
|
},
|
|
);
|
|
}
|
|
}
|