Skip to content

Commit

Permalink
📝 Chore: Try to match pub.dev scores requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
Dynesshely committed Apr 16, 2024
1 parent 22d8067 commit 39a94ab
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ abstract class DeviceInfo implements Built<DeviceInfo, DeviceInfoBuilder> {
}

static DeviceInfo? fromString(String jsonString) {
DeviceInfo? result = serializers.deserializeWith(DeviceInfo.serializer, json.decode(jsonString));
DeviceInfo? result = serializers.deserializeWith(
DeviceInfo.serializer,
json.decode(jsonString),
);
return result;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import '../serializers.dart';

part 'device_locator.g.dart';

abstract class DeviceLocator implements Built<DeviceLocator, DeviceLocatorBuilder> {
abstract class DeviceLocator
implements Built<DeviceLocator, DeviceLocatorBuilder> {
@BuiltValueField(wireName: 'DeviceName')
String get deviceName;

Expand All @@ -21,23 +22,28 @@ abstract class DeviceLocator implements Built<DeviceLocator, DeviceLocatorBuilde
String get macAddress;

DeviceLocator._();
factory DeviceLocator([void Function(DeviceLocatorBuilder) updates]) = _$DeviceLocator;
factory DeviceLocator([void Function(DeviceLocatorBuilder) updates]) =
_$DeviceLocator;

Object? toJson() {
return serializers.serializeWith(DeviceLocator.serializer, this);
}

@override
String toString() {
return json.encode(serializers.serializeWith(DeviceLocator.serializer, this));
return json
.encode(serializers.serializeWith(DeviceLocator.serializer, this));
}

static DeviceLocator? fromJson(Map<String, dynamic> json) {
return serializers.deserializeWith(DeviceLocator.serializer, json);
}

static DeviceLocator? fromString(String jsonString) {
return serializers.deserializeWith(DeviceLocator.serializer, json.decode(jsonString));
return serializers.deserializeWith(
DeviceLocator.serializer,
json.decode(jsonString),
);
}

static Serializer<DeviceLocator> get serializer => _$deviceLocatorSerializer;
Expand Down
12 changes: 6 additions & 6 deletions KitX Shared/KitX.Shared.Dart/kitx_shared_dart/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: kitx_shared_dart
description: A port of KitX.Shared in dart
version: 3.24.10+6873
repository: https://github.com/Crequency/KitX-Standard/KitX.Shared.Dart/
description: A port of `KitX.Shared` in dart, which is a set of data model classes and utilities for KitX network.
version: 3.24.10+6889
repository: https://github.com/Crequency/KitX-Standard/tree/main/KitX%20Shared/KitX.Shared.Dart/kitx_shared_dart

environment:
sdk: ^3.3.0

dependencies:
built_collection: ^5.1.1
built_value: ^8.9.1
built_value: ^8.9.2

dev_dependencies:
lints: ^3.0.0
test: ^1.24.0
test: ^1.25.3
# Run `dart run build_runner build` to generate `.g.dart` files.
# You can also execute `build_runner.ps1` with pwsh to run the command.
build_runner: ^2.4.9
built_value_generator: ^8.9.1
built_value_generator: ^8.9.2
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def calculateLatestVersionBuildNumber():

def updateVersion():
ver = calculateLatestVersionBuildNumber()
pattern = re.compile(r"^version: \d+.\d+.\d+\+\d+(-[a-zA-Z0-9-]+)$")
pattern = re.compile(r"^version: \d+\.\d+\.\d+\+\d+(-[a-zA-Z0-9-]+)?$")
temp_lines = []

with open(file_pubspec, "r") as file:
Expand Down

0 comments on commit 39a94ab

Please sign in to comment.