Riverpod, Clean Architecture, Hive - Flutter Travel App

Riverpod, Clean Architecture, Hive - Flutter Travel App

Flutter Guys

8 месяцев назад

18,210 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Squid Proxy
Squid Proxy - 08.11.2023 19:10

thanks for not using TDD because that complicate learning of clean architecture which is a bit complex by it self

Ответить
Mariusz Arnold Biłda
Mariusz Arnold Biłda - 07.11.2023 00:33

Really good tutorial I must say it, nice job.

Ответить
luca bognetti
luca bognetti - 06.11.2023 19:56

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!!!

Ответить
Olivier Gagné
Olivier Gagné - 04.11.2023 05:22

T’es québécois toi right?

Ответить
Song Kimchhay
Song Kimchhay - 03.11.2023 11:59

i have one question, where to write bottomnavigation bar ?
is it a feature ?

Ответить
Manouus
Manouus - 29.10.2023 14:18

it was very interesting ! Thanks

Ответить
ああ
ああ - 29.10.2023 13:10

Good content!Thank you!!

Ответить
DaVinci FPV
DaVinci FPV - 27.10.2023 02:41

Nice!

We need a TDD Clean Architecture Riverpod vid now^^

Ответить
MinSeok Jeong
MinSeok Jeong - 26.10.2023 17:21

First thumb up then watching :D I Love your contents!

Ответить
Lucifer Plays
Lucifer Plays - 26.10.2023 16:43

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.

Ответить
Вальдемар
Вальдемар - 26.10.2023 16:11

Riverpod is quite good. Еhanks to the author for the video!

Ответить
KarKaro
KarKaro - 26.10.2023 16:08

Why you use abstract classes as an interface? dart 3.0+ provides interfaces.

Ответить