Skip to content

Commit

Permalink
Talao logo #2744
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkbee1 committed Jun 27, 2024
1 parent de2af8c commit 7a57196
Showing 1 changed file with 17 additions and 55 deletions.
72 changes: 17 additions & 55 deletions lib/app/shared/widget/wallet_logo.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,66 +43,28 @@ class WalletLogo extends StatelessWidget {
return Column(
children: [
Center(
child: profileModel.profileType != ProfileType.enterprise
? ColorFiltered(
colorFilter: ColorFilter.mode(
Theme.of(context).colorScheme.primaryContainer,
BlendMode.srcIn,
),
child: Logo(
child: SizedBox(
width: width,
height: height,
child: profileModel.profileType == ProfileType.enterprise
? CachedImageFromNetwork(
image,
fit: BoxFit.contain,
width: width,
bgColor: Colors.transparent,
height: height,
errorMessage: '',
showLoading: false,
)
: Image.asset(
image,
fit: BoxFit.contain,
width: width,
height: height,
profileModel: profileModel,
image: image,
),
)
: Logo(
width: width,
height: height,
profileModel: profileModel,
image: image,
),
),
),
],
);
}
}

class Logo extends StatelessWidget {
const Logo({
super.key,
required this.width,
required this.height,
required this.profileModel,
required this.image,
});

final double? width;
final double? height;
final ProfileModel profileModel;
final String image;

@override
Widget build(BuildContext context) {
return SizedBox(
width: width,
height: height,
child: profileModel.profileType == ProfileType.enterprise
? CachedImageFromNetwork(
image,
fit: BoxFit.contain,
width: width,
bgColor: Colors.transparent,
height: height,
errorMessage: '',
showLoading: false,
)
: Image.asset(
image,
fit: BoxFit.contain,
width: width,
height: height,
),
);
}
}

0 comments on commit 7a57196

Please sign in to comment.