CellFactory.override constructor

CellFactory.override(
  1. {required BuildContext context,
  2. required Widget child,
  3. Map<Type, CellBuilder> builders = const {}}
)

Implementation

factory CellFactory.override(
    {required BuildContext context,
    required Widget child,
    Map<Type, CellBuilder> builders = const {}}) {
  var factory = of(context);

  Map<Type, CellBuilder> map = {};
  if (factory != null) {
    map.addAll(factory._builders);
  }
  map.addAll(builders);
  return CellFactory(
    builders: map,
    child: child,
  );
}