Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
guidezpl authored May 1, 2024
2 parents f2fddb3 + 735d55f commit 9873fd0
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
flutter-channel: [stable, beta]
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- name: Install Flutter
uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 # v2.12.0
uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 # v2.16.0
with:
channel: ${{ matrix.flutter-channel }}
cache: true
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/deploy_github_pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
outputs:
example-apps: ${{ steps.find-example-apps.outputs.example-apps }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- run: man ls
- name: Find example apps
id: find-example-apps
Expand All @@ -42,8 +42,8 @@ jobs:
matrix:
package: ${{ fromJson(needs.find-example-apps.outputs.example-apps) }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 # v2.12.0
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 # v2.16.0
with:
channel: 'stable'

Expand All @@ -52,7 +52,7 @@ jobs:
working-directory: packages/${{ matrix.package }}/example

- name: Upload web build temporarily
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: ${{ matrix.package }}
path: /tmp/${{ matrix.package }}
Expand All @@ -64,7 +64,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download all web builds
uses: actions/download-artifact@87c55149d96e628cc2ef7e6fc2aab372015aec85 # v4.1.3
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7

- name: Upload pages artifact
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
Expand All @@ -83,8 +83,8 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Setup Pages
uses: actions/configure-pages@1f0c5cde4bc74cd7e1254d0cb4de8d49e9068c7d # v4.0.0
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@decdde0ac072f6dcbe43649d82d9c635fff5b4e4 # v4.0.4
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
6 changes: 3 additions & 3 deletions .github/workflows/google_fonts_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
pull-requests: write
actions: write # Required for the cancel action
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Clone Flutter repository with beta channel
uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 # v1.5.3
uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 # v1.5.3
with:
channel: beta
cache: true
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
shell: bash
if: steps.get_families_diff.outputs.result == ''

- uses: peter-evans/create-pull-request@a4f52f8033a6168103c2538976c07b467e8163bc # v6.0.1
- uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6.0.5
with:
token: ${{ secrets.MATERIAL_ROBOT_TOKEN }}
committer: material-robot <[email protected]>
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

steps:
- name: "Checkout code"
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
persist-credentials: false

Expand All @@ -59,14 +59,14 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
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@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6
uses: github/codeql-action/upload-sarif@d39d31e687223d841ef683f52467bd88e9b21c14 # v3.25.3
with:
sarif_file: results.sarif
22 changes: 16 additions & 6 deletions packages/dynamic_color/lib/src/dynamic_color_builder.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:material_color_utilities/material_color_utilities.dart';
Expand Down Expand Up @@ -63,15 +64,19 @@ class DynamicColorBuilderState extends State<DynamicColorBuilder> {
if (!mounted) return;

if (corePalette != null) {
debugPrint('dynamic_color: Core palette detected.');
if (kDebugMode) {
debugPrint('dynamic_color: Core palette detected.');
}
setState(() {
_light = corePalette.toColorScheme();
_dark = corePalette.toColorScheme(brightness: Brightness.dark);
});
return;
}
} on PlatformException {
debugPrint('dynamic_color: Failed to obtain core palette.');
if (kDebugMode) {
debugPrint('dynamic_color: Failed to obtain core palette.');
}
}

try {
Expand All @@ -81,7 +86,9 @@ class DynamicColorBuilderState extends State<DynamicColorBuilder> {
if (!mounted) return;

if (accentColor != null) {
debugPrint('dynamic_color: Accent color detected.');
if (kDebugMode) {
debugPrint('dynamic_color: Accent color detected.');
}
setState(() {
_light = ColorScheme.fromSeed(
seedColor: accentColor,
Expand All @@ -95,10 +102,13 @@ class DynamicColorBuilderState extends State<DynamicColorBuilder> {
return;
}
} on PlatformException {
debugPrint('dynamic_color: Failed to obtain accent color.');
if (kDebugMode) {
debugPrint('dynamic_color: Failed to obtain accent color.');
}
}
if (kDebugMode) {
debugPrint('dynamic_color: Dynamic color not detected on this device.');
}

debugPrint('dynamic_color: Dynamic color not detected on this device.');
}

@override
Expand Down

0 comments on commit 9873fd0

Please sign in to comment.