forked from firka/student-legacy
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) {
|
||||
if (ad.date.isBefore(DateTime.now()) &&
|
||||
ad.expireDate.isAfter(DateTime.now()) &&
|
||||
DateTime.now().hour.isEven) {
|
||||
DateTime.now().hour.isOdd) {
|
||||
if (!hasPlus || ad.overridePremium) {
|
||||
providerAds.sort((a, b) => -a.date.compareTo(b.date));
|
||||
|
||||
|
@ -30,6 +30,7 @@ class AdTile extends StatelessWidget {
|
||||
Text(
|
||||
ad.description,
|
||||
style: TextStyle(
|
||||
fontSize: 14.5,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColors.of(context).text.withOpacity(0.7),
|
||||
),
|
||||
@ -40,6 +41,8 @@ class AdTile extends StatelessWidget {
|
||||
? ClipRRect(
|
||||
borderRadius: BorderRadius.circular(50.0),
|
||||
child: Image.network(
|
||||
width: 45.0,
|
||||
height: 45.0,
|
||||
ad.logoUrl.toString(),
|
||||
errorBuilder: (context, error, stackTrace) {
|
||||
ad.logoUrl = null;
|
||||
@ -48,8 +51,12 @@ class AdTile extends StatelessWidget {
|
||||
),
|
||||
)
|
||||
: null,
|
||||
trailing:
|
||||
showExternalIcon ? const Icon(FeatherIcons.externalLink) : null,
|
||||
trailing: showExternalIcon
|
||||
? const Icon(
|
||||
FeatherIcons.externalLink,
|
||||
size: 20.0,
|
||||
)
|
||||
: null,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user