Skip to content

Commit

Permalink
added lints
Browse files Browse the repository at this point in the history
  • Loading branch information
darwin-morocho committed Oct 18, 2023
1 parent 592c392 commit cd1cd76
Show file tree
Hide file tree
Showing 28 changed files with 633 additions and 261 deletions.
2 changes: 1 addition & 1 deletion examples/example/lib/app/inject_repositories.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ void injectRepositories(Dio dio) {
class Repositories {
Repositories._();

static final auth = Provider.withArguments<AuthRepository, AuthService>(
static final auth = Provider.arguments<AuthRepository, AuthService>(
(ref) => AuthRepositoryImpl(ref.arguments),
);
}
2 changes: 1 addition & 1 deletion examples/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ packages:
path: "../../packages/flutter_meedu"
relative: true
source: path
version: "9.0.2"
version: "9.0.3"
flutter_test:
dependency: "direct dev"
description: flutter
Expand Down
26 changes: 26 additions & 0 deletions examples/example/test/lint_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import 'package:flutter/widgets.dart';
import 'package:flutter_meedu/consumer.dart';
import 'package:flutter_meedu/notifiers.dart';
import 'package:flutter_meedu/providers.dart';

void main() {}

class MyWidget extends ConsumerWidget {
const MyWidget({super.key});

@override
Widget build(BuildContext context, BuilderRef ref) {
ref.watch(
provider,
);
return const Placeholder();
}
}

final provider = Provider.state<CounterNotifier, int>(
(ref) => CounterNotifier(0),
);

class CounterNotifier extends StateNotifier<int> {
CounterNotifier(super.initialState);
}
5 changes: 2 additions & 3 deletions examples/persistent_state/lib/app/domain/models/city.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ part 'city.freezed.dart';
part 'city.g.dart';

@freezed
sealed class City with _$City {
class City with _$City {
const factory City({
@JsonKey(name:'city')
required String name,
@JsonKey(name: 'city') required String name,
required String state,
}) = _City;

Expand Down
Loading

0 comments on commit cd1cd76

Please sign in to comment.