From 46d1c25bb56d0ebcfdd72e6d0fe8c6bbe7529aef Mon Sep 17 00:00:00 2001 From: mathiskirchner Date: Sun, 23 Nov 2025 19:41:57 +0100 Subject: [PATCH] create GameResultView with basic structure and styling --- .../views/main_menu/game_result_view.dart | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 lib/presentation/views/main_menu/game_result_view.dart diff --git a/lib/presentation/views/main_menu/game_result_view.dart b/lib/presentation/views/main_menu/game_result_view.dart new file mode 100644 index 0000000..d953b0f --- /dev/null +++ b/lib/presentation/views/main_menu/game_result_view.dart @@ -0,0 +1,57 @@ +import 'package:flutter/material.dart'; +import 'package:game_tracker/core/custom_theme.dart'; +import 'package:game_tracker/presentation/widgets/buttons/custom_width_button.dart'; + +class GameResultView extends StatefulWidget { + const GameResultView({super.key}); + + //TODO: Handle given game + + @override + State createState() => _GameResultViewState(); +} + +class _GameResultViewState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: CustomTheme.backgroundColor, + appBar: AppBar( + backgroundColor: CustomTheme.backgroundColor, + scrolledUnderElevation: 0, + title: const Text( + 'Game Result', + style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold), + ), + centerTitle: true, + ), + body: SafeArea( + child: Container( + margin: const EdgeInsets.symmetric(horizontal: 12, vertical: 10), + padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 10), + decoration: BoxDecoration( + color: CustomTheme.boxColor, + border: Border.all(color: CustomTheme.boxBorder), + borderRadius: BorderRadius.circular(12), + ), + child: const Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + "Select Winner", + style: const TextStyle( + fontSize: 18, + fontWeight: FontWeight.bold, + ), + ), + //TODO: Add FutureBuilder + //TODO: Implement ListView.builder with RadioListTiles and Players from Game + //TODO Implement Save button with snackbar to confirm save/show error + CustomWidthButton(text: "Save", sizeRelativeToWidth: 0.95), + ], + ), + ), + ), + ); + } +}