Files
GroundedHelper/frontend/lib/main.dart
alvocool 4b71257429 Add groups with shared goals, objectives and chat; drop the water tracker
Groups let people keep each other honest: create one or join with a
six-letter invite code. Each group has shared goals split into measurable
objectives (km, sessions, words) that every member logs toward, a
leaderboard of kept rate and streak with nudges, and a group chat where
check-ins and nudges appear as cards beside the talk. The open chat polls
for new messages.

Reached from a new Groups tab (Training moves into the day rail), a Home
"Your groups" rail that opens the chat, and a Group tile in the add sheet.
Mock mode seeds two groups, a joinable one and members who reply.

The water tracker is removed; it did not fit the app. Bottom sheets are
now square app-wide via the theme.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KhQh614DMeYoQEH9SoMRUw
2026-11-03 11:46:41 +03:00

63 lines
1.9 KiB
Dart

import 'package:flutter/material.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'Grounded/about/internal/application/TextType.dart';
import 'Grounded/configs/NotificationServiceConfig.dart';
import 'Grounded/designs/Component.dart';
import 'Grounded/see/splash/Splash.dart';
import 'Grounded/utils/Colors.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await dotenv.load(fileName: ".env");
// Channels are created up front so a full-screen alarm can fire the first
// time a non-negotiable window closes, not the second.
await LocalNotificationEngine.init();
runApp(const GroundedApp());
}
class GroundedApp extends StatelessWidget {
const GroundedApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Grounded',
debugShowCheckedModeBanner: false,
theme: ThemeData(
disabledColor: colorGrey,
scaffoldBackgroundColor: colorPrimaryLight,
dividerColor: colorDivider,
colorScheme: ColorScheme.fromSwatch(
primarySwatch: createMaterialColor(colorPrimaryDark),
).copyWith(error: colorNegative),
dialogTheme: DialogThemeData(
backgroundColor: colorWhite,
elevation: 0,
contentTextStyle: TextStyle(
color: colorGrey2,
fontFamily: getTextType(TextType.Regular),
fontSize: 13,
),
titleTextStyle: TextStyle(
color: colorPrimaryDark,
fontFamily: getTextType(TextType.Bold),
fontSize: 17,
),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.zero,
),
),
// Material 3 rounds sheet tops by default; the app is square.
bottomSheetTheme: const BottomSheetThemeData(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.zero),
),
),
home: const Splash(),
);
}
}