diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dce2b1e..664fd01 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,17 +2,18 @@ name: CI on: push: - branches: [main] + branches: ['*'] paths-ignore: - '**/README.md' - pull_request: - branches: [main] + - 'metadata/**/*' + # pull_request: + # branches: [main] workflow_dispatch: jobs: test: - name: flutter build + name: flutter analyze runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -22,9 +23,9 @@ jobs: java-version: "11" - uses: subosito/flutter-action@v2 with: - flutter-version: "3.12.2" + flutter-version: "3.13.2" - run: flutter pub get - - run: flutter format --set-exit-if-changed . + - run: dart format --set-exit-if-changed . - run: flutter analyze # TODO: enable when tests are in place # - run: flutter test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 08cfec6..c280781 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,7 @@ jobs: java-version: "11" - uses: subosito/flutter-action@v2 with: - flutter-version: "3.12.2" + flutter-version: "3.13.2" - run: flutter pub get - run: flutter analyze - run: flutter build apk --release diff --git a/lib/main.dart b/lib/main.dart index e150860..238aa54 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -273,10 +273,10 @@ class _MyHomePageState extends State { var rawBytes = response.bodyBytes; try { return utf8.decode(rawBytes); - } catch (_) { } + } catch (_) {} try { return (await CharsetDetector.autoDecode(rawBytes)).string; - } catch (_) { } + } catch (_) {} if (response.headers.containsKey("content-type")) { String ct = response.headers["content-type"]!; if (ct.contains("charset")) { @@ -286,4 +286,4 @@ class _MyHomePageState extends State { } throw Exception("Could not get text from the specified URL"); } -} \ No newline at end of file +}