mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 16:56:19 +01:00
Fix analyzer compatibility
This commit is contained in:
parent
e18ffce8a3
commit
65b66d306f
2 changed files with 3 additions and 3 deletions
|
@ -21,7 +21,7 @@ class DriftTableSortGenerator extends GeneratorForAnnotation<DriftTableSort> {
|
||||||
final driftTableSort =
|
final driftTableSort =
|
||||||
DriftTableSort(annotation.read("dbClass").stringValue);
|
DriftTableSort(annotation.read("dbClass").stringValue);
|
||||||
final clazz = element;
|
final clazz = element;
|
||||||
if (!clazz.allSupertypes.any((t) => t.element2.name == "Table")) {
|
if (!clazz.allSupertypes.any((t) => t.element.name == "Table")) {
|
||||||
print("Not a drift table");
|
print("Not a drift table");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@ extension ${sortEnumName}IterableExtension on Iterable<$sortEnumName> {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// it's a very rough way but well...
|
// it's a very rough way but well...
|
||||||
if (field.type.element2?.name?.endsWith("Column") ?? false) {
|
if (field.type.element?.name?.endsWith("Column") ?? false) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -29,7 +29,7 @@ extension _\$${clazz.name}NpLog on ${clazz.name} {
|
||||||
} else if (element is ExtensionElement) {
|
} else if (element is ExtensionElement) {
|
||||||
final extension = element;
|
final extension = element;
|
||||||
return """
|
return """
|
||||||
extension _\$${extension.name}NpLog on ${extension.extendedType.element2!.name} {
|
extension _\$${extension.name}NpLog on ${extension.extendedType.element!.name} {
|
||||||
// ignore: unused_element
|
// ignore: unused_element
|
||||||
Logger get _log => log;
|
Logger get _log => log;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue