Skip to content

Commit 7bca2c2

Browse files
committed
🚀 Add previewThumbSize usage example.
1 parent 4a9a1dd commit 7bca2c2

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

example/lib/pages/multi_assets_page.dart

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,24 @@ class _MultiAssetsPageState extends State<MultiAssetsPage> {
191191
);
192192
},
193193
),
194+
PickMethodModel(
195+
icon: '🎚',
196+
name: 'Custom image preview thumb size',
197+
description:
198+
'You can reduce the thumb size in order to get more quickly load speed.',
199+
method: (
200+
BuildContext context,
201+
List<AssetEntity> assets,
202+
) async {
203+
return await AssetPicker.pickAssets(
204+
context,
205+
maxAssets: maxAssetsCount,
206+
selectedAssets: assets,
207+
requestType: RequestType.image,
208+
previewThumbSize: const <int>[300, 300],
209+
);
210+
},
211+
),
194212
];
195213

196214
Future<void> selectAssets(PickMethodModel model) async {
@@ -265,6 +283,8 @@ class _MultiAssetsPageState extends State<MultiAssetsPage> {
265283
fontSize: 18.0,
266284
fontWeight: FontWeight.bold,
267285
),
286+
maxLines: 1,
287+
overflow: TextOverflow.ellipsis,
268288
),
269289
Text(
270290
model.description,

0 commit comments

Comments
 (0)