jld3103
1 year ago
5 changed files with 20 additions and 12 deletions
@ -0,0 +1,15 @@
|
||||
import 'package:meta/meta.dart'; |
||||
import 'package:package_info_plus/package_info_plus.dart'; |
||||
|
||||
late String? _userAgent; |
||||
|
||||
void buildUserAgent(final PackageInfo packageInfo) { |
||||
var buildNumber = packageInfo.buildNumber; |
||||
if (buildNumber.isEmpty) { |
||||
buildNumber = '1'; |
||||
} |
||||
_userAgent = 'Neon ${packageInfo.version}+$buildNumber'; |
||||
} |
||||
|
||||
@internal |
||||
String get neonUserAgent => _userAgent!; |
Loading…
Reference in new issue