refactored broad range of the application, split files, modularized calendar and file views, centralized bottom sheets and clipboard handling, and implemented unit test coverage

This commit is contained in:
2026-05-08 19:05:16 +02:00
parent 3b1b0d0c19
commit c62a14645a
68 changed files with 4633 additions and 3141 deletions
@@ -0,0 +1,44 @@
import 'package:flutter/material.dart';
import '../../../../api/marianumcloud/talk/get_poll/get_poll_state.dart';
import '../../../../widget/loading_spinner.dart';
import 'poll_options_list.dart';
/// Opens the poll dialog that lets a user vote on a Talk poll attached to
/// a message. Loads the poll state lazily and renders the option list.
void showChatBubblePollDialog(
BuildContext context, {
required String chatToken,
required String messageToken,
required int pollId,
required String pollName,
}) {
final pollState = GetPollState(token: messageToken, pollId: pollId).run();
showDialog<void>(
context: context,
builder: (dialogCtx) => AlertDialog(
title: Text(pollName, overflow: TextOverflow.ellipsis),
content: FutureBuilder(
future: pollState,
builder: (_, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
return const Column(mainAxisSize: MainAxisSize.min, children: [LoadingSpinner()]);
}
final pollData = snapshot.data!.data;
return SingleChildScrollView(
child: PollOptionsList(
pollData: pollData,
chatToken: chatToken,
),
);
},
),
actions: [
TextButton(
onPressed: () => Navigator.of(dialogCtx).pop(),
child: const Text('Zurück'),
),
],
),
);
}