app/lib/components/bannerimage.dart

64 lines
2.2 KiB
Dart
Raw Normal View History

2022-05-15 16:51:11 +02:00
import 'package:flutter/material.dart';
class Bannerimage extends StatelessWidget {
const Bannerimage({
Key? key,
}) : super(key: key);
@override
Widget build(BuildContext context) {
2022-05-15 18:52:34 +02:00
return ClipRRect(
2022-05-16 02:42:29 +02:00
borderRadius: const BorderRadius.all(Radius.circular(5.0)),
2022-05-15 18:52:34 +02:00
child: Stack(
children: [
Container(
2022-05-16 02:42:29 +02:00
padding: const EdgeInsets.all(0.0),
child: Image.asset(
2022-05-16 02:58:54 +02:00
'assets/images/slider_1.webp',
2022-05-15 18:52:34 +02:00
width: 600.0,
height: 180.0,
fit: BoxFit.fill,
)),
Padding(
2022-05-16 02:42:29 +02:00
padding: const EdgeInsets.only(top: 25.0, left: 10.0),
2022-05-15 18:52:34 +02:00
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
2022-05-16 02:42:29 +02:00
const Text(
2022-05-15 18:52:34 +02:00
'SPRING / SUMMER COLLECTION 2022',
style: TextStyle(
color: Colors.black,
fontSize: 10.5,
fontWeight: FontWeight.bold),
),
2022-05-16 02:42:29 +02:00
const SizedBox(
2022-05-15 18:52:34 +02:00
height: 8.0,
),
2022-05-16 02:42:29 +02:00
const Text(
2022-05-15 18:52:34 +02:00
'Get up to 30% off \nNow Arrivals',
style: TextStyle(
color: Colors.black,
fontSize: 20.0,
fontWeight: FontWeight.bold),
),
2022-05-16 02:42:29 +02:00
const SizedBox(
2022-05-15 18:52:34 +02:00
height: 8.0,
),
ElevatedButton(
2022-05-16 05:17:28 +02:00
onPressed: () {
Navigator.pushReplacementNamed(context, '/products');
},
2022-05-15 18:52:34 +02:00
style: ElevatedButton.styleFrom(
primary: Colors.red,
2022-05-16 02:42:29 +02:00
textStyle: const TextStyle(
2022-05-15 18:52:34 +02:00
fontSize: 14, fontWeight: FontWeight.bold)),
2022-05-16 02:42:29 +02:00
child: const Text('SHOP NOW'),
2022-05-15 18:52:34 +02:00
),
]),
)
],
2022-05-15 16:51:11 +02:00
));
}
}