add initial project files for Flutter app with platform-specific configs and basic routing setup

This commit is contained in:
ImBenji
2026-02-26 16:20:54 +00:00
parent 2dd10c4b43
commit d460f0369e
135 changed files with 6524 additions and 0 deletions

View File

@@ -0,0 +1,127 @@
import 'package:flutter/material.dart';
import 'package:shadcn_flutter/shadcn_flutter.dart' as shadcn;
const List<BoxShadow> _hudShadow = [
BoxShadow(
color: Color(0x26000000),
blurRadius: 4,
spreadRadius: 2,
),
];
class MapToolbar extends StatelessWidget {
const MapToolbar({
required this.isAddPointArmed,
required this.pointCount,
required this.onAddPointPressed,
required this.onUndoPressed,
required this.onClearPressed,
super.key,
});
final bool isAddPointArmed;
final int pointCount;
final VoidCallback onAddPointPressed;
final VoidCallback onUndoPressed;
final VoidCallback onClearPressed;
@override
Widget build(BuildContext context) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
shadcn.OutlinedContainer(
boxShadow: _hudShadow,
child: SizedBox(
width: 56,
height: 56,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: const [
shadcn.Icon(shadcn.LucideIcons.menu, size: 16),
SizedBox(height: 2),
Text('Menu', style: TextStyle(fontSize: 10)),
],
),
),
),
const SizedBox(height: 8),
shadcn.OutlinedContainer(
boxShadow: _hudShadow,
child: Column(
children: [
_ToolButton(
icon: shadcn.LucideIcons.plus,
label: 'Add',
selected: isAddPointArmed,
onTap: onAddPointPressed,
),
_ToolButton(
icon: shadcn.LucideIcons.undo2,
label: 'Undo',
onTap: onUndoPressed,
),
_ToolButton(
icon: shadcn.LucideIcons.trash2,
label: 'Clear',
onTap: onClearPressed,
),
],
),
),
const SizedBox(height: 8),
shadcn.OutlinedContainer(
boxShadow: _hudShadow,
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 8),
child: Text('$pointCount pts', style: const TextStyle(fontSize: 11)),
),
],
);
}
}
class _ToolButton extends StatelessWidget {
const _ToolButton({
required this.icon,
required this.label,
required this.onTap,
this.selected = false,
});
final IconData icon;
final String label;
final VoidCallback onTap;
final bool selected;
@override
Widget build(BuildContext context) {
final bg = selected ? const Color(0xFFFF4D79) : Colors.transparent;
final fg = selected ? Colors.white : const Color(0xFF111827);
return Material(
color: bg,
child: InkWell(
onTap: onTap,
child: SizedBox(
width: 56,
height: 56,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
shadcn.Icon(icon, size: 16, color: fg),
const SizedBox(height: 2),
Text(
label,
style: TextStyle(
fontSize: 10,
color: fg,
fontWeight: selected ? FontWeight.w700 : FontWeight.w500,
),
),
],
),
),
),
);
}
}