Compare commits

..

2 commits

Author SHA1 Message Date
f0415a22da added default locale 2023-06-27 00:48:14 +02:00
496a1f2857 changed Readme 2023-06-26 18:05:46 +02:00
3 changed files with 4 additions and 2 deletions

View file

@ -19,6 +19,7 @@ samples, guidance on mobile development, and a full API reference.
- Einstellungen - Einstellungen
- darkmode - darkmode
- Secure Storage: https://pub.dev/packages/flutter_secure_storage
- Einkauf - Einkauf
- Finance - Finance
- Einkaufskorb editieren - Einkaufskorb editieren

View file

@ -10,6 +10,7 @@ class Finance extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
initializeDateFormatting('de_DE'); initializeDateFormatting('de_DE');
Intl.defaultLocale = 'de_DE';
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
@ -67,7 +68,7 @@ class Finance extends StatelessWidget {
Text getSubtitle(Transaction transaction) { Text getSubtitle(Transaction transaction) {
String text = '${transaction.amount / 100}'; String text = '${transaction.amount / 100}';
text += ''; text += '';
text += DateFormat("EEEE, dd. MMMM yyyy HH:mm", 'de_DE') text += DateFormat("EEEE, dd. MMMM yyyy HH:mm")
.format(transaction.date); .format(transaction.date);
if (transaction.description != null) { if (transaction.description != null) {
(text += '\n${transaction.description}'); (text += '\n${transaction.description}');

View file

@ -10,7 +10,7 @@ class Settings extends StatelessWidget {
ListTile( ListTile(
leading: Icon(Icons.dark_mode), leading: Icon(Icons.dark_mode),
title: Text( title: Text(
'Hier könnten Einstellungen zu Darkmode mit shared_preferences und riverpod sein', 'Hier könnten Einstellungen zu Darkmode sein',
maxLines: 2, maxLines: 2,
), ),
) )