From 4d67572868a5c36bb2c4c22c13c8002be019c365 Mon Sep 17 00:00:00 2001 From: Eric Windmill Date: Thu, 5 Sep 2024 10:49:36 -0400 Subject: [PATCH 1/9] Disable scorecard analysis (#2430) Removes scorecard analysis workflow, as it requires maintenance that the EngProd team was doing, and it isn't being used in the README anyway. --- .github/workflows/scorecards-analysis.yml | 55 ----------------------- 1 file changed, 55 deletions(-) delete mode 100644 .github/workflows/scorecards-analysis.yml diff --git a/.github/workflows/scorecards-analysis.yml b/.github/workflows/scorecards-analysis.yml deleted file mode 100644 index 0c96a21be..000000000 --- a/.github/workflows/scorecards-analysis.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: Scorecards supply-chain security -on: - # Only the default branch is supported. - branch_protection_rule: - push: - branches: [ main ] - -# Declare default permissions as read only. -permissions: read-all - -jobs: - analysis: - name: Scorecards analysis - runs-on: ubuntu-latest - if: ${{ github.repository == 'flutter/samples' }} - permissions: - # Needed to upload the results to code-scanning dashboard. - security-events: write - actions: read - contents: read - id-token: write - - steps: - - name: "Checkout code" - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - with: - persist-credentials: false - - - name: "Run analysis" - uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 - with: - results_file: results.sarif - results_format: sarif - # Read-only PAT token. To create it, - # follow the steps in https://github.com/ossf/scorecard-action#pat-token-creation. - repo_token: ${{ secrets.SCORECARD_READ_TOKEN }} - # Publish the results to enable scorecard badges. For more details, see - # https://github.com/ossf/scorecard-action#publishing-results. - # For private repositories, `publish_results` will automatically be set to `false`, - # regardless of the value entered here. - publish_results: true - - # Upload the results as artifacts (optional). - - name: "Upload artifact" - uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 - with: - name: SARIF file - path: results.sarif - retention-days: 5 - - # Upload the results to GitHub's code scanning dashboard. - - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@4dd16135b69a43b6c8efb853346f8437d92d3c93 - with: - sarif_file: results.sarif From d78f4e0b51bc1dc7c379169da6273ddcfd86d434 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 06:36:39 +0000 Subject: [PATCH 2/9] Bump jasmine-core from 5.2.0 to 5.3.0 in /web_embedding/ng-flutter (#2432) Bumps [jasmine-core](https://github.com/jasmine/jasmine) from 5.2.0 to 5.3.0.
Release notes

Sourced from jasmine-core's releases.

v5.3.0

Please see the release notes.

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=jasmine-core&package-manager=npm_and_yarn&previous-version=5.2.0&new-version=5.3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- web_embedding/ng-flutter/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_embedding/ng-flutter/package.json b/web_embedding/ng-flutter/package.json index dc25acc8e..449a39b9c 100644 --- a/web_embedding/ng-flutter/package.json +++ b/web_embedding/ng-flutter/package.json @@ -30,7 +30,7 @@ "@angular/cli": "~18.2.0", "@angular/compiler-cli": "^18.0.1", "@types/jasmine": "~5.1.0", - "jasmine-core": "~5.2.0", + "jasmine-core": "~5.3.0", "karma": "~6.4.2", "karma-chrome-launcher": "~3.2.0", "karma-coverage": "~2.2.0", From 76e9632bbb4d95e17ce0c509a1700a153554db57 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 07:28:32 +0000 Subject: [PATCH 3/9] Bump ffigen from 13.0.0 to 14.0.0 in /experimental/pedometer (#2433) Bumps [ffigen](https://github.com/dart-lang/native/tree/main/pkgs) from 13.0.0 to 14.0.0.
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ffigen&package-manager=pub&previous-version=13.0.0&new-version=14.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- experimental/pedometer/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/experimental/pedometer/pubspec.yaml b/experimental/pedometer/pubspec.yaml index fef058d7f..466939435 100644 --- a/experimental/pedometer/pubspec.yaml +++ b/experimental/pedometer/pubspec.yaml @@ -14,7 +14,7 @@ dependencies: ffi: ^2.1.2 dev_dependencies: - ffigen: ^13.0.0 + ffigen: ^14.0.0 jnigen: ^0.11.0 flutter_test: sdk: flutter From 578477a32960114737537a4f59d696667d7af1ce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Sep 2024 07:29:21 +0000 Subject: [PATCH 4/9] Bump actions/setup-java from 4.2.2 to 4.3.0 (#2434) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/setup-java](https://github.com/actions/setup-java) from 4.2.2 to 4.3.0.
Release notes

Sourced from actions/setup-java's releases.

v4.3.0

What's Changed

steps:
 - name: Checkout
   uses: actions/checkout@v4
 - name: Setup-java
   uses: actions/setup-java@v4
   with:
     distribution: ‘sapmachine’
     java-version: ’21’

Bug fixes :

  • Fix typos on Corretto by @johnshajiang in [#666](https://github.com/actions/setup-java/issues/666)
    
  • IBM Semeru Enhancement on arm64 by @mahabaleshwars in [#677](https://github.com/actions/setup-java/issues/677)
    
  • Resolve Basic Validation Check Failures by @aparnajyothi-y
 in [#682](https://github.com/actions/setup-java/issues/682)
    

New Contributors :

  • @johnshajiang made their first contribution in [#666](https://github.com/actions/setup-java/issues/666)
    
  • @Shegox made their first contribution in [#614](https://github.com/actions/setup-java/issues/614)
    

Full Changelog: https://github.com/actions/setup-java/compare/v4...v4.3.0

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/setup-java&package-manager=github_actions&previous-version=4.2.2&new-version=4.3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- .github/workflows/beta.yml | 6 +++--- .github/workflows/main.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/beta.yml b/.github/workflows/beta.yml index 4f859fbfe..f9e74bf01 100644 --- a/.github/workflows/beta.yml +++ b/.github/workflows/beta.yml @@ -27,7 +27,7 @@ jobs: os: [ubuntu-latest, macos-latest, windows-latest] steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - - uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 + - uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88 with: distribution: 'zulu' java-version: '17' @@ -43,7 +43,7 @@ jobs: # if: github.repository == 'flutter/samples' # steps: # - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - # - uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 + # - uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88 # with: # distribution: 'zulu' # java-version: '17' @@ -59,7 +59,7 @@ jobs: if: github.repository == 'flutter/samples' steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - - uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 + - uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88 with: distribution: 'zulu' java-version: '17' diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 808c18581..c10b7f936 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,7 +28,7 @@ jobs: os: [ubuntu-latest, macos-latest, windows-latest] steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - - uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 + - uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88 with: distribution: 'zulu' java-version: '17' @@ -53,7 +53,7 @@ jobs: # if: github.repository == 'flutter/samples' # steps: # - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - # - uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 + # - uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88 # with: # distribution: 'zulu' # java-version: '17' @@ -67,7 +67,7 @@ jobs: if: github.repository == 'flutter/samples' steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - - uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 + - uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88 with: distribution: 'zulu' java-version: '17' From cdd2a427d18ea49dc88accefbe043f05a0a4e8e3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 07:19:22 +0000 Subject: [PATCH 5/9] Bump typescript from 5.5.4 to 5.6.2 in /web_embedding/ng-flutter (#2439) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.5.4 to 5.6.2.
Release notes

Sourced from typescript's releases.

TypeScript 5.6

For release notes, check out the release announcement.

For the complete list of fixed issues, check out the

Downloads are available on:

TypeScript 5.6 RC

For release notes, check out the release announcement.

For the complete list of fixed issues, check out the

Downloads are available on:

TypeScript 5.6 Beta

For release notes, check out the release announcement.

For the complete list of fixed issues, check out the

Downloads are available on:

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=typescript&package-manager=npm_and_yarn&previous-version=5.5.4&new-version=5.6.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- web_embedding/ng-flutter/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_embedding/ng-flutter/package.json b/web_embedding/ng-flutter/package.json index 449a39b9c..0b2fcb43f 100644 --- a/web_embedding/ng-flutter/package.json +++ b/web_embedding/ng-flutter/package.json @@ -36,7 +36,7 @@ "karma-coverage": "~2.2.0", "karma-jasmine": "~5.1.0", "karma-jasmine-html-reporter": "~2.1.0", - "typescript": "~5.5.3" + "typescript": "~5.6.2" }, "sideEffects": false } From 78d3ea47c951f839b29e3e7d6f1e4df658564106 Mon Sep 17 00:00:00 2001 From: James Williams <66931+jwill@users.noreply.github.com> Date: Fri, 20 Sep 2024 14:34:12 -0400 Subject: [PATCH 6/9] m3_demo - Enables edge to edge support. (#2441) Edge to edge is coming by default to Flutter 3.26+ (or thereabouts) when the targetSdk is raised to Android 15(API 35). In the meantime, it can be done manually by adjusting the theme and setting `WindowCompat.setDecorFitsSystemWindows`. The fix is purely on the Android side. iOS is unaffected. Sourced from https://developer.android.com/develop/ui/views/layout/edge-to-edge-manually Fixes #1720 . ## Pre-launch Checklist - [X] I read the [Flutter Style Guide] _recently_, and have followed its advice. - [X] I signed the [CLA]. - [X] I read the [Contributors Guide]. - [X] I updated/added relevant documentation (doc comments with `///`). - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-devrel channel on [Discord]. [Flutter Style Guide]: https://github.com/flutter/flutter/blob/master/docs/contributing/Style-guide-for-Flutter-repo.md [CLA]: https://cla.developers.google.com/ [Discord]: https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md [Contributors Guide]: https://github.com/flutter/samples/blob/main/CONTRIBUTING.md --- .../com/example/material_3_demo/MainActivity.kt | 8 ++++++++ .../android/app/src/main/res/values/styles.xml | 14 ++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/material_3_demo/android/app/src/main/kotlin/com/example/material_3_demo/MainActivity.kt b/material_3_demo/android/app/src/main/kotlin/com/example/material_3_demo/MainActivity.kt index db3a75c76..738e2951e 100644 --- a/material_3_demo/android/app/src/main/kotlin/com/example/material_3_demo/MainActivity.kt +++ b/material_3_demo/android/app/src/main/kotlin/com/example/material_3_demo/MainActivity.kt @@ -1,6 +1,14 @@ package com.example.material_3_demo import io.flutter.embedding.android.FlutterActivity +import android.os.Bundle +import androidx.core.view.WindowCompat class MainActivity: FlutterActivity() { + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + WindowCompat.setDecorFitsSystemWindows(window, false) + } + } diff --git a/material_3_demo/android/app/src/main/res/values/styles.xml b/material_3_demo/android/app/src/main/res/values/styles.xml index cb1ef8805..e0ae24bde 100644 --- a/material_3_demo/android/app/src/main/res/values/styles.xml +++ b/material_3_demo/android/app/src/main/res/values/styles.xml @@ -14,5 +14,19 @@ This Theme is only used starting with V2 of Flutter's Android embedding. --> From f53b6df9f1f6daea907b16e3abc9ba87ad4aff5a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Sep 2024 07:09:04 +0000 Subject: [PATCH 7/9] Bump flutter_launcher_icons from 0.13.1 to 0.14.0 in /veggieseasons (#2442) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [flutter_launcher_icons](https://github.com/fluttercommunity/flutter_launcher_icons) from 0.13.1 to 0.14.0.
Release notes

Sourced from flutter_launcher_icons's releases.

v0.14.0

What's Changed

New Contributors

Full Changelog: https://github.com/fluttercommunity/flutter_launcher_icons/compare/v0.13.1...v0.14.0

Changelog

Sourced from flutter_launcher_icons's changelog.

0.14.0 (21st September 2024)

  • Android: Support for monochrome icons #563

Before

Now

  • Android: Ability to set inset for adaptive icon foreground and monochrome icon #563
  • iOS: Dark and Tinted icons for iOS 18+ #569
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=flutter_launcher_icons&package-manager=pub&previous-version=0.13.1&new-version=0.14.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- veggieseasons/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/veggieseasons/pubspec.yaml b/veggieseasons/pubspec.yaml index 0ad5784d6..35b83357e 100644 --- a/veggieseasons/pubspec.yaml +++ b/veggieseasons/pubspec.yaml @@ -29,7 +29,7 @@ dev_dependencies: path: ../analysis_defaults flutter_test: sdk: flutter - flutter_launcher_icons: ^0.13.0 + flutter_launcher_icons: ^0.14.0 flutter: assets: From c83e8c77b05884e4753ebfd3dd924c93c4302dcd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Sep 2024 07:37:30 +0000 Subject: [PATCH 8/9] Bump flutter_launcher_icons from 0.13.1 to 0.14.0 in /game_template (#2443) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [flutter_launcher_icons](https://github.com/fluttercommunity/flutter_launcher_icons) from 0.13.1 to 0.14.0.
Release notes

Sourced from flutter_launcher_icons's releases.

v0.14.0

What's Changed

New Contributors

Full Changelog: https://github.com/fluttercommunity/flutter_launcher_icons/compare/v0.13.1...v0.14.0

Changelog

Sourced from flutter_launcher_icons's changelog.

0.14.0 (21st September 2024)

  • Android: Support for monochrome icons #563

Before

Now

  • Android: Ability to set inset for adaptive icon foreground and monochrome icon #563
  • iOS: Dark and Tinted icons for iOS 18+ #569
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=flutter_launcher_icons&package-manager=pub&previous-version=0.13.1&new-version=0.14.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- game_template/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game_template/pubspec.yaml b/game_template/pubspec.yaml index 2d960716f..84ba04fff 100644 --- a/game_template/pubspec.yaml +++ b/game_template/pubspec.yaml @@ -33,7 +33,7 @@ dev_dependencies: flutter_lints: ^4.0.0 flutter_test: sdk: flutter - flutter_launcher_icons: ^0.13.0 + flutter_launcher_icons: ^0.14.0 test: ^1.19.0 flutter: From a7df23f2efb704975b0767dd9cbca906aab40abc Mon Sep 17 00:00:00 2001 From: James Williams <66931+jwill@users.noreply.github.com> Date: Mon, 23 Sep 2024 11:44:03 -0700 Subject: [PATCH 9/9] Improve color display in M3 Demo (#2438) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Added the color scheme schematic from Material Theme Builder aligning how colors are displayed here and in documentation across Android and Figma. - On desktop, individual colors can be copied to the clipboard - View adapts from the existing single column view to the new schematic at 500dp width. ### Before: Screenshot 2024-09-12 at 2 40 15 PM ### After: ![mobile](https://github.com/user-attachments/assets/43a7bfbd-6217-4d3f-a1d6-902c99260905) ![Screenshot_20240912_144150](https://github.com/user-attachments/assets/48df7ad4-44a1-4802-8dac-06006dfb6bb1) ## Pre-launch Checklist - [x] I read the [Flutter Style Guide] _recently_, and have followed its advice. - [x] I signed the [CLA]. - [x] I read the [Contributors Guide]. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-devrel channel on [Discord]. [Flutter Style Guide]: https://github.com/flutter/flutter/blob/master/docs/contributing/Style-guide-for-Flutter-repo.md [CLA]: https://cla.developers.google.com/ [Discord]: https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md [Contributors Guide]: https://github.com/flutter/samples/blob/main/CONTRIBUTING.md --------- Co-authored-by: Eric Windmill --- material_3_demo/lib/color_box.dart | 93 ++++ .../lib/color_palettes_screen.dart | 45 +- material_3_demo/lib/scheme.dart | 417 ++++++++++++++++++ material_3_demo/lib/typography_screen.dart | 2 +- material_3_demo/test/color_screen_test.dart | 3 +- tool/flutter_ci_script_beta.sh | 3 +- tool/flutter_ci_script_master.sh | 3 +- 7 files changed, 540 insertions(+), 26 deletions(-) create mode 100644 material_3_demo/lib/color_box.dart create mode 100644 material_3_demo/lib/scheme.dart diff --git a/material_3_demo/lib/color_box.dart b/material_3_demo/lib/color_box.dart new file mode 100644 index 000000000..e150d18ab --- /dev/null +++ b/material_3_demo/lib/color_box.dart @@ -0,0 +1,93 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class ColorBox extends StatefulWidget { + const ColorBox( + {super.key, + required this.label, + required this.tone, + required this.color, + required this.onColor, + required this.height, + required this.width, + this.displayPaletteInfo = false}); + + final String label; + final String tone; + final Color color, onColor; + final double height, width; + final bool displayPaletteInfo; + + @override + State createState() => _ColorBoxState(); +} + +class _ColorBoxState extends State { + bool hovered = false; + + @override + Widget build(BuildContext context) { + final fonts = Theme.of(context).textTheme; + return MouseRegion( + onEnter: (_) { + if (mounted) setState(() => hovered = true); + }, + onExit: (_) { + if (mounted) setState(() => hovered = false); + }, + child: Container( + color: widget.color, + height: widget.height, + width: widget.width, + child: DefaultTextStyle( + style: fonts.labelSmall!.copyWith(color: widget.onColor), + child: Stack( + children: [ + Positioned( + top: 10, + left: 10, + child: Text(widget.label), + ), + Positioned( + bottom: 10, + right: 10, + child: Text(widget.displayPaletteInfo ? widget.tone : ''), + ), + if (hovered) + Positioned( + top: 0, + right: 0, + child: IconButton( + padding: EdgeInsets.zero, + color: widget.onColor, + tooltip: 'Copy hex color', + icon: const Icon(Icons.copy, size: 24), + onPressed: () async { + final messenger = ScaffoldMessenger.of(context); + // Copy color as hex to clipboard + String hex = '#'; + final c = widget.color; + // Will change from int 0-255 to double 0.0-1.0 in 3.26+ + // The properties also change from red/green/blue to r/g/b + // hex += (c.[r g b] * 255.0).round().toRadixString(16).padLeft(2, '0'); + hex += c.red.toRadixString(16).padLeft(2, '0'); + hex += c.green.toRadixString(16).padLeft(2, '0'); + hex += c.blue.toRadixString(16).padLeft(2, '0'); + final data = ClipboardData(text: hex); + await Clipboard.setData(data); + messenger.hideCurrentSnackBar(); + messenger.showSnackBar( + SnackBar( + content: Text('Copied $hex to clipboard'), + ), + ); + }, + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/material_3_demo/lib/color_palettes_screen.dart b/material_3_demo/lib/color_palettes_screen.dart index a3462c454..56aca010c 100644 --- a/material_3_demo/lib/color_palettes_screen.dart +++ b/material_3_demo/lib/color_palettes_screen.dart @@ -4,6 +4,7 @@ import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; +import 'package:material_3_demo/scheme.dart'; import 'package:url_launcher/url_launcher.dart'; const Widget divider = SizedBox(height: 10); @@ -11,7 +12,7 @@ const Widget divider = SizedBox(height: 10); // If screen content width is greater or equal to this value, the light and dark // color schemes will be displayed in a column. Otherwise, they will // be displayed in a row. -const double narrowScreenWidthThreshold = 400; +const double narrowScreenWidthThreshold = 500; class ColorPalettesScreen extends StatelessWidget { const ColorPalettesScreen({super.key}); @@ -94,32 +95,32 @@ class ColorPalettesScreen extends StatelessWidget { ), ); } else { + Color seed = Theme.of(context).colorScheme.primary; + ColorScheme lightScheme = ColorScheme.fromSeed( + seedColor: seed, brightness: Brightness.light); + ColorScheme darkScheme = ColorScheme.fromSeed( + seedColor: seed, brightness: Brightness.dark); return SingleChildScrollView( child: Padding( - padding: const EdgeInsets.only(top: 5), + padding: const EdgeInsets.all(8), child: Column( children: [ - dynamicColorNotice(), - Row( - children: [ - Expanded( - child: Column( - children: [ - schemeLabel('Light ColorScheme'), - schemeView(lightTheme), - ], - ), - ), - Expanded( - child: Column( - children: [ - schemeLabel('Dark ColorScheme'), - schemeView(darkTheme), - ], - ), - ), - ], + SchemePreview( + label: "Light ColorScheme", + scheme: lightScheme, + brightness: Brightness.light, + contrast: 1.0, + colorMatch: false, ), + const SizedBox(height: 16), + SchemePreview( + label: "Dark ColorScheme", + scheme: darkScheme, + brightness: Brightness.dark, + contrast: 1.0, + colorMatch: false, + ), + const SizedBox(height: 16), ], ), ), diff --git a/material_3_demo/lib/scheme.dart b/material_3_demo/lib/scheme.dart new file mode 100644 index 000000000..4cb30045b --- /dev/null +++ b/material_3_demo/lib/scheme.dart @@ -0,0 +1,417 @@ +import 'package:flutter/material.dart'; + +import '../color_box.dart'; + +class SchemePreview extends StatefulWidget { + const SchemePreview({ + super.key, + required this.label, + required this.scheme, + required this.brightness, + required this.colorMatch, + required this.contrast, + }); + + final String label; + final ColorScheme scheme; + final Brightness brightness; + final bool colorMatch; + final double contrast; + + @override + State createState() => _SchemePreviewState(); +} + +class _SchemePreviewState extends State { + @override + Widget build(BuildContext context) { + final theme = Theme.of(context); + final fonts = theme.textTheme; + final colors = theme.colorScheme; + final dark = widget.brightness == Brightness.dark; + + final scheme = widget.scheme; + + return Theme( + data: theme.copyWith(colorScheme: scheme), + child: FittedBox( + fit: BoxFit.fitWidth, + child: Container( + width: 902, + decoration: BoxDecoration( + color: scheme.surface, + borderRadius: BorderRadius.circular(12), + border: Border.all( + color: theme.brightness == widget.brightness + ? colors.outlineVariant + : Colors.transparent, + ), + ), + padding: const EdgeInsets.only( + top: 16, + left: 16, + right: 16, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Expanded( + child: Text( + widget.label, + style: fonts.titleMedium!.copyWith( + color: scheme.onSurface, + fontWeight: FontWeight.bold, + ), + textAlign: TextAlign.start, + ), + ), + ], + ), + const SizedBox(height: 20), + Row( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Column( + mainAxisSize: MainAxisSize.min, + children: [ + Row( + mainAxisSize: MainAxisSize.min, + children: [ + Column( + mainAxisSize: MainAxisSize.min, + children: [ + ColorBox( + label: 'Primary', + tone: dark ? 'P-80' : 'P-40', + color: scheme.primary, + onColor: scheme.onPrimary, + height: 87, + width: 208, + ), + ColorBox( + label: 'On Primary', + tone: dark ? 'P-20' : 'P-100', + color: scheme.onPrimary, + onColor: scheme.primary, + height: 40, + width: 208, + ), + const SizedBox(height: 5), + ColorBox( + label: 'Primary Container', + tone: dark ? 'P-30' : 'P-90', + color: scheme.primaryContainer, + onColor: scheme.onPrimaryContainer, + height: 87, + width: 208, + ), + ColorBox( + label: 'On Primary Container', + tone: dark ? 'P-90' : 'P-10', + color: scheme.onPrimaryContainer, + onColor: scheme.primaryContainer, + height: 40, + width: 208, + ), + ], + ), + const SizedBox(width: 5), + Column( + mainAxisSize: MainAxisSize.min, + children: [ + ColorBox( + label: 'Secondary', + tone: dark ? 'S-80' : 'S-40', + color: scheme.secondary, + onColor: scheme.onSecondary, + height: 87, + width: 208, + ), + ColorBox( + label: 'On Secondary', + tone: dark ? 'S-20' : 'S-100', + color: scheme.onSecondary, + onColor: scheme.secondary, + height: 40, + width: 208, + ), + const SizedBox(height: 5), + ColorBox( + label: 'Secondary Container', + tone: dark ? 'S-30' : 'S-90', + color: scheme.secondaryContainer, + onColor: scheme.onSecondaryContainer, + height: 87, + width: 208, + ), + ColorBox( + label: 'On Secondary Container', + tone: dark ? 'S-90' : 'S-10', + color: scheme.onSecondaryContainer, + onColor: scheme.secondaryContainer, + height: 40, + width: 208, + ), + ], + ), + const SizedBox(width: 5), + Column( + mainAxisSize: MainAxisSize.min, + children: [ + ColorBox( + label: 'Tertiary', + tone: dark ? 'T-80' : 'T-40', + color: scheme.tertiary, + onColor: scheme.onTertiary, + height: 87, + width: 208, + ), + ColorBox( + label: 'On Tertiary', + tone: dark ? 'T-20' : 'T-100', + color: scheme.onTertiary, + onColor: scheme.tertiary, + height: 40, + width: 208, + ), + const SizedBox(height: 5), + ColorBox( + label: 'Tertiary Container', + tone: dark ? 'T-30' : 'T-90', + color: scheme.tertiaryContainer, + onColor: scheme.onTertiaryContainer, + height: 87, + width: 208, + ), + ColorBox( + label: 'On Tertiary Container', + tone: dark ? 'T-90' : 'T-10', + color: scheme.onTertiaryContainer, + onColor: scheme.tertiaryContainer, + height: 40, + width: 208, + ), + ], + ), + ], + ), + const SizedBox(height: 20), + Row( + mainAxisSize: MainAxisSize.min, + children: [ + ColorBox( + label: 'Surface Dim', + tone: dark ? 'N-6' : 'N-87', + color: scheme.surfaceDim, + onColor: scheme.onSurface, + height: 105, + width: 211.45, + ), + ColorBox( + label: 'Surface', + tone: dark ? 'N-6' : 'N-98', + color: scheme.surface, + onColor: scheme.onSurface, + height: 105, + width: 211.45, + ), + ColorBox( + label: 'Surface Bright', + tone: dark ? 'N-24' : 'N-98', + color: scheme.surfaceBright, + onColor: scheme.onSurface, + height: 105, + width: 211.45, + ), + ], + ), + const SizedBox(height: 5), + Row( + mainAxisSize: MainAxisSize.min, + children: [ + ColorBox( + label: 'Surf. Container\nLowest', + tone: dark ? 'N-4' : 'N-100', + color: scheme.surfaceContainerLowest, + onColor: scheme.onSurface, + height: 105, + width: 126.87, + ), + ColorBox( + label: 'Surf. Container\nLow', + tone: dark ? 'N-10' : 'N-96', + color: scheme.surfaceContainerLow, + onColor: scheme.onSurface, + height: 105, + width: 126.87, + ), + ColorBox( + label: 'Surf. Container', + tone: dark ? 'N-12' : 'N-94', + color: scheme.surfaceContainer, + onColor: scheme.onSurface, + height: 105, + width: 126.87, + ), + ColorBox( + label: 'Surf. Container\nHigh', + tone: dark ? 'N-17' : 'N-92', + color: scheme.surfaceContainerHigh, + onColor: scheme.onSurface, + height: 105, + width: 126.87, + ), + ColorBox( + label: 'Surf. Container\nHighest', + tone: dark ? 'N-24' : 'N-90', + color: scheme.surfaceContainerHighest, + onColor: scheme.onSurface, + height: 105, + width: 126.87, + ), + ], + ), + const SizedBox(height: 5), + Row( + mainAxisSize: MainAxisSize.min, + children: [ + ColorBox( + label: 'On Surface', + tone: dark ? 'N-90' : 'N-10', + color: scheme.onSurface, + onColor: scheme.surface, + height: 40, + width: 158.59, + ), + ColorBox( + label: 'On Surface Var.', + tone: dark ? 'NV-90' : 'NV-30', + color: scheme.onSurfaceVariant, + onColor: scheme.surfaceContainerHighest, + height: 40, + width: 158.59, + ), + ColorBox( + label: 'Outline', + tone: dark ? 'NV-60' : 'NV-50', + color: scheme.outline, + onColor: scheme.surface, + height: 40, + width: 158.59, + ), + ColorBox( + label: 'Outline Variant', + tone: dark ? 'NV-30' : 'NV-80', + color: scheme.outlineVariant, + onColor: scheme.onSurface, + height: 40, + width: 158.59, + ), + ], + ), + ], + ), + const SizedBox(width: 20), + Column( + mainAxisSize: MainAxisSize.min, + children: [ + ColorBox( + label: 'Error', + tone: dark ? 'E-80' : 'E-40', + color: scheme.error, + onColor: scheme.onError, + height: 87, + width: 208, + ), + ColorBox( + label: 'On Error', + tone: dark ? 'E-20' : 'E-100', + color: scheme.onError, + onColor: scheme.error, + height: 40, + width: 208, + ), + const SizedBox(height: 5), + ColorBox( + label: 'Error Container', + tone: dark ? 'E-30' : 'E-90', + color: scheme.errorContainer, + onColor: scheme.onErrorContainer, + height: 87, + width: 208, + ), + ColorBox( + label: 'On Error Container', + tone: dark ? 'E-90' : 'E-10', + color: scheme.onErrorContainer, + onColor: scheme.errorContainer, + height: 40, + width: 208, + ), + const SizedBox(height: 20), + ColorBox( + label: 'Inverse Surface', + tone: dark ? 'N-90' : 'N-20', + color: scheme.inverseSurface, + onColor: scheme.onInverseSurface, + height: 120, + width: 208, + ), + ColorBox( + label: 'Inverse On Surface', + tone: dark ? 'N-20' : 'N-95', + color: scheme.onInverseSurface, + onColor: scheme.inverseSurface, + height: 40, + width: 208, + ), + const SizedBox(height: 5), + ColorBox( + label: 'Inverse Primary', + tone: dark ? 'P-40' : 'P-80', + color: scheme.inversePrimary, + onColor: scheme.onSurface, + height: 40, + width: 208, + ), + const SizedBox(height: 16), + Row( + mainAxisSize: MainAxisSize.min, + children: [ + ColorBox( + label: 'Scrim', + tone: 'N-0', + color: scheme.scrim, + onColor: Colors.white, + height: 40, + width: 96.31, + ), + const SizedBox(width: 20), + ColorBox( + label: 'Shadow', + tone: 'N-0', + color: scheme.shadow, + onColor: Colors.white, + height: 40, + width: 96.31, + ), + ], + ), + const SizedBox(height: 8), + ], + ), + ], + ), + ], + ), + ), + ), + ); + } +} diff --git a/material_3_demo/lib/typography_screen.dart b/material_3_demo/lib/typography_screen.dart index 6950e9575..08888115b 100644 --- a/material_3_demo/lib/typography_screen.dart +++ b/material_3_demo/lib/typography_screen.dart @@ -15,7 +15,7 @@ class TypographyScreen extends StatelessWidget { return Expanded( child: ListView( children: [ - const SizedBox(height: 7), + const SizedBox(height: 8), TextStyleExample( name: 'Display Large', style: textTheme.displayLarge!), TextStyleExample( diff --git a/material_3_demo/test/color_screen_test.dart b/material_3_demo/test/color_screen_test.dart index 6282bf798..45d8e41eb 100644 --- a/material_3_demo/test/color_screen_test.dart +++ b/material_3_demo/test/color_screen_test.dart @@ -6,6 +6,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:material_3_demo/color_palettes_screen.dart'; import 'package:material_3_demo/main.dart'; +import 'package:material_3_demo/scheme.dart'; import 'component_screen_test.dart'; @@ -69,6 +70,6 @@ void main() { )); expect(find.text('Light ColorScheme'), findsOneWidget); expect(find.text('Dark ColorScheme'), findsOneWidget); - expect(find.byType(ColorGroup, skipOffstage: false), findsNWidgets(18)); + expect(find.byType(SchemePreview, skipOffstage: false), findsNWidgets(2)); }); } diff --git a/tool/flutter_ci_script_beta.sh b/tool/flutter_ci_script_beta.sh index 3ff79879f..2d15ba518 100755 --- a/tool/flutter_ci_script_beta.sh +++ b/tool/flutter_ci_script_beta.sh @@ -46,7 +46,8 @@ declare -ar PROJECT_NAMES=( "infinite_list" "ios_app_clip" "isolate_example" - "material_3_demo" +# TODO @ewindmill -- Color.red is deprecated and should be Color.r (same for green and blue) +# "material_3_demo" "navigation_and_routing" "place_tracker" "platform_channels" diff --git a/tool/flutter_ci_script_master.sh b/tool/flutter_ci_script_master.sh index ccaf11d57..d00d720e1 100755 --- a/tool/flutter_ci_script_master.sh +++ b/tool/flutter_ci_script_master.sh @@ -47,7 +47,8 @@ declare -ar PROJECT_NAMES=( "infinite_list" "ios_app_clip" "isolate_example" - "material_3_demo" +# TODO @ewindmill -- Color.red is deprecated and should be Color.r (same for green and blue) +# "material_3_demo" "navigation_and_routing" "place_tracker" "platform_channels"