Skip to content

Commit 1814e8b

Browse files
authored
Migrate images used in recipe exercises to assets directory (#12509)
The staged site will fail to load the images until this lands, but they should work once this lands and the images are in the new location.
1 parent 73f401a commit 1814e8b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+53
-77
lines changed

eleventy.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ export default function (eleventyConfig: UserConfig) {
7777
eleventyConfig.addPassthroughCopy('src/content/llms.txt');
7878
eleventyConfig.addPassthroughCopy('src/content/assets/files', { expand: true });
7979
eleventyConfig.addPassthroughCopy('src/content/assets/images', { expand: true });
80-
eleventyConfig.addPassthroughCopy('src/content/cookbook/img-files', { expand: true });
8180
eleventyConfig.addPassthroughCopy('src/content/f', {
8281
expand: true,
8382
filter: /^(?!_).+/,

examples/cookbook/effects/drag_a_widget/lib/main.dart

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,33 +9,27 @@ void main() {
99
);
1010
}
1111

12+
const _urlPrefix =
13+
'https://docs.flutter.dev/assets/images/exercise/effects/split-check';
14+
1215
const List<Item> _items = [
1316
Item(
1417
name: 'Spinach Pizza',
1518
totalPriceCents: 1299,
1619
uid: '1',
17-
imageProvider: NetworkImage(
18-
'https://docs.flutter.dev'
19-
'/cookbook/img-files/effects/split-check/Food1.jpg',
20-
),
20+
imageProvider: NetworkImage('$_urlPrefix/Food1.jpg'),
2121
),
2222
Item(
2323
name: 'Veggie Delight',
2424
totalPriceCents: 799,
2525
uid: '2',
26-
imageProvider: NetworkImage(
27-
'https://docs.flutter.dev'
28-
'/cookbook/img-files/effects/split-check/Food2.jpg',
29-
),
26+
imageProvider: NetworkImage('$_urlPrefix/Food2.jpg'),
3027
),
3128
Item(
3229
name: 'Chicken Parmesan',
3330
totalPriceCents: 1499,
3431
uid: '3',
35-
imageProvider: NetworkImage(
36-
'https://docs.flutter.dev'
37-
'/cookbook/img-files/effects/split-check/Food3.jpg',
38-
),
32+
imageProvider: NetworkImage('$_urlPrefix/Food3.jpg'),
3933
),
4034
];
4135

@@ -52,24 +46,15 @@ class _ExampleDragAndDropState extends State<ExampleDragAndDrop>
5246
final List<Customer> _people = [
5347
Customer(
5448
name: 'Makayla',
55-
imageProvider: const NetworkImage(
56-
'https://docs.flutter.dev'
57-
'/cookbook/img-files/effects/split-check/Avatar1.jpg',
58-
),
49+
imageProvider: const NetworkImage('$_urlPrefix/Avatar1.jpg'),
5950
),
6051
Customer(
6152
name: 'Nathan',
62-
imageProvider: const NetworkImage(
63-
'https://docs.flutter.dev'
64-
'/cookbook/img-files/effects/split-check/Avatar2.jpg',
65-
),
53+
imageProvider: const NetworkImage('$_urlPrefix/Avatar2.jpg'),
6654
),
6755
Customer(
6856
name: 'Emilio',
69-
imageProvider: const NetworkImage(
70-
'https://docs.flutter.dev'
71-
'/cookbook/img-files/effects/split-check/Avatar3.jpg',
72-
),
57+
imageProvider: const NetworkImage('$_urlPrefix/Avatar3.jpg'),
7358
),
7459
];
7560

examples/cookbook/effects/parallax_scrolling/lib/excerpt3.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class Location {
113113
}
114114

115115
const urlPrefix =
116-
'https://docs.flutter.dev/cookbook/img-files/effects/parallax';
116+
'https://docs.flutter.dev/assets/images/exercise/effects/parallax';
117117

118118
const locations = [
119119
Location(

examples/cookbook/effects/parallax_scrolling/lib/excerpt4.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ class Location {
139139
}
140140

141141
const urlPrefix =
142-
'https://docs.flutter.dev/cookbook/img-files/effects/parallax';
142+
'https://docs.flutter.dev/assets/images/exercise/effects/parallax';
143143

144144
const locations = [
145145
Location(

examples/cookbook/effects/parallax_scrolling/lib/excerpt5.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ class Location {
210210
}
211211

212212
const urlPrefix =
213-
'https://docs.flutter.dev/cookbook/img-files/effects/parallax';
213+
'https://docs.flutter.dev/assets/images/exercise/effects/parallax';
214214

215215
const locations = [
216216
Location(

examples/cookbook/effects/parallax_scrolling/lib/main.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,8 @@ class Location {
333333
}
334334

335335
const urlPrefix =
336-
'https://docs.flutter.dev/cookbook/img-files/effects/parallax';
336+
'https://docs.flutter.dev/assets/images/exercise/effects/parallax';
337+
337338
const locations = [
338339
Location(
339340
name: 'Mount Rushmore',

examples/cookbook/effects/shimmer_loading/lib/main.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ class CircleListItem extends StatelessWidget {
1717
),
1818
child: ClipOval(
1919
child: Image.network(
20-
'https://docs.flutter.dev/cookbook'
21-
'/img-files/effects/split-check/Avatar1.jpg',
20+
'https://docs.flutter.dev/assets/images/'
21+
'exercise/split-check/Avatar1.jpg',
2222
fit: BoxFit.cover,
2323
),
2424
),
@@ -57,8 +57,8 @@ class CardListItem extends StatelessWidget {
5757
child: ClipRRect(
5858
borderRadius: BorderRadius.circular(16),
5959
child: Image.network(
60-
'https://docs.flutter.dev/cookbook'
61-
'/img-files/effects/split-check/Food1.jpg',
60+
'https://docs.flutter.dev/assets/images/'
61+
'exercise/split-check/Food1.jpg',
6262
fit: BoxFit.cover,
6363
),
6464
),

examples/cookbook/effects/shimmer_loading/lib/original_example.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,8 @@ class CircleListItem extends StatelessWidget {
270270
),
271271
child: ClipOval(
272272
child: Image.network(
273-
'https://docs.flutter.dev/cookbook'
274-
'/img-files/effects/split-check/Avatar1.jpg',
273+
'https://docs.flutter.dev/assets/images/'
274+
'exercise/split-check/Avatar1.jpg',
275275
fit: BoxFit.cover,
276276
),
277277
),
@@ -308,8 +308,8 @@ class CardListItem extends StatelessWidget {
308308
child: ClipRRect(
309309
borderRadius: BorderRadius.circular(16),
310310
child: Image.network(
311-
'https://docs.flutter.dev/cookbook'
312-
'/img-files/effects/split-check/Food1.jpg',
311+
'https://docs.flutter.dev/assets/images/'
312+
'exercise/split-check/Food1.jpg',
313313
fit: BoxFit.cover,
314314
),
315315
),

examples/cookbook/effects/shimmer_loading/lib/shimmer_loading_items.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ class CircleListItem extends StatelessWidget {
1717
),
1818
child: ClipOval(
1919
child: Image.network(
20-
'https://docs.flutter.dev/cookbook'
21-
'/img-files/effects/split-check/Avatar1.jpg',
20+
'https://docs.flutter.dev/assets/images/'
21+
'exercise/split-check/Avatar1.jpg',
2222
fit: BoxFit.cover,
2323
),
2424
),
@@ -57,8 +57,8 @@ class CardListItem extends StatelessWidget {
5757
child: ClipRRect(
5858
borderRadius: BorderRadius.circular(16),
5959
child: Image.network(
60-
'https://docs.flutter.dev/cookbook'
61-
'/img-files/effects/split-check/Food1.jpg',
60+
'https://docs.flutter.dev/assets/images/'
61+
'exercise/effects/split-check/Food1.jpg',
6262
fit: BoxFit.cover,
6363
),
6464
),
Lines changed: 4 additions & 0 deletions

0 commit comments

Comments
 (0)