Skip to content

Commit 924e9ed

Browse files
authored
Update analytics.dart (#78)
1 parent 58d9147 commit 924e9ed

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkgs/unified_analytics/lib/src/analytics.dart

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import 'package:file/file.dart';
88
import 'package:file/local.dart';
99
import 'package:file/memory.dart';
1010
import 'package:http/http.dart';
11+
import 'package:intl/date_symbol_data_local.dart';
1112
import 'package:meta/meta.dart';
1213
import 'package:path/path.dart' as p;
1314

@@ -291,6 +292,10 @@ class AnalyticsImpl implements Analytics {
291292
required gaClient,
292293
bool pddFlag = false,
293294
}) : _gaClient = gaClient {
295+
// Initialize date formatting for `package:intl` within constructor
296+
// so clients using this package won't need to
297+
initializeDateFormatting();
298+
294299
// This initializer class will let the instance know
295300
// if it was the first run; if it is, nothing will be sent
296301
// on the first run

0 commit comments

Comments
 (0)