Skip to content

Commit decd414

Browse files
authored
Merge pull request #67 from jemisgoti/main
Code analysis workflow added
2 parents 907a539 + 56367e7 commit decd414

File tree

3 files changed

+54
-3
lines changed

3 files changed

+54
-3
lines changed

.github/workflows/analyze.yaml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Flutter Analyze
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
name: Analyze code and requirements
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Flutter
21+
uses: subosito/flutter-action@v2
22+
with:
23+
channel: 'stable'
24+
25+
- name: Verify Flutter installation
26+
run: flutter doctor
27+
28+
- name: Check pub dependencies
29+
run: flutter pub get
30+
31+
- name: "Run Dart Analyze"
32+
uses: invertase/github-action-dart-analyzer@v3
33+
with:
34+
fatal-infos: true
35+
fatal-warnings: true
36+
annotate: true
37+
working-directory: lib/
38+
39+
- name: Check Code formatting
40+
run: dart format -o none --set-exit-if-changed .
41+
42+
- name: Check pub.dev requirements
43+
run: flutter pub publish --dry-run
44+
45+
- name: Block merge if checks fail
46+
if: ${{ failure() }}
47+
run: echo "Checks failed, cannot merge." && exit 1

example/lib/controls.dart

+6-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ class _ControlsState extends State<Controls> {
5757
}
5858
}
5959
widget.onCaptureToggle?.call(choosenCaptureDeviceId);
60-
setState(() {}); /// just change button color
60+
setState(() {});
61+
62+
/// just change button color
6163
},
6264
style: buttonStyle(SoLoudCapture.instance.isCaptureStarted()),
6365
child: const Text('capture'),
@@ -83,7 +85,9 @@ class _ControlsState extends State<Controls> {
8385
onItemTapped: (index, controller) {
8486
controller.closeMenu!();
8587
widget.onDeviceIdChanged?.call(choosenCaptureDeviceId);
86-
setState(() {}); /// just to rebuild [lazyItems]
88+
setState(() {});
89+
90+
/// just to rebuild [lazyItems]
8791
},
8892
lazyItems: captureDeviceList,
8993
child: const Chip(

example/lib/visualizer/visualizer.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class _VisualizerState extends State<Visualizer>
124124

125125
widget.controller.isCaptureStarted =
126126
SoLoudCapture.instance.isCaptureStarted();
127-
127+
128128
widget.controller.addListener(() {
129129
ticker.stop();
130130
setupBitmapSize();

0 commit comments

Comments
 (0)