diff --git a/.github/workflows/review.yaml b/.github/workflows/review.yaml index c6daa71..5c49f6d 100644 --- a/.github/workflows/review.yaml +++ b/.github/workflows/review.yaml @@ -17,7 +17,7 @@ jobs: - name: Setup Flutter uses: subosito/flutter-action@v2 with: - flutter-version: 3.22.3 + flutter-version: 3.24.3 cache: true - name: Setup pub diff --git a/packages/playbook_generator/lib/src/playbook_builder.dart b/packages/playbook_generator/lib/src/playbook_builder.dart index 7731c12..8c3a70b 100644 --- a/packages/playbook_generator/lib/src/playbook_builder.dart +++ b/packages/playbook_generator/lib/src/playbook_builder.dart @@ -88,14 +88,14 @@ ${storiesLibrary.accept(emitter)} if (element is ClassElement) { return (element.unnamedConstructor?.isDefaultConstructor ?? false) && element.allSupertypes.any( - (s) => s.getDisplayString(withNullability: true) == w, + (s) => s.getDisplayString() == w, ); } else if (element is FunctionElement) { - final firstParam = element.parameters.firstOrNull?.type - .getDisplayString(withNullability: false); + final firstParam = + element.parameters.firstOrNull?.type.getDisplayString(); return element.parameters.length <= 1 && (firstParam == null || firstParam == bc) && - element.returnType.getDisplayString(withNullability: true) == w; + element.returnType.getDisplayString() == w; } else { return false; } @@ -135,8 +135,7 @@ ${a(refer(scenarioName, _playbookUrl))}( .where((e) => e.isPublic && e.parameters.isEmpty) .expand( (e) { - final returnTypeString = - e.returnType.getDisplayString(withNullability: true); + final returnTypeString = e.returnType.getDisplayString(); final scenarioRefer = refer(e.displayName, uri); if (returnTypeString == 'Scenario') { return [scenarioRefer([]).code];