Skip to content

Commit

Permalink
Update lib/src/models/special_item.dart
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Li <github@alexv525.com>
  • Loading branch information
yujune and AlexV525 authored Oct 10, 2024
1 parent 3991cba commit e421a5a
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions lib/src/models/special_item.dart
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
import 'package:flutter/material.dart';
import 'package:wechat_assets_picker/wechat_assets_picker.dart';

/// Allow users to set a special item in the picker grid with specified [position].
/// 允许用户在选择器中添加一个自定义item,并指定其位置。
@immutable
class SpecialItem {
SpecialItem({
required this.itemPosition,
this.itemBuilder,
class SpecialItem<Path> {
const SpecialItem({
required this.builder,
required this.position,
});

/// Allow users set a special item in the picker with several positions.
/// 允许用户在选择器中添加一个自定义item,并指定位置
final SpecialItemPosition itemPosition;

/// The widget builder for the the special item.
/// 自定义item列表
final SpecialItemBuilder<AssetPathEntity>? itemBuilder;
/// 自定义item构建。
final SpecialItemBuilder<Path>? builder;

/// Define how the item will be positioned.
/// 定义如何摆放item。
final SpecialItemPosition position;
}

0 comments on commit e421a5a

Please sign in to comment.