isFlutterProject property

bool get isFlutterProject

Returns true if this looks like a Flutter project (pubspec has flutter sdk).

Implementation

static bool get isFlutterProject {
  if (!hasPubspec) return false;
  try {
    final content = File('pubspec.yaml').readAsStringSync();
    final doc = loadYaml(content);
    return doc != null && doc['environment'] != null;
  } catch (_) {
    return false;
  }
}