-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
Copy pathhome_screen.dart
74 lines (70 loc) · 2.59 KB
/
home_screen.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import 'package:flutter/material.dart';
import '../../../components/Banner/S/banner_s_style_1.dart';
import '../../../components/Banner/S/banner_s_style_5.dart';
import '../../../constants.dart';
import '../../../route/screen_export.dart';
import 'components/best_sellers.dart';
import 'components/flash_sale.dart';
import 'components/most_popular.dart';
import 'components/offer_carousel_and_categories.dart';
import 'components/popular_products.dart';
class HomeScreen extends StatelessWidget {
const HomeScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
body: SafeArea(
child: CustomScrollView(
slivers: [
const SliverToBoxAdapter(child: OffersCarouselAndCategories()),
const SliverToBoxAdapter(child: PopularProducts()),
const SliverPadding(
padding: EdgeInsets.symmetric(vertical: defaultPadding * 1.5),
sliver: SliverToBoxAdapter(child: FlashSale()),
),
SliverToBoxAdapter(
child: Column(
children: [
// While loading use 👇
// const BannerMSkelton(),‚
BannerSStyle1(
title: "New \narrival",
subtitle: "SPECIAL OFFER",
discountParcent: 50,
press: () {
Navigator.pushNamed(context, onSaleScreenRoute);
},
),
const SizedBox(height: defaultPadding / 4),
// We have 4 banner styles, all in the pro version
],
),
),
const SliverToBoxAdapter(child: BestSellers()),
const SliverToBoxAdapter(child: MostPopular()),
SliverToBoxAdapter(
child: Column(
children: [
const SizedBox(height: defaultPadding * 1.5),
const SizedBox(height: defaultPadding / 4),
// While loading use 👇
// const BannerSSkelton(),
BannerSStyle5(
title: "Black \nfriday",
subtitle: "50% Off",
bottomText: "Collection".toUpperCase(),
press: () {
Navigator.pushNamed(context, onSaleScreenRoute);
},
),
const SizedBox(height: defaultPadding / 4),
],
),
),
const SliverToBoxAdapter(child: BestSellers()),
],
),
),
);
}
}