Skip to content

Commit c0dd870

Browse files
Update dependencies and add CI workflows
- Update dependencies in pubspec.yaml. - Add Dart analyze workflow (`.github/workflows/analyze.yaml`). - Add Dart format workflow (`.github/workflows/format.yaml`) that creates PRs for formatting changes. - Fix dead code in example. - Ignore .flutter-plugins-dependencies.
1 parent 9732e08 commit c0dd870

File tree

5 files changed

+54
-6
lines changed

5 files changed

+54
-6
lines changed

.github/workflows/analyze.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Analyze
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
analyze:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: subosito/flutter-action@v2
15+
with:
16+
channel: 'stable'
17+
- run: flutter pub get
18+
- run: dart analyze .

.github/workflows/format.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Format
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
types: [opened, synchronize, reopened]
8+
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
13+
jobs:
14+
format:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
ref: ${{ github.head_ref }}
20+
- uses: subosito/flutter-action@v2
21+
with:
22+
channel: 'stable'
23+
- run: dart format lib example
24+
- name: Create Pull Request
25+
uses: peter-evans/create-pull-request@v6
26+
with:
27+
commit-message: 'style: format code'
28+
title: 'style: format code'
29+
body: 'Format code using `dart format`.'
30+
branch: 'format-fix-${{ github.head_ref || github.ref_name }}'
31+
delete-branch: true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ migrate_working_dir/
3131
**/doc/api/
3232
.dart_tool/
3333
build/
34+
.flutter-plugins-dependencies

example/unix_single_instance_example.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,10 @@ void main(List<String> arguments) async {
1818
if (Platform.isLinux) {
1919
if (!await unixSingleInstance(arguments, cmdProcessor)) {
2020
exit(0);
21-
return;
2221
}
2322
} else if (Platform.isMacOS) {
2423
if (!await unixSingleInstance(arguments, cmdProcessor)) {
2524
exit(0);
26-
return;
2725
}
2826
}
2927
}

pubspec.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ environment:
1010
flutter: ">=2.5.0"
1111

1212
dependencies:
13-
args: ^2.4.2
14-
path: ^1.9.0
15-
path_provider: ^2.1.3
13+
args: ^2.7.0
14+
path: ^1.9.1
15+
path_provider: ^2.1.5
1616

1717
dev_dependencies:
18-
lints: ^3.0.0
18+
lints: ^6.0.0
1919

2020
# This package supports only Linux and macOS.
2121
platforms:

0 commit comments

Comments
 (0)