@@ -12,17 +12,33 @@ const Color _tomato = const Color(0xFFF95B57);
1212const Color _mySin = const Color (0xFFF3A646 );
1313const Color _deepCerise = const Color (0xFFD93F9B );
1414
15+ const String _kGalleryAssetsPackage = 'flutter_gallery_assets' ;
16+
1517class SectionDetail {
16- const SectionDetail ({ this .title, this .subtitle, this .imageAsset });
18+ const SectionDetail ({
19+ this .title,
20+ this .subtitle,
21+ this .imageAsset,
22+ this .imageAssetPackage,
23+ });
1724 final String title;
1825 final String subtitle;
1926 final String imageAsset;
27+ final String imageAssetPackage;
2028}
2129
2230class Section {
23- const Section ({ this .title, this .backgroundAsset, this .leftColor, this .rightColor, this .details });
31+ const Section ({
32+ this .title,
33+ this .backgroundAsset,
34+ this .backgroundAssetPackage,
35+ this .leftColor,
36+ this .rightColor,
37+ this .details,
38+ });
2439 final String title;
2540 final String backgroundAsset;
41+ final String backgroundAssetPackage;
2642 final Color leftColor;
2743 final Color rightColor;
2844 final List <SectionDetail > details;
@@ -44,51 +60,60 @@ class Section {
4460// image SectionDetails in the allSections list.
4561
4662const SectionDetail _eyeglassesDetail = const SectionDetail (
47- imageAsset: 'packages/flutter_gallery_assets/shrine/products/sunnies.png' ,
63+ imageAsset: 'shrine/products/sunnies.png' ,
64+ imageAssetPackage: _kGalleryAssetsPackage,
4865 title: 'Flutter enables interactive animation' ,
4966 subtitle: '3K views - 5 days' ,
5067);
5168
5269const SectionDetail _eyeglassesImageDetail = const SectionDetail (
53- imageAsset: 'packages/flutter_gallery_assets/shrine/products/sunnies.png' ,
70+ imageAsset: 'shrine/products/sunnies.png' ,
71+ imageAssetPackage: _kGalleryAssetsPackage,
5472);
5573
5674const SectionDetail _seatingDetail = const SectionDetail (
57- imageAsset: 'packages/flutter_gallery_assets/shrine/products/lawn_chair.png' ,
75+ imageAsset: 'shrine/products/lawn_chair.png' ,
76+ imageAssetPackage: _kGalleryAssetsPackage,
5877 title: 'Flutter enables interactive animation' ,
5978 subtitle: '3K views - 5 days' ,
6079);
6180
6281const SectionDetail _seatingImageDetail = const SectionDetail (
63- imageAsset: 'packages/flutter_gallery_assets/shrine/products/lawn_chair.png' ,
82+ imageAsset: 'shrine/products/lawn_chair.png' ,
83+ imageAssetPackage: _kGalleryAssetsPackage,
6484);
6585
6686const SectionDetail _decorationDetail = const SectionDetail (
67- imageAsset: 'packages/flutter_gallery_assets/shrine/products/lipstick.png' ,
87+ imageAsset: 'shrine/products/lipstick.png' ,
88+ imageAssetPackage: _kGalleryAssetsPackage,
6889 title: 'Flutter enables interactive animation' ,
6990 subtitle: '3K views - 5 days' ,
7091);
7192
7293const SectionDetail _decorationImageDetail = const SectionDetail (
73- imageAsset: 'packages/flutter_gallery_assets/shrine/products/lipstick.png' ,
94+ imageAsset: 'shrine/products/lipstick.png' ,
95+ imageAssetPackage: _kGalleryAssetsPackage,
7496);
7597
7698const SectionDetail _protectionDetail = const SectionDetail (
77- imageAsset: 'packages/flutter_gallery_assets/shrine/products/helmet.png' ,
99+ imageAsset: 'shrine/products/helmet.png' ,
100+ imageAssetPackage: _kGalleryAssetsPackage,
78101 title: 'Flutter enables interactive animation' ,
79102 subtitle: '3K views - 5 days' ,
80103);
81104
82105const SectionDetail _protectionImageDetail = const SectionDetail (
83- imageAsset: 'packages/flutter_gallery_assets/shrine/products/helmet.png' ,
106+ imageAsset: 'shrine/products/helmet.png' ,
107+ imageAssetPackage: _kGalleryAssetsPackage,
84108);
85109
86110final List <Section > allSections = < Section > [
87111 const Section (
88112 title: 'EYEGLASSES' ,
89113 leftColor: _mediumPurple,
90114 rightColor: _mariner,
91- backgroundAsset: 'packages/flutter_gallery_assets/shrine/products/sunnies.png' ,
115+ backgroundAsset: 'shrine/products/sunnies.png' ,
116+ backgroundAssetPackage: _kGalleryAssetsPackage,
92117 details: const < SectionDetail > [
93118 _eyeglassesDetail,
94119 _eyeglassesImageDetail,
@@ -102,7 +127,8 @@ final List<Section> allSections = <Section>[
102127 title: 'SEATING' ,
103128 leftColor: _tomato,
104129 rightColor: _mediumPurple,
105- backgroundAsset: 'packages/flutter_gallery_assets/shrine/products/lawn_chair.png' ,
130+ backgroundAsset: 'shrine/products/lawn_chair.png' ,
131+ backgroundAssetPackage: _kGalleryAssetsPackage,
106132 details: const < SectionDetail > [
107133 _seatingDetail,
108134 _seatingImageDetail,
@@ -116,7 +142,8 @@ final List<Section> allSections = <Section>[
116142 title: 'DECORATION' ,
117143 leftColor: _mySin,
118144 rightColor: _tomato,
119- backgroundAsset: 'packages/flutter_gallery_assets/shrine/products/lipstick.png' ,
145+ backgroundAsset: 'shrine/products/lipstick.png' ,
146+ backgroundAssetPackage: _kGalleryAssetsPackage,
120147 details: const < SectionDetail > [
121148 _decorationDetail,
122149 _decorationImageDetail,
@@ -130,7 +157,8 @@ final List<Section> allSections = <Section>[
130157 title: 'PROTECTION' ,
131158 leftColor: Colors .white,
132159 rightColor: _tomato,
133- backgroundAsset: 'packages/flutter_gallery_assets/shrine/products/helmet.png' ,
160+ backgroundAsset: 'shrine/products/helmet.png' ,
161+ backgroundAssetPackage: _kGalleryAssetsPackage,
134162 details: const < SectionDetail > [
135163 _protectionDetail,
136164 _protectionImageDetail,
0 commit comments