supportChildrenRoutes top-level property
bool
get
supportChildrenRoutes
Checks whether the installed version of get supports child routes
Implementation
bool get supportChildrenRoutes {
if (PubspecUtils.isServerProject) {
return false;
}
var supportChildren = Version.parse('3.21.0').compareTo(
PubspecUtils.getPackageVersion('get') ?? Version.parse('3.21.0')) <=
0;
if (supportChildren) {
var routesFile = findFileByName('server_routes.dart');
if (routesFile.path.isNotEmpty) {
supportChildren =
routesFile.readAsLinesSync().contains('abstract class _Paths {') ||
routesFile.readAsLinesSync().contains('abstract class _Paths {}');
} else {
supportChildren = false;
}
}
return supportChildren;
}