Skip to content

Commit

Permalink
Fix lints, add FVM and VSCode settings
Browse files Browse the repository at this point in the history
  • Loading branch information
tenhobi committed Feb 16, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 75f55a1 commit cfa8de8
Showing 4 changed files with 40 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .fvm/fvm_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"flutterSdkVersion": "3.19.0",
"flavors": {}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@ melos_my_project.iml
.vscode/*
!.vscode/tasks.json
!.vscode/settings.json
.fvm/flutter_sdk

.packages
.pub/
31 changes: 31 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"dart.flutterSdkPath": ".fvm/flutter_sdk",
"search.exclude": {
"**/.fvm": true,
"**/*.g.dart": true,
},
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
".idea/**": true,
".run/**": true,
},
// Remove from file watching
"files.watcherExclude": {
"**/.fvm": true
},
"dart.lineLength": 120,
"editor.rulers": [
120
],
"yaml.schemas": {
"https://json.schemastore.org/dart-build.json": [
"build.yaml"
]
},
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.patterns": {
"*.dart": "${capture}.g.dart,${capture}.freezed.dart,${capture}.auto_mappr.dart"
},
"yaml.schemaStore.enable": false
}
6 changes: 4 additions & 2 deletions packages/netglade_utils/lib/src/testing/mock_extensions.dart
Original file line number Diff line number Diff line change
@@ -6,11 +6,13 @@ import 'package:mocktail/mocktail.dart';
import 'package:netglade_utils/src/result/result.dart';

extension FutureVoidAnswer on When<Future<void>> {
void thenAnswerWithVoid() => thenAnswer((_) async => <void>{});
// ignore: no-empty-block, its ok
void thenAnswerWithVoid() => thenAnswer((_) async {});
}

extension VoidAnswer on When<void> {
void thenAnswerWithVoid() => thenAnswer((_) => <void>{});
// ignore: no-empty-block, its ok
void thenAnswerWithVoid() => thenAnswer((_) {});
}

extension GenericAnswer<T> on When<Future<T>> {

0 comments on commit cfa8de8

Please sign in to comment.