@@ -18,14 +18,14 @@ package com.example.baselineprofiles_codelab.model
18
18
19
19
import androidx.annotation.DrawableRes
20
20
import androidx.compose.runtime.Immutable
21
- import com.example.baselineprofiles_codelab.R // Or your R file if different e.g. com.example.jetsnack.R
21
+ import com.example.baselineprofiles_codelab.R
22
22
23
23
@Immutable
24
24
data class Snack (
25
25
val id : Long ,
26
26
val name : String ,
27
27
@DrawableRes
28
- val imageRes : Int , // Changed from imageUrl: String to imageRes: Int
28
+ val imageRes : Int ,
29
29
val price : Long ,
30
30
val tagline : String = " " ,
31
31
val tags : Set <String > = emptySet()
@@ -34,196 +34,195 @@ data class Snack(
34
34
/* *
35
35
* Static data
36
36
*/
37
-
38
37
val snacks = listOf (
39
38
Snack (
40
39
id = 1L ,
41
40
name = " Cupcake" ,
42
41
tagline = " A tag line" ,
43
- imageRes = R .drawable.cupcake, // Assuming R.drawable.cupcake exists
42
+ imageRes = R .drawable.cupcake,
44
43
price = 299
45
44
),
46
45
Snack (
47
46
id = 2L ,
48
47
name = " Donut" ,
49
48
tagline = " A tag line" ,
50
- imageRes = R .drawable.donut, // Assuming R.drawable.donut exists
49
+ imageRes = R .drawable.donut,
51
50
price = 299
52
51
),
53
52
Snack (
54
53
id = 3L ,
55
54
name = " Eclair" ,
56
55
tagline = " A tag line" ,
57
- imageRes = R .drawable.eclair, // Assuming R.drawable.eclair exists
56
+ imageRes = R .drawable.eclair,
58
57
price = 299
59
58
),
60
59
Snack (
61
60
id = 4L ,
62
61
name = " Froyo" ,
63
62
tagline = " A tag line" ,
64
- imageRes = R .drawable.froyo, // Assuming R.drawable.froyo exists
63
+ imageRes = R .drawable.froyo,
65
64
price = 299
66
65
),
67
66
Snack (
68
67
id = 5L ,
69
68
name = " Gingerbread" ,
70
69
tagline = " A tag line" ,
71
- imageRes = R .drawable.gingerbread, // Assuming R.drawable.gingerbread exists
70
+ imageRes = R .drawable.gingerbread,
72
71
price = 499
73
72
),
74
73
Snack (
75
74
id = 6L ,
76
75
name = " Honeycomb" ,
77
76
tagline = " A tag line" ,
78
- imageRes = R .drawable.honeycomb, // Assuming R.drawable.honeycomb exists
77
+ imageRes = R .drawable.honeycomb,
79
78
price = 299
80
79
),
81
80
Snack (
82
81
id = 7L ,
83
82
name = " Ice Cream Sandwich" ,
84
83
tagline = " A tag line" ,
85
- imageRes = R .drawable.ice_cream_sandwich, // Assuming R.drawable.ice_cream_sandwich exists
84
+ imageRes = R .drawable.ice_cream_sandwich,
86
85
price = 1299
87
86
),
88
87
Snack (
89
88
id = 8L ,
90
89
name = " Jellybean" ,
91
90
tagline = " A tag line" ,
92
- imageRes = R .drawable.jelly_bean, // Assuming R.drawable.jelly_bean exists (note the underscore)
91
+ imageRes = R .drawable.jelly_bean,
93
92
price = 299
94
93
),
95
94
Snack (
96
95
id = 9L ,
97
96
name = " KitKat" ,
98
97
tagline = " A tag line" ,
99
- imageRes = R .drawable.kitkat, // Assuming R.drawable.kitkat exists
98
+ imageRes = R .drawable.kitkat,
100
99
price = 549
101
100
),
102
101
Snack (
103
102
id = 10L ,
104
103
name = " Lollipop" ,
105
104
tagline = " A tag line" ,
106
- imageRes = R .drawable.lollipop, // Assuming R.drawable.lollipop exists
105
+ imageRes = R .drawable.lollipop,
107
106
price = 299
108
107
),
109
108
Snack (
110
109
id = 11L ,
111
110
name = " Marshmallow" ,
112
111
tagline = " A tag line" ,
113
- imageRes = R .drawable.marshmallow, // Assuming R.drawable.marshmallow exists
112
+ imageRes = R .drawable.marshmallow,
114
113
price = 299
115
114
),
116
115
Snack (
117
116
id = 12L ,
118
117
name = " Nougat" ,
119
118
tagline = " A tag line" ,
120
- imageRes = R .drawable.nougat, // Assuming R.drawable.nougat exists
119
+ imageRes = R .drawable.nougat,
121
120
price = 299
122
121
),
123
122
Snack (
124
123
id = 13L ,
125
124
name = " Oreo" ,
126
125
tagline = " A tag line" ,
127
- imageRes = R .drawable.oreo, // Assuming R.drawable.oreo exists
126
+ imageRes = R .drawable.oreo,
128
127
price = 299
129
128
),
130
129
Snack (
131
130
id = 14L ,
132
131
name = " Pie" ,
133
132
tagline = " A tag line" ,
134
- imageRes = R .drawable.pie, // Assuming R.drawable.pie exists
133
+ imageRes = R .drawable.pie,
135
134
price = 299
136
135
),
137
136
Snack (
138
137
id = 15L ,
139
138
name = " Chips" ,
140
- imageRes = R .drawable.chips, // Assuming R.drawable.chips exists
139
+ imageRes = R .drawable.chips,
141
140
price = 299
142
141
),
143
142
Snack (
144
143
id = 16L ,
145
144
name = " Pretzels" ,
146
- imageRes = R .drawable.pretzels, // Assuming R.drawable.pretzels exists
145
+ imageRes = R .drawable.pretzels,
147
146
price = 299
148
147
),
149
148
Snack (
150
149
id = 17L ,
151
150
name = " Smoothies" ,
152
- imageRes = R .drawable.smoothies, // Assuming R.drawable.smoothies exists
151
+ imageRes = R .drawable.smoothies,
153
152
price = 299
154
153
),
155
154
Snack (
156
155
id = 18L ,
157
156
name = " Popcorn" ,
158
- imageRes = R .drawable.popcorn, // Assuming R.drawable.popcorn exists
157
+ imageRes = R .drawable.popcorn,
159
158
price = 299
160
159
),
161
160
Snack (
162
161
id = 19L ,
163
162
name = " Almonds" ,
164
- imageRes = R .drawable.almonds, // Assuming R.drawable.almonds exists
163
+ imageRes = R .drawable.almonds,
165
164
price = 299
166
165
),
167
166
Snack (
168
167
id = 20L ,
169
168
name = " Cheese" ,
170
- imageRes = R .drawable.cheese, // Assuming R.drawable.cheese exists
169
+ imageRes = R .drawable.cheese,
171
170
price = 299
172
171
),
173
172
Snack (
174
173
id = 21L ,
175
174
name = " Apples" ,
176
175
tagline = " A tag line" ,
177
- imageRes = R .drawable.apples, // Assuming R.drawable.apples exists
176
+ imageRes = R .drawable.apples,
178
177
price = 299
179
178
),
180
179
Snack (
181
180
id = 22L ,
182
181
name = " Apple sauce" ,
183
182
tagline = " A tag line" ,
184
- imageRes = R .drawable.apple_sauce, // Assuming R.drawable.apple_sauce exists
183
+ imageRes = R .drawable.apple_sauce,
185
184
price = 299
186
185
),
187
186
Snack (
188
187
id = 23L ,
189
188
name = " Apple chips" ,
190
189
tagline = " A tag line" ,
191
- imageRes = R .drawable.apple_chips, // Assuming R.drawable.apple_chips exists
190
+ imageRes = R .drawable.apple_chips,
192
191
price = 299
193
192
),
194
193
Snack (
195
194
id = 24L ,
196
195
name = " Apple juice" ,
197
196
tagline = " A tag line" ,
198
- imageRes = R .drawable.apple_juice, // Assuming R.drawable.apple_juice exists
197
+ imageRes = R .drawable.apple_juice,
199
198
price = 299
200
199
),
201
200
Snack (
202
201
id = 25L ,
203
202
name = " Apple pie" ,
204
203
tagline = " A tag line" ,
205
- imageRes = R .drawable.apple_pie, // Assuming R.drawable.apple_pie exists
204
+ imageRes = R .drawable.apple_pie,
206
205
price = 299
207
206
),
208
207
Snack (
209
208
id = 26L ,
210
209
name = " Grapes" ,
211
210
tagline = " A tag line" ,
212
- imageRes = R .drawable.grapes, // Assuming R.drawable.grapes exists
211
+ imageRes = R .drawable.grapes,
213
212
price = 299
214
213
),
215
214
Snack (
216
215
id = 27L ,
217
216
name = " Kiwi" ,
218
217
tagline = " A tag line" ,
219
- imageRes = R .drawable.kiwi, // Assuming R.drawable.kiwi exists
218
+ imageRes = R .drawable.kiwi,
220
219
price = 299
221
220
),
222
221
Snack (
223
222
id = 28L ,
224
223
name = " Mango" ,
225
224
tagline = " A tag line" ,
226
- imageRes = R .drawable.mango, // Assuming R.drawable.mango exists
225
+ imageRes = R .drawable.mango,
227
226
price = 299
228
227
)
229
228
)
0 commit comments