Browse Source

neon: Fix user agent in debug builds

pull/148/head
jld3103 2 years ago
parent
commit
66df471243
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 8
      packages/neon/lib/src/models/account.dart

8
packages/neon/lib/src/models/account.dart

@ -7,7 +7,13 @@ import 'package:package_info_plus/package_info_plus.dart';
part 'account.g.dart'; part 'account.g.dart';
String userAgent(final PackageInfo packageInfo) => 'Neon ${packageInfo.version}+${packageInfo.buildNumber}'; String userAgent(final PackageInfo packageInfo) {
var buildNumber = packageInfo.buildNumber;
if (buildNumber == '') {
buildNumber = '1';
}
return 'Neon ${packageInfo.version}+$buildNumber';
}
@JsonSerializable() @JsonSerializable()
class Account { class Account {

Loading…
Cancel
Save