Skip to content

Commit

Permalink
initialize date formatting to fix potential startup bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
dreautall committed Nov 23, 2024
1 parent 8d6c3aa commit f8c64b3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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(
Expand All @@ -26,5 +26,7 @@ void main() async {
);
});
tz.initializeTimeZones();
Intl.defaultLocale = await findSystemLocale();
await initializeDateFormatting();
return runApp(const WaterflyApp());
}

0 comments on commit f8c64b3

Please sign in to comment.