mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-22 08:22:16 +03:00
Prefer single quotes (as per Flutter style guide).
This commit is contained in:
parent
dd6a3e84c8
commit
9817220256
4
.github/workflows/linux.yml
vendored
4
.github/workflows/linux.yml
vendored
@ -29,7 +29,9 @@ jobs:
|
||||
- run: flutter --version
|
||||
|
||||
- name: Run tests
|
||||
run: flutter test
|
||||
run: |
|
||||
flutter test
|
||||
flutter analyze
|
||||
|
||||
- name: Install ykman
|
||||
run: ./build-ykman.sh
|
||||
|
4
.github/workflows/macos.yml
vendored
4
.github/workflows/macos.yml
vendored
@ -29,7 +29,9 @@ jobs:
|
||||
- run: flutter --version
|
||||
|
||||
- name: Run tests
|
||||
run: flutter test
|
||||
run: |
|
||||
flutter test
|
||||
flutter analyze
|
||||
|
||||
- name: Install ykman
|
||||
run: ./build-ykman.sh
|
||||
|
4
.github/workflows/windows.yml
vendored
4
.github/workflows/windows.yml
vendored
@ -28,7 +28,9 @@ jobs:
|
||||
- run: flutter --version
|
||||
|
||||
- name: Run tests
|
||||
run: flutter test
|
||||
run: |
|
||||
flutter test
|
||||
flutter analyze
|
||||
|
||||
- name: Install ykman
|
||||
run: .\build-ykman.bat
|
||||
|
@ -23,7 +23,7 @@ linter:
|
||||
# producing the lint.
|
||||
rules:
|
||||
# avoid_print: false # Uncomment to disable the `avoid_print` rule
|
||||
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
|
||||
prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
|
||||
|
||||
# Additional information about this file can be found at
|
||||
# https://dart.dev/guides/language/analysis-options
|
||||
|
@ -16,7 +16,7 @@ class Version with _$Version {
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return "$major.$minor.$patch";
|
||||
return '$major.$minor.$patch';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -15,9 +15,9 @@ class Signaler {
|
||||
void cancel() {
|
||||
final sendSignal = _sendSignal;
|
||||
if (sendSignal == null) {
|
||||
throw Exception("Signaler not attached to any request!");
|
||||
throw Exception('Signaler not attached to any request!');
|
||||
}
|
||||
sendSignal("cancel");
|
||||
sendSignal('cancel');
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,10 +31,10 @@ class _Request {
|
||||
_Request(this.action, this.target, this.body, this.signal);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"kind": "command",
|
||||
"action": action,
|
||||
"target": target,
|
||||
"body": body,
|
||||
'kind': 'command',
|
||||
'action': action,
|
||||
'target': target,
|
||||
'body': body,
|
||||
};
|
||||
}
|
||||
|
||||
@ -52,12 +52,12 @@ class RpcSession {
|
||||
.cast<Map<String, dynamic>>()
|
||||
.listen(null) {
|
||||
stderr.addStream(_process.stderr);
|
||||
developer.log("Launched ykman subprocess...", name: "rpc");
|
||||
developer.log('Launched ykman subprocess...', name: 'rpc');
|
||||
}
|
||||
|
||||
static Future<RpcSession> launch(String executable) async {
|
||||
var process =
|
||||
await Process.start(executable, [], environment: {"_YKMAN_RPC": "1"});
|
||||
await Process.start(executable, [], environment: {'_YKMAN_RPC': '1'});
|
||||
return RpcSession(process);
|
||||
}
|
||||
|
||||
@ -77,7 +77,7 @@ class RpcSession {
|
||||
request.signal?._sendSignal = _sendSignal;
|
||||
|
||||
responses.onData((data) {
|
||||
developer.log("RECV", name: "rpc", error: jsonEncode(data));
|
||||
developer.log('RECV', name: 'rpc', error: jsonEncode(data));
|
||||
try {
|
||||
final response = RpcResponse.fromJson(data);
|
||||
if (response.map(
|
||||
@ -101,8 +101,8 @@ class RpcSession {
|
||||
pump();
|
||||
}
|
||||
} catch (e) {
|
||||
developer.log("Invalid RPC message",
|
||||
name: "rpc", error: jsonEncode(e));
|
||||
developer.log('Invalid RPC message',
|
||||
name: 'rpc', error: jsonEncode(e));
|
||||
}
|
||||
});
|
||||
|
||||
@ -111,11 +111,11 @@ class RpcSession {
|
||||
}
|
||||
|
||||
void _sendSignal(String status) {
|
||||
_send({"kind": "signal", "status": status});
|
||||
_send({'kind': 'signal', 'status': status});
|
||||
}
|
||||
|
||||
void _send(Map data) {
|
||||
developer.log("SEND", name: "rpc", error: jsonEncode(data));
|
||||
developer.log('SEND', name: 'rpc', error: jsonEncode(data));
|
||||
_process.stdin.writeln(jsonEncode(data));
|
||||
_process.stdin.flush();
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ class RpcNodeSession {
|
||||
signal: signal,
|
||||
);
|
||||
} on RpcError catch (e) {
|
||||
if (e.status == "state-reset") {
|
||||
if (e.status == 'state-reset') {
|
||||
_reset();
|
||||
}
|
||||
rethrow;
|
||||
|
Loading…
Reference in New Issue
Block a user