Skip to content

Commit 72b29dc

Browse files
LeGoffMaelAlexV525
andauthored
✨ Instagram delegate customization (#403)
As we discussed previously #399. Introduce `InstaAssetPickerBuilder` based on [insta_assets_picker](https://github.com/LeGoffMael/insta_assets_picker) which reproduces the Instagram layout. ### This custom delegate shows how to: - Setup a completely different: layout, select and view logic. - Use `keepScrollOffset` when set to true to restore scroll and preview. - Customize `DefaultAssetPickerViewerBuilderDelegate` (there is no example for it at present). It was tested on both iOS and Android. ### Changes needed outside of the example folder - Fixed an issue with `AssetPickerViewer` when the viewer is being used in nested widgets, `initStateAndTicker` would be omitted. Co-authored-by: Alex Li <[email protected]>
1 parent 8ed4ac8 commit 72b29dc

File tree

7 files changed

+851
-22
lines changed

7 files changed

+851
-22
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ that can be found in the LICENSE file. -->
44

55
# Changelog
66

7+
## 8.3.1
8+
9+
### New features
10+
11+
- Add `didUpdateViewer` and `initAnimations` in the `AssetPickerViewerBuilderDelegate`. (#403)
12+
- Add insta_assets_picker as an custom delegate example. (#403)
13+
714
## 8.3.0
815

916
### New features

example/lib/customs/custom_picker_page.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import 'package:flutter/material.dart';
66

77
import '../constants/custom_pick_method.dart';
88
import 'pickers/directory_file_asset_picker.dart';
9+
import 'pickers/insta_asset_picker.dart';
910
import 'pickers/multi_tabs_assets_picker.dart';
1011

1112
class CustomPickersPage extends StatefulWidget {
@@ -51,6 +52,15 @@ class _CustomPickerPageState extends State<CustomPickersPage>
5152
MaterialPageRoute<void>(builder: (_) => const MultiTabAssetPicker()),
5253
),
5354
),
55+
CustomPickMethod(
56+
icon: '📷',
57+
name: 'Instagram layout picker',
58+
description: 'The picker reproduces Instagram layout with preview and '
59+
"scroll animations. It's also published as the package insta_assets_picker.",
60+
method: (BuildContext context) => Navigator.of(context).push<void>(
61+
MaterialPageRoute<void>(builder: (_) => const InstaAssetPicker()),
62+
),
63+
),
5464
];
5565
}
5666

0 commit comments

Comments
 (0)