modelFileSizeBytes method

Future<int?> modelFileSizeBytes(
  1. String modelId
)

File size in bytes if present, else null.

Implementation

Future<int?> modelFileSizeBytes(String modelId) async {
  final spec = _modelSpecs[modelId];
  if (spec == null) return null;
  final file = File(await _modelPath(spec));
  if (!await file.exists()) return null;
  return file.length();
}