fix analyzer warning

This commit is contained in:
Hiroshi Horie
2021-10-02 15:36:34 +09:00
parent 791ece2265
commit ec4909d68b
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -32,8 +32,9 @@ class LiveKitTheme {
foregroundColor: MaterialStateProperty.all<Color>(Colors.white),
// backgroundColor: MaterialStateProperty.all<Color>(accentColor),
backgroundColor: MaterialStateProperty.resolveWith((states) {
if (states.contains(MaterialState.disabled))
if (states.contains(MaterialState.disabled)) {
return accentColor.withOpacity(0.5);
}
return accentColor;
}),
),
+2 -1
View File
@@ -76,8 +76,9 @@ class SignalClient extends Disposable with EventsEmittable<SignalEvent> {
// Attempt Validation
try {
final validateResponse = await http.get(validateUri);
if (validateResponse.statusCode != 200)
if (validateResponse.statusCode != 200) {
throw ConnectException(validateResponse.body);
}
throw ConnectException();
} catch (error) {
// Pass it up if it's already a `ConnectError`