the ads got more acceptable
This commit is contained in:
parent
aa10f0672e
commit
63fd37c31f
@ -41,7 +41,7 @@ List<DateWidget> getWidgets(List<Ad> providerAds, BuildContext context) {
|
|||||||
for (var ad in providerAds) {
|
for (var ad in providerAds) {
|
||||||
if (ad.date.isBefore(DateTime.now()) &&
|
if (ad.date.isBefore(DateTime.now()) &&
|
||||||
ad.expireDate.isAfter(DateTime.now()) &&
|
ad.expireDate.isAfter(DateTime.now()) &&
|
||||||
DateTime.now().hour.isEven) {
|
DateTime.now().hour.isOdd) {
|
||||||
if (!hasPlus || ad.overridePremium) {
|
if (!hasPlus || ad.overridePremium) {
|
||||||
providerAds.sort((a, b) => -a.date.compareTo(b.date));
|
providerAds.sort((a, b) => -a.date.compareTo(b.date));
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@ class AdTile extends StatelessWidget {
|
|||||||
Text(
|
Text(
|
||||||
ad.description,
|
ad.description,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
fontSize: 14.5,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
color: AppColors.of(context).text.withOpacity(0.7),
|
color: AppColors.of(context).text.withOpacity(0.7),
|
||||||
),
|
),
|
||||||
@ -40,6 +41,8 @@ class AdTile extends StatelessWidget {
|
|||||||
? ClipRRect(
|
? ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(50.0),
|
borderRadius: BorderRadius.circular(50.0),
|
||||||
child: Image.network(
|
child: Image.network(
|
||||||
|
width: 45.0,
|
||||||
|
height: 45.0,
|
||||||
ad.logoUrl.toString(),
|
ad.logoUrl.toString(),
|
||||||
errorBuilder: (context, error, stackTrace) {
|
errorBuilder: (context, error, stackTrace) {
|
||||||
ad.logoUrl = null;
|
ad.logoUrl = null;
|
||||||
@ -48,8 +51,12 @@ class AdTile extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
: null,
|
: null,
|
||||||
trailing:
|
trailing: showExternalIcon
|
||||||
showExternalIcon ? const Icon(FeatherIcons.externalLink) : null,
|
? const Icon(
|
||||||
|
FeatherIcons.externalLink,
|
||||||
|
size: 20.0,
|
||||||
|
)
|
||||||
|
: null,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user