Skip to content

Commit a2d56cf

Browse files
authored
CI: Action - Code Analysis (#93)
* CI: Action - Code Analysis * Fix: Error when analyzing code
1 parent 091db3b commit a2d56cf

File tree

3 files changed

+58
-2
lines changed

3 files changed

+58
-2
lines changed

.github/workflows/code-analysis.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Code Analysis
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
paths-ignore:
9+
- '**.md'
10+
pull_request:
11+
branches:
12+
- main
13+
paths-ignore:
14+
- '**.md'
15+
16+
jobs:
17+
code-analysis:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: subosito/flutter-action@v2
22+
with:
23+
channel: 'stable'
24+
- name: Prepare dependencies
25+
run: |
26+
flutter --version
27+
flutter pub get
28+
- name: Check Dart code formatting
29+
run: |
30+
dart format . -o none --set-exit-if-changed
31+
- name: Analyze Dart code
32+
run: |
33+
flutter analyze .
34+
- name: Generate dartdoc
35+
run: |
36+
dart pub global activate dartdoc
37+
dart pub global run dartdoc .
38+
39+
test:
40+
needs: [code-analysis]
41+
runs-on: ubuntu-latest
42+
strategy:
43+
matrix:
44+
flutter-version: ['']
45+
steps:
46+
- uses: actions/checkout@v4
47+
- uses: subosito/flutter-action@v2
48+
with:
49+
channel: 'stable'
50+
flutter-version: ${{ matrix.flutter-version }}
51+
- name: Prepare dependencies
52+
run: |
53+
flutter --version
54+
flutter pub get
55+
- name: Test
56+
run: flutter test

example/lib/features/scene/chat_demo/page/chat_page.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ class _ChatPageState extends State<ChatPage> with WidgetsBindingObserver {
320320
}
321321

322322
addUnreadTipView() {
323-
Overlay.of(pageOverlayContext!)?.insert(OverlayEntry(
323+
Overlay.of(pageOverlayContext!).insert(OverlayEntry(
324324
builder: (BuildContext context) => UnconstrainedBox(
325325
child: CompositedTransformFollower(
326326
link: layerLink,

example/lib/features/scene/video_auto_play_list/widgets/video_widget.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class _VideoWidgetState extends State<VideoWidget> {
2525
@override
2626
void initState() {
2727
super.initState();
28-
_controller = VideoPlayerController.network(widget.url);
28+
_controller = VideoPlayerController.networkUrl(Uri.parse(widget.url));
2929
_initializeVideoPlayerFuture = _controller.initialize().then((_) {
3030
setState(() {});
3131
});

0 commit comments

Comments
 (0)