Skip to content

Commit

Permalink
Flut 152/handle logourl error (#1636)
Browse files Browse the repository at this point in the history
* Added error builder in case logo url returns error

* Lint fixes
  • Loading branch information
Decoder07 authored Nov 8, 2023
1 parent 70c459b commit f6b91fa
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
///Dart imports
import 'dart:developer';
import 'dart:io';

import 'package:flutter/material.dart';
Expand Down Expand Up @@ -44,6 +45,13 @@ class HLSViewerHeader extends StatelessWidget {
HMSRoomLayout.roleLayoutData!.logo!.url!)
: Image.network(
HMSRoomLayout.roleLayoutData!.logo!.url!,
errorBuilder: (context, exception, _) {
log('Error is $exception');
return const SizedBox(
width: 30,
height: 30,
);
},
height: 30,
width: 30,
),
Expand Down
8 changes: 8 additions & 0 deletions packages/hms_room_kit/lib/src/meeting/meeting_header.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
///Dart imports
import 'dart:developer';
import 'dart:io';

///Package imports
Expand Down Expand Up @@ -60,6 +61,13 @@ class _MeetingHeaderState extends State<MeetingHeader> {
)
: Image.network(
HMSRoomLayout.roleLayoutData!.logo!.url!,
errorBuilder: (context, exception, _) {
log('Error is $exception');
return const SizedBox(
width: 30,
height: 30,
);
},
height: 30,
width: 30,
),
Expand Down
8 changes: 8 additions & 0 deletions packages/hms_room_kit/lib/src/preview/preview_header.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
///dart imports
import 'dart:developer';
import 'dart:io';

///Package imports
Expand Down Expand Up @@ -69,6 +70,13 @@ class PreviewHeader extends StatelessWidget {
)
: Image.network(
HMSRoomLayout.roleLayoutData!.logo!.url!,
errorBuilder: (context, exception, _) {
log('Error is $exception');
return const SizedBox(
width: 30,
height: 30,
);
},
height: 30,
width: 30,
),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
///Dart imports
import 'dart:developer';

///Package imports
import 'package:flutter/cupertino.dart';
import 'package:flutter_svg/flutter_svg.dart';
Expand Down Expand Up @@ -37,6 +40,13 @@ class _PreviewForRoleHeaderState extends State<PreviewForRoleHeader> {
HMSRoomLayout.roleLayoutData!.logo!.url!)
: Image.network(
HMSRoomLayout.roleLayoutData!.logo!.url!,
errorBuilder: (context, exception, _) {
log('Error is $exception');
return const SizedBox(
width: 30,
height: 30,
);
},
height: 30,
width: 30,
),
Expand Down

0 comments on commit f6b91fa

Please sign in to comment.