autoFillVersionInternal function

Future<void> autoFillVersionInternal()

Automatically detects application version and uses it if version was not previously set

Implementation

Future<void> autoFillVersionInternal() async {
  if (_applicationVersion != '') {
    return;
  }

  try {
    PackageInfo packageInfo = await PackageInfo.fromPlatform();
    _applicationVersion = packageInfo.version;
  } catch (ex) {
    // Ignore exception here
  }
}