File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -314,7 +314,7 @@ class _UserWidget extends StatelessWidget {
314314 }
315315}
316316
317- @visibleForTesting
317+ /// The text of current time in [user] 's timezone.
318318class UserLocalTimeText extends StatelessWidget {
319319 const UserLocalTimeText ({
320320 super .key,
@@ -323,6 +323,11 @@ class UserLocalTimeText extends StatelessWidget {
323323
324324 final User user;
325325
326+ /// Initialize the timezone database used to know time difference from a timezone string.
327+ ///
328+ /// Usually, database initialization is done using `initializeTimeZones` , but it takes >100ms and not asynchronous.
329+ /// So, we initialize database from the assets file copied from timezone library.
330+ /// This file is checked up-to-date in `test/widgets/profile_test.dart` .
326331 static Future <void > initializeTimezonesUsingAssets () async {
327332 final blob = Uint8List .sublistView (await rootBundle.load ('assets/timezone/latest_all.tzf' ));
328333 tz.initializeDatabase (blob);
You can’t perform that action at this time.
0 commit comments