diff --git a/.github/workflows/flutter_ci.yml b/.github/workflows/flutter_ci.yml index 092ed2a..6beaf51 100644 --- a/.github/workflows/flutter_ci.yml +++ b/.github/workflows/flutter_ci.yml @@ -53,6 +53,19 @@ jobs: needs: [ build_apk ] runs-on: ubuntu-latest steps: + - name: Fix npm cache permissions + run: sudo chown -R 65534:0 "/root/.npm" + + - name: Checkout Repository + uses: actions/checkout@v1 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '12' + + - name: Install dependencies + run: npm install - uses: actions/checkout@v1 - name: set up JDK 1.8 uses: actions/setup-java@v1 @@ -63,11 +76,6 @@ jobs: with: name: apk-build - - name: Update Node.js - uses: actions/setup-node@v3 - with: - node-version: '14' - - name: Upload APK uses: wzieba/Firebase-Distribution-Github-Action@v1.0.0 with: diff --git a/components/interface_adapters/lib/src/ui/res/resources.dart b/components/interface_adapters/lib/src/ui/res/resources.dart index db1f773..44ed56e 100644 --- a/components/interface_adapters/lib/src/ui/res/resources.dart +++ b/components/interface_adapters/lib/src/ui/res/resources.dart @@ -1,4 +1,5 @@ import 'package:flutter/widgets.dart'; +import 'package:interface_adapters/src/ui/app/ethical_scanner_app.dart'; import 'package:interface_adapters/src/ui/res/color/gradients.dart'; class Resources extends InheritedWidget { @@ -13,6 +14,11 @@ class Resources extends InheritedWidget { @override bool updateShouldNotify(covariant InheritedWidget oldWidget) => false; + /// Returns the nearest [Resources] widget in the ancestor tree of [context]. + /// + /// This method asserts that the result is not `null`, as we expect the + /// [Resources] widget to be always present in the [EthicalScannerApp]. + /// If the [Resources] widget is not found, a runtime exception is thrown. static Resources of(BuildContext context) => - context.dependOnInheritedWidgetOfExactType(aspect: Resources)!; + context.dependOnInheritedWidgetOfExactType()!; }