Skip to content

Commit 552b358

Browse files
committed
📝 Improve wording and grammar
1 parent aa24d3b commit 552b358

File tree

4 files changed

+42
-37
lines changed

4 files changed

+42
-37
lines changed

README.md

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,17 @@
1313

1414
Language: English | [中文简体](README-ZH.md)
1515

16-
An **assets picker** which looks like the one in WeChat, based on `photo_manager` for asset implementation, `extended_image` for image preview, `provider` to help controlling the state of the picker.
16+
An **assets picker** which looks like the one in WeChat,
17+
based on `photo_manager` for asset implementation,
18+
`extended_image` for image preview,
19+
and `provider` to help control the state of the picker.
1720

18-
To take a photo or a video for assets, please check the detailed usage in the example, and head over to [wechat_camera_picker](https://fluttercandies.github.io/flutter_wechat_camera_picker/) .
21+
To take a photo or a video for assets, please check the detailed usage in the example, and head over to
22+
[wechat_camera_picker](https://fluttercandies.github.io/flutter_wechat_camera_picker/) .
1923

2024
## Contributors ✨
2125

22-
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
26+
Many thanks to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
2327
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
2428
<!-- prettier-ignore-start -->
2529
<!-- markdownlint-disable -->
@@ -36,7 +40,9 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
3640
<!-- markdownlint-enable -->
3741
<!-- prettier-ignore-end -->
3842
<!-- ALL-CONTRIBUTORS-LIST:END -->
39-
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
43+
This project follows the
44+
[all-contributors](https://github.com/all-contributors/all-contributors) specification.
45+
Contributions of any kind welcomed!!
4046

4147
## Category 🗂
4248

@@ -94,15 +100,16 @@ See [Migration Guide](guides/migration_guide.md).
94100

95101
## READ THIS FIRST ‼️
96102

97-
Althought the package provide selection for assets, it still require users build their own methods to handle upload, image compress, etc. If you have any question about how to build it, please run the example or refer to [photo_manager](https://github.com/CaiJingLong/flutter_photo_manager) for API usage.
103+
Although the package provides assets selection, it still requires users to build their own methods
104+
to handle upload, image compress, etc. If you have any questions about how to build them, please run the example or refer to [photo_manager](https://github.com/CaiJingLong/flutter_photo_manager) for API usage.
98105

99106
## Preparing for use 🍭
100107

101108
### Version constraints
102109

103110
Flutter SDK: `>=2.0.0` .
104111

105-
If you got an error about `resolve conflict` when running `flutter pub get` , please use `dependency_overrides` to solve it. See [here](#version-resolve-conflict-with-xxx-eg-dartx) .
112+
If you got a `resolve conflict` error when running `flutter pub get` , please use `dependency_overrides` to fix it. See [here](#version-resolve-conflict-with-xxx-eg-dartx) .
106113

107114
### Flutter
108115

@@ -130,12 +137,12 @@ See [Generated API](https://sjudd.github.io/glide/doc/generatedapi.html).
130137

131138
### iOS
132139

133-
1. Define the minimum platform in `ios/Podfile` upper to *9.0*.
134-
```
140+
1. Platform version has to be at least *9.0*. Modify `ios/Podfile` and update accordingly.
141+
```ruby
135142
platform :ios, '9.0'
136143
```
137144

138-
2. Add following content to `info.plist`.
145+
2. Add the following content to `info.plist`.
139146

140147
```
141148
<key>NSAppTransportSecurity</key>
@@ -149,41 +156,39 @@ platform :ios, '9.0'
149156

150157
### MacOS
151158

152-
Currently flutter desktop is still under development, so please be aware that any issues releated to the desktop version is not yet supported.
153-
154-
1. Define the minimum platform in `macos/Podfile` upper to *10.15*.
155-
```
159+
1. Platform version has to be at least *10.15*. Modify `macos/Podfile` and update accordingly.
160+
```ruby
156161
platform :osx, '10.15'
157162
```
158163

159-
2. Use *Xcode* to open the `macos/Runner.xcworkspace`. Then follow screenshots to setup the minumum target version upper to *10.15*.
164+
2. Set the minimum deployment target to *10.15*. Use XCode to open `macos/Runner.xcworkspace` .
160165

161166
3. ![step 1](https://tva1.sinaimg.cn/large/007S8ZIlgy1ghw67v4yk4j30qy0b50u0.jpg)
162167

163168
4. ![step 2](https://tva1.sinaimg.cn/large/007S8ZIlgy1ghw67vd3f2j30jv04zgm5.jpg)
164169

165-
5. Add the same thing as iOS does into `info.plist`.
170+
5. Follow the iOS instructions and modify `info.plist` accordingly.
166171

167172
## Usage 📖
168173

169174
| Name | Type | Description | Default |
170175
| ------------------------- | --------------------------- | ------------------------------------------------------------ | ----------------------------------- |
171176
| selectedAssets | `List<AssetEntity>?` | Selected assets. Prevent duplicate selection. If you don't need to prevent duplicate selection, just don't pass it. | `null` |
172177
| maxAssets | `int` | Maximum asset that the picker can pick. | 9 |
173-
| pageSize | `int` | Assets amount when assets loaded with paging. **Must be a multiple of `gridCount`.** Nullable for non paging. | 320 (80 * 4) |
174-
| pathThumbSize | `int` | The size of thumb data in picker. | 80 |
178+
| pageSize | `int?` | Number of assets per page. **Must be a multiple of `gridCount`**. | 320 (80 * 4) |
179+
| pathThumbSize | `int` | Thumbnail size. | 80 |
175180
| gridCount | `int` | Grid count in picker. | 4 |
176181
| requestType | `RequestType` | Request type for picker. | `RequestType.image` |
177-
| previewThumbSize | `List<int>?` | Thumb size for the preview of images in the viewer. | `null` |
178-
| specialPickerType | `SpacialPickerType?` | Provide some special picker types to integrate un-common pick pattern. | `null` |
179-
| themeColor | `Color?` | Main theme color for the picker | `Color(0xff00bc56)` |
182+
| previewThumbSize | `List<int>?` | Preview thumbnail size in the viewer. | `null` |
183+
| specialPickerType | `SpacialPickerType?` | Provides the option to integrate a custom picker type. | `null` |
184+
| themeColor | `Color?` | Main theme color for the picker. | `Color(0xff00bc56)` |
180185
| pickerTheme | `ThemeData?` | Theme data provider for the picker and the viewer. | `null` |
181186
| sortPathDelegate | `SortPathDeleage?` | Path entities sort delegate for the picker, sort paths as you want. | `CommonSortPathDelegate` |
182187
| textDelegate | `AssetsPickerTextDelegate?` | Text delegate for the picker, for customize the texts. | `DefaultAssetsPickerTextDelegate()` |
183188
| filterOptions | `FilterOptionGroup?` | Allow users to customize assets filter options. | `null` |
184189
| specialItemBuilder | `WidgetBuilder?` | The widget builder for the special item. | `null` |
185190
| specialItemPosition | `SpecialItemPosition` | Allow users set a special item in the picker with several positions. | `SpecialItemPosition.none` |
186-
| allowSpecialItemWhenEmpty | `bool` | Whether the special item will display or not when assets is empty. | `false` |
191+
| allowSpecialItemWhenEmpty | `bool` | Whether the special item will display or not when assets is empty. | `false` |
187192
| routeCurve | `Curve` | The curve which the picker use to build page route transition. | `Curves.easeIn` |
188193
| routeDuration | `Duration` | The duration which the picker use to build page route transition. | `const Duration(milliseconds: 500)` |
189194

example/lib/pages/multi_assets_page.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class _MultiAssetsPageState extends State<MultiAssetsPage> {
3030
PickMethodModel(
3131
icon: '🖼️',
3232
name: 'Image picker',
33-
description: 'Simply pick image from device.',
33+
description: 'Only pick image from device.',
3434
method: (
3535
BuildContext context,
3636
List<AssetEntity> assets,
@@ -46,7 +46,7 @@ class _MultiAssetsPageState extends State<MultiAssetsPage> {
4646
PickMethodModel(
4747
icon: '🎞',
4848
name: 'Video picker',
49-
description: 'Simply pick video from device.',
49+
description: 'Only pick video from device.',
5050
method: (
5151
BuildContext context,
5252
List<AssetEntity> assets,
@@ -62,7 +62,7 @@ class _MultiAssetsPageState extends State<MultiAssetsPage> {
6262
PickMethodModel(
6363
icon: '🎶',
6464
name: 'Audio picker',
65-
description: 'Simply pick audio from device.',
65+
description: 'Only pick audio from device.',
6666
method: (
6767
BuildContext context,
6868
List<AssetEntity> assets,
@@ -78,7 +78,7 @@ class _MultiAssetsPageState extends State<MultiAssetsPage> {
7878
PickMethodModel(
7979
icon: '📷',
8080
name: 'Pick from camera',
81-
description: 'Allow pick asset through camera.',
81+
description: 'Allow pick an asset through camera.',
8282
method: (
8383
BuildContext context,
8484
List<AssetEntity> assets,
@@ -130,8 +130,8 @@ class _MultiAssetsPageState extends State<MultiAssetsPage> {
130130
PickMethodModel(
131131
icon: '🔲',
132132
name: '3 items grid',
133-
description:
134-
'Picker will served as 3 items on cross axis. (pageSize must be a multiple of gridCount)',
133+
description: 'Picker will served as 3 items on cross axis. '
134+
'(pageSize must be a multiple of gridCount)',
135135
method: (
136136
BuildContext context,
137137
List<AssetEntity> assets,
@@ -195,7 +195,7 @@ class _MultiAssetsPageState extends State<MultiAssetsPage> {
195195
icon: '🎚',
196196
name: 'Custom image preview thumb size',
197197
description:
198-
'You can reduce the thumb size in order to get more quickly load speed.',
198+
'You can reduce the thumb size to get more quickly load speed.',
199199
method: (
200200
BuildContext context,
201201
List<AssetEntity> assets,

example/lib/pages/single_assets_page.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class _SingleAssetPageState extends State<SingleAssetPage> {
3030
PickMethodModel(
3131
icon: '🖼️',
3232
name: 'Image picker',
33-
description: 'Simply pick image from device.',
33+
description: 'Only pick image from device.',
3434
method: (
3535
BuildContext context,
3636
List<AssetEntity> assets,
@@ -46,7 +46,7 @@ class _SingleAssetPageState extends State<SingleAssetPage> {
4646
PickMethodModel(
4747
icon: '🎞',
4848
name: 'Video picker',
49-
description: 'Simply pick video from device.',
49+
description: 'Only pick video from device.',
5050
method: (
5151
BuildContext context,
5252
List<AssetEntity> assets,
@@ -62,7 +62,7 @@ class _SingleAssetPageState extends State<SingleAssetPage> {
6262
PickMethodModel(
6363
icon: '🎶',
6464
name: 'Audio picker',
65-
description: 'Simply pick audio from device.',
65+
description: 'Only pick audio from device.',
6666
method: (
6767
BuildContext context,
6868
List<AssetEntity> assets,
@@ -78,7 +78,7 @@ class _SingleAssetPageState extends State<SingleAssetPage> {
7878
PickMethodModel(
7979
icon: '📷',
8080
name: 'Pick from camera',
81-
description: 'Allow pick asset through camera.',
81+
description: 'Allow pick an asset through camera.',
8282
method: (
8383
BuildContext context,
8484
List<AssetEntity> assets,
@@ -129,8 +129,8 @@ class _SingleAssetPageState extends State<SingleAssetPage> {
129129
PickMethodModel(
130130
icon: '🔲',
131131
name: '3 items grid',
132-
description:
133-
'Picker will served as 3 items on cross axis. (pageSize must be a multiple of gridCount)',
132+
description: 'Picker will served as 3 items on cross axis. '
133+
'(pageSize must be a multiple of gridCount)',
134134
method: (
135135
BuildContext context,
136136
List<AssetEntity> assets,
@@ -172,8 +172,8 @@ class _SingleAssetPageState extends State<SingleAssetPage> {
172172
),
173173
PickMethodModel(
174174
icon: '🎭',
175-
name: 'Wechat moment',
176-
description: 'Pick assets just like the wechat moment pattern.',
175+
name: 'WeChat moment',
176+
description: 'Pick assets like the WeChat moment pattern.',
177177
method: (
178178
BuildContext context,
179179
List<AssetEntity> assets,

lib/src/delegates/asset_picker_builder_delegate.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ class DefaultAssetPickerBuilderDelegate
439439
allowSpecialItemWhenEmpty: allowSpecialItemWhenEmpty,
440440
);
441441

442-
/// Thumb size for the preview of images in the viewer.
442+
/// Preview thumbnail size in the viewer.
443443
/// 预览时图片的缩略图大小
444444
///
445445
/// This only works on images since other types does not have request

0 commit comments

Comments
 (0)