readStateDataOrNull<T> method

T? readStateDataOrNull<T>({
  1. required BuildContext context,
  2. required String key,
})

Implementation

T? readStateDataOrNull<T>({
  required BuildContext context,
  required String key,
}) {
  try {
    return readState(context, identifier: key) as T;
  } catch (e) {
    return null;
  }
}