Pranav Masekar
Flutter Developer 💙 | Devops Enthusiast | Open Source Contributor | Golang Developer
In our previous part of Clean Architecture with Flutter, we learned about Clean Architecture concepts and layers. We also had preparation for our music app in Flutter. We installed the required packages and prepared our folder structure. If you haven...
sungod.hashnode.dev15 min read
Hello Pranav,
Your tutorial on clean architecture is excellent and easily to understand. Keep up the great work! I have a few questions regarding the 'DataSource' class. In the 'SongRemoteDataSource,' , instead of directly using the Dio plugin to handle HTTP requests, could we use a service class 'core/services/dio_service.dart' along with connectivity service and any other plugin service, By doing so, we can pass this service class to 'SongRemoteDataSource,' enabling us to handle various exceptions such as ServerException, NoInternetException, CacheException, and any other custom exceptions.
Please share your thoughts on this.
Rashad Adel
Let’s take the GetSongUseCase example itself, suppose instead of call we named the function as myFunction.
So to use the function we will do something like this -
Copy
Copy GetSongUseCase object = GetSongUseCase();
result = object.myFunction(); But using the call method we can simplify this as -
Copy
Copy result = GetSongUseCase(); The call method will automatically get executed for us.
this point is wrong u used the call with wrong way