You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
106 lines
3.4 KiB
Dart
106 lines
3.4 KiB
Dart
import 'package:car_provider_app/classes/colors.dart';
|
|
import 'package:car_provider_app/extensions/int_extensions.dart';
|
|
import 'package:car_provider_app/extensions/string_extensions.dart';
|
|
import 'package:car_provider_app/extensions/widget_extensions.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
class AdWidget extends StatelessWidget {
|
|
const AdWidget({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Column(
|
|
children: [
|
|
showAd(),
|
|
12.height,
|
|
showAd(),
|
|
],
|
|
);
|
|
}
|
|
|
|
Widget showAd() {
|
|
return Row(
|
|
children: [
|
|
Image.asset(
|
|
"assets/images/bn_car.jpeg",
|
|
width: 80,
|
|
height: 80,
|
|
fit: BoxFit.cover,
|
|
),
|
|
12.width,
|
|
Expanded(
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Expanded(
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
children: [
|
|
"Toyota Crolla".toText(fontSize: 16, isBold: true),
|
|
Row(
|
|
children: [
|
|
"Model:".toText10(
|
|
color: MyColors.lightTextColor,
|
|
),
|
|
2.width,
|
|
"2019".toText10(),
|
|
],
|
|
),
|
|
Row(
|
|
children: [
|
|
"Mileage:".toText10(
|
|
color: MyColors.lightTextColor,
|
|
),
|
|
2.width,
|
|
"73,000 km".toText10(),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
),
|
|
Column(
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
children: [
|
|
"Riyadh".toText10(
|
|
color: MyColors.lightTextColor,
|
|
),
|
|
"9 Hours Ago".toText10(
|
|
color: MyColors.lightTextColor,
|
|
),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
8.height,
|
|
Row(
|
|
children: [
|
|
Expanded(
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
children: [
|
|
"30,000".toText(fontSize: 16, isBold: true),
|
|
2.width,
|
|
"SAR:".toText10(
|
|
color: MyColors.lightTextColor,
|
|
),
|
|
],
|
|
),
|
|
),
|
|
const Icon(Icons.arrow_forward)
|
|
],
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
).toWhiteContainer(width: double.infinity, padding: 12);
|
|
}
|
|
}
|