From c1e032208cd79d6d28d01b2963ef8f70b89e786d Mon Sep 17 00:00:00 2001 From: mathiskirchner Date: Sun, 16 Nov 2025 19:39:48 +0100 Subject: [PATCH] added icons, titles and changed font size --- .../widgets/top_centered_message.dart | 28 +++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/lib/presentation/widgets/top_centered_message.dart b/lib/presentation/widgets/top_centered_message.dart index df8dcb1..af317d8 100644 --- a/lib/presentation/widgets/top_centered_message.dart +++ b/lib/presentation/widgets/top_centered_message.dart @@ -1,9 +1,16 @@ import 'package:flutter/material.dart'; class TopCenteredMessage extends StatelessWidget { - const TopCenteredMessage({super.key, required this.message}); + const TopCenteredMessage({ + super.key, + required this.icon, + required this.title, + required this.message, + }); + final String title; final String message; + final IconData icon; @override Widget build(BuildContext context) { @@ -11,10 +18,21 @@ class TopCenteredMessage extends StatelessWidget { padding: const EdgeInsets.only(top: 100), margin: const EdgeInsets.symmetric(horizontal: 10), alignment: Alignment.topCenter, - child: Text( - message, - style: const TextStyle(fontSize: 20), - textAlign: TextAlign.center, + child: Column( + children: [ + Icon(icon, size: 45), + SizedBox(height: 10), + Text( + title, + style: const TextStyle(fontSize: 18, fontWeight: FontWeight.bold), + textAlign: TextAlign.center, + ), + Text( + message, + style: const TextStyle(fontSize: 16), + textAlign: TextAlign.center, + ), + ], ), ); }