with3<TItem extends AFID> static method
TItem
with3<TItem extends AFID>({
- required AFLibraryID? library,
- required String codeId,
- required TItem creator(),
- required Object? first,
- Object? second,
- Object? third,
Implementation
static TItem with3<TItem extends AFID>({
required AFLibraryID? library,
required String codeId,
required TItem Function(String, AFLibraryID, List<Object>) creator,
required Object? first,
Object? second,
Object? third,
}) {
final key = StringBuffer(codeId);
final items = <Object>[];
if(first != null) {
key.write("_$first");
items.add(first);
}
if(second != null) {
key.write("_$second");
items.add(second);
}
if(third != null) {
key.write("_$third");
items.add(third);
}
final lib = library;
if(lib == null) throwLibNotNull();
return creator(key.toString(), lib, items);
}