From f8c64b3662aec188e5c4b19e3c6d55ea0e9ccdcc Mon Sep 17 00:00:00 2001 From: dreautall <109872040+dreautall@users.noreply.github.com> Date: Sat, 23 Nov 2024 14:08:20 +0000 Subject: [PATCH] initialize date formatting to fix potential startup bugs --- lib/main.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/main.dart b/lib/main.dart index eeb5cd6d..30ebe3c4 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -2,6 +2,7 @@ import 'dart:developer' as developer; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +import 'package:intl/date_symbol_data_local.dart'; import 'package:intl/intl.dart'; import 'package:intl/intl_standalone.dart'; import 'package:logging/logging.dart'; @@ -11,7 +12,6 @@ import 'package:timezone/data/latest.dart' as tz; import 'package:waterflyiii/app.dart'; void main() async { - Intl.defaultLocale = await findSystemLocale(); Logger.root.level = kDebugMode ? Level.ALL : Level.INFO; Logger.root.onRecord.listen((LogRecord record) { developer.log( @@ -26,5 +26,7 @@ void main() async { ); }); tz.initializeTimeZones(); + Intl.defaultLocale = await findSystemLocale(); + await initializeDateFormatting(); return runApp(const WaterflyApp()); }