Skip to content

Commit

Permalink
Merge pull request #12 from oxyfalcon/oxyfalcon-patch-1
Browse files Browse the repository at this point in the history
Create dart.yml
  • Loading branch information
oxyfalcon authored Dec 14, 2023
2 parents 73faabe + aa5a212 commit acd1b3a
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 5 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Execute Tests on PR
on:
push:
pull_request:
branches: [main]

jobs:

runUnitTest:
name: Execute Unit/Widget tests

runs-on: macos-latest
steps:

- name: Checkout Code
uses: actions/checkout@v3

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

- name: Lint
run: dart format --output=none --set-exit-if-changed .

- name: Pub Upgrade
run: flutter pub upgrade

# - name: Run Unit Tests / Widget Tests
# run: flutter test
8 changes: 7 additions & 1 deletion lib/Provider/todo_schema.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
class Todo {
import 'package:equatable/equatable.dart';

// ignore: must_be_immutable
class Todo extends Equatable {
String todo;
String description;
String id;
Expand All @@ -20,4 +23,7 @@ class Todo {
id: m['_id'],
isCompleted: m['is_completed']);
}

@override
List<String> get props => [id];
}
4 changes: 1 addition & 3 deletions lib/button/done_list_page_buttons/done_delete.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ class DoneDeleteButton extends ConsumerWidget {
return IconButton.filled(
color: Theme.of(context).cardColor,
onPressed: () {
ref
.read(futureTodoListProvider.notifier)
.markedDelete(itr: todo);
ref.read(futureTodoListProvider.notifier).markedDelete(itr: todo);
},
icon: const Icon(Icons.delete),
);
Expand Down
2 changes: 1 addition & 1 deletion lib/screens/todo_list_screen/no_to_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ class _NoTodoListState extends State<NoTodoList> {
],
);
}
}
}
3 changes: 3 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ dependencies:
flutter_cache_manager: ^3.3.1
path_provider: ^2.1.1
http: ^1.1.0
equatable: ^2.0.5


dev_dependencies:
Expand All @@ -66,6 +67,8 @@ dev_dependencies:
flutter_lints: ^3.0.1
riverpod_generator: ^2.3.1
riverpod_lint: ^2.0.3
integration_test:
sdk: flutter

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
Expand Down

0 comments on commit acd1b3a

Please sign in to comment.