Skip to content

Commit

Permalink
fix: Solve wallet fails to download profile #2852
Browse files Browse the repository at this point in the history
  • Loading branch information
bibash28 committed Aug 26, 2024
1 parent 7c2aee2 commit 37b62cf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/app/shared/widget/wallet_logo.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class WalletLogo extends StatelessWidget {

final generalOptions = profileModel.profileSetting.generalOptions;
image = isLightTheme
? generalOptions.companyLogoLight
? generalOptions.companyLogoLight ?? generalOptions.companyLogo
: generalOptions.companyLogo;

case ProfileType.diipv2point1:
Expand Down
2 changes: 1 addition & 1 deletion lib/dashboard/profile/cubit/profile_cubit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ class ProfileCubit extends Cubit<ProfileState> {

///company Logo Light
if (isURL(companyLogoLight)) {
if (companyLogoLight != null && isURL(companyLogoLight)) {
try {
final http.Response response =
await http.get(Uri.parse(companyLogoLight));
Expand Down
5 changes: 2 additions & 3 deletions lib/dashboard/profile/models/profile_setting.dart
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,6 @@ class GeneralOptions extends Equatable {
required this.companyName,
required this.companyWebsite,
required this.companyLogo,
required this.companyLogoLight,
required this.tagLine,
this.splashScreenTitle,
required this.profileName,
Expand All @@ -357,6 +356,7 @@ class GeneralOptions extends Equatable {
required this.profileId,
required this.customerPlan,
this.primaryColor,
this.companyLogoLight,
});

factory GeneralOptions.fromJson(Map<String, dynamic> json) =>
Expand All @@ -367,7 +367,6 @@ class GeneralOptions extends Equatable {
companyName: '',
companyWebsite: '',
companyLogo: '',
companyLogoLight: '',
tagLine: '',
splashScreenTitle: '',
profileName: '',
Expand All @@ -382,7 +381,7 @@ class GeneralOptions extends Equatable {
final String companyName;
final String companyWebsite;
final String companyLogo;
final String companyLogoLight;
final String? companyLogoLight;
final String tagLine;
final String? splashScreenTitle;
final String profileName;
Expand Down

0 comments on commit 37b62cf

Please sign in to comment.