Комментарии:
thanks for not using TDD because that complicate learning of clean architecture which is a bit complex by it self
ОтветитьReally good tutorial I must say it, nice job.
ОтветитьThank you so much for the fantastic tutorial.... The only truly complete one among those found regarding riverpods and clean architecture!!!
I made a slight change to use riverpod generators (and consequently the new Notifier/NotifierProvider pair instead of StateNotifier/StateNotifierProvider).
I started by replacing everything in the lib/features/trips/presentation/provviders/trip_provider.dart file starting on line 38 and replaced it with the following:
@riverpod
class TripListNotifier extends _$TripListNotifier{
GetTrips get _getTrips => ref.read(getTripsProvider);
AddTrip get _addTrip => ref.read(addTripProvider);
DeleteTrip get _deleteTrip => ref.read(deleteTripProvider);
Future<void> addNewTrip(Trip trip) async {
await _addTrip(trip);
}
Future<void> removeTrip(int index) async {
await _deleteTrip(index);
}
Future<void> loadTrips() async {
state = await _getTrips();
}
@override
List<Trip> build() {
return [];
}
}
Finally, I inserted these two lines on line 12
import 'package:riverpod_annotation/riverpod_annotation.dart';
part 'trip_provider.g.dart';
And this is all!
Bye bye and thank again
ps: I'm waiting for a tutorial on TDD!!!
T’es québécois toi right?
Ответитьi have one question, where to write bottomnavigation bar ?
is it a feature ?
it was very interesting ! Thanks
ОтветитьGood content!Thank you!!
ОтветитьNice!
We need a TDD Clean Architecture Riverpod vid now^^
First thumb up then watching :D I Love your contents!
Ответитьplease make a video on testing providers (preferably with riverpod generator). I was using your videos of clean architecture and testing with bloc to use in my app with riverpod. But I am still unable to write test the riverpod.
ОтветитьRiverpod is quite good. Еhanks to the author for the video!
ОтветитьWhy you use abstract classes as an interface? dart 3.0+ provides interfaces.
Ответить