chore(llc, core, ui): bump dio to ^5.2.0.

Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
Sahil Kumar
2023-06-06 15:17:06 +05:30
committed by xsahil03x
parent c307ee86f9
commit 7ef9dea72b
14 changed files with 85 additions and 77 deletions
@@ -430,16 +430,15 @@ class StreamChannelState extends State<StreamChannel> {
],
builder: (context, snapshot) {
if (snapshot.hasError) {
var message = snapshot.error.toString();
if (snapshot.error is DioError) {
final dioError = snapshot.error as DioError?;
if (dioError?.type == DioErrorType.badResponse) {
message = dioError!.message ?? 'Bad response';
} else {
message = 'Check your connection and retry';
final error = snapshot.error;
if (error is DioException) {
if (error.type == DioExceptionType.badResponse) {
return Center(child: Text(error.message ?? 'Bad response'));
}
return const Center(child: Text('Check your connection and retry'));
}
return Center(child: Text(message));
return Center(child: Text(error.toString()));
}
final dataLoaded = snapshot.data?.every((it) => it) == true;
@@ -91,8 +91,8 @@ void main() {
);
const errorMessage = 'Error! Error! Error!';
final error = DioError(
type: DioErrorType.badResponse,
final error = DioException(
type: DioExceptionType.badResponse,
message: errorMessage,
requestOptions: RequestOptions(),
);