Skip to content

Commit

Permalink
Merge pull request #67 from jemisgoti/main
Browse files Browse the repository at this point in the history
Code analysis workflow added
  • Loading branch information
alnitak authored Mar 23, 2024
2 parents 907a539 + 56367e7 commit decd414
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 3 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/analyze.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Flutter Analyze

on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
build:
name: Analyze code and requirements
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'

- name: Verify Flutter installation
run: flutter doctor

- name: Check pub dependencies
run: flutter pub get

- name: "Run Dart Analyze"
uses: invertase/github-action-dart-analyzer@v3
with:
fatal-infos: true
fatal-warnings: true
annotate: true
working-directory: lib/

- name: Check Code formatting
run: dart format -o none --set-exit-if-changed .

- name: Check pub.dev requirements
run: flutter pub publish --dry-run

- name: Block merge if checks fail
if: ${{ failure() }}
run: echo "Checks failed, cannot merge." && exit 1
8 changes: 6 additions & 2 deletions example/lib/controls.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ class _ControlsState extends State<Controls> {
}
}
widget.onCaptureToggle?.call(choosenCaptureDeviceId);
setState(() {}); /// just change button color
setState(() {});

/// just change button color
},
style: buttonStyle(SoLoudCapture.instance.isCaptureStarted()),
child: const Text('capture'),
Expand All @@ -83,7 +85,9 @@ class _ControlsState extends State<Controls> {
onItemTapped: (index, controller) {
controller.closeMenu!();
widget.onDeviceIdChanged?.call(choosenCaptureDeviceId);
setState(() {}); /// just to rebuild [lazyItems]
setState(() {});

/// just to rebuild [lazyItems]
},
lazyItems: captureDeviceList,
child: const Chip(
Expand Down
2 changes: 1 addition & 1 deletion example/lib/visualizer/visualizer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class _VisualizerState extends State<Visualizer>

widget.controller.isCaptureStarted =
SoLoudCapture.instance.isCaptureStarted();

widget.controller.addListener(() {
ticker.stop();
setupBitmapSize();
Expand Down

0 comments on commit decd414

Please sign in to comment.