mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-06-15 07:04:26 +10:00
51d6210920
- Introduced `mesh_ui.dart` with reusable widgets including SectionHeader, MeshCard, StatusChip, StatTile, AvatarCircle, SignalBars, RouteChip, PulseDot, BottomSheetHeader, ErrorRetryCard, and ListEntrance. - Implemented `path_map_ui.dart` for path map screens, featuring path distance calculations, playback controls, and a summary list of observed paths. - Created `themed_map_tile_layer.dart` for shared cached map tiles with automatic dark-mode treatment.
57 lines
1.7 KiB
Dart
57 lines
1.7 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import '../helpers/chat_scroll_controller.dart';
|
|
import '../theme/mesh_theme.dart';
|
|
|
|
class JumpToBottomButton extends StatelessWidget {
|
|
final ChatScrollController scrollController;
|
|
|
|
const JumpToBottomButton({super.key, required this.scrollController});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final scheme = Theme.of(context).colorScheme;
|
|
return ValueListenableBuilder<bool>(
|
|
valueListenable: scrollController.showJumpToBottom,
|
|
builder: (context, show, _) {
|
|
if (!show) return const SizedBox.shrink();
|
|
return Positioned(
|
|
right: 16,
|
|
bottom: 16,
|
|
child: Material(
|
|
color: Colors.transparent,
|
|
child: InkWell(
|
|
onTap: scrollController.jumpToBottom,
|
|
borderRadius: BorderRadius.circular(MeshRadii.pill),
|
|
child: Container(
|
|
width: 40,
|
|
height: 40,
|
|
decoration: BoxDecoration(
|
|
shape: BoxShape.circle,
|
|
color: scheme.surfaceContainerHigh.withValues(alpha: 0.92),
|
|
border: Border.all(
|
|
color: scheme.outlineVariant,
|
|
width: 1,
|
|
),
|
|
boxShadow: [
|
|
BoxShadow(
|
|
color: Colors.black.withValues(alpha: 0.18),
|
|
blurRadius: 8,
|
|
offset: const Offset(0, 2),
|
|
),
|
|
],
|
|
),
|
|
child: Icon(
|
|
Icons.keyboard_arrow_down,
|
|
size: 22,
|
|
color: scheme.primary,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
},
|
|
);
|
|
}
|
|
}
|