init method

Future<void> init()

Implementation

Future<void> init() async {
  try {
    final packageInfo = await PackageInfo.fromPlatform();
    _appName = packageInfo.appName;
    _packageName = packageInfo.packageName;
    _version = packageInfo.version;
    _buildNumber = packageInfo.buildNumber;
  } catch (e) {
    logger.e('PackageInfoUtil initialize error: $e');
  }
}