findBox method

Future<Box?> findBox(
  1. String boxName
)

Implementation

Future<Box?> findBox(String boxName) async {
  try {
    final find =
        getBoxNames.firstWhere((element) => element.boxName == boxName);
    return find.getBox;
  } catch (_) {}
  return null;
}