---
title: "Discussion on \"Unlocking the Secrets of Clean Architecture: Building Scalable Flutter Apps : Part-2\" | Hashnode"
description: "Discussion on \"Unlocking the Secrets of Clean Architecture: Building Scalable Flutter Apps : Part-2\". Elevate Your Flutter Apps: Building for Scalability with Clean Architecture"
url: "https://hashnode.com/posts/flutter-clean-architecture-part-2/646c3362e07e1d2187d94988"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Unlocking the Secrets of Clean Architecture: Building Scalable Flutter Apps : Part-2](https://sungod.hashnode.dev/flutter-clean-architecture-part-2?utm_source=hashnode&utm_medium=feed)

Elevate Your Flutter Apps: Building for Scalability with Clean Architecture

May 23, 2023 · 15 min read · sungod.hashnode.dev  
Read the article

-   [#flutter](https://hashnode.com/tag/flutter)
-   [#clean-architecture](https://hashnode.com/tag/clean-architecture)
-   [#dependency-injection](https://hashnode.com/tag/dependency-injection)
-   [#flutter-bloc](https://hashnode.com/tag/flutter-bloc)
-   [#wemakedevs](https://hashnode.com/tag/wemakedevs)

## Written by

[Pranav Masekar](https://hashnode.com/@SUNGOD)

@SUNGOD · Pune

  
[View profile](https://hashnode.com/@SUNGOD)

Flutter Developer 💙 | Devops Enthusiast | Open Source Contributor | Golang Developer

Hey there! I'm Pranav Masekar, a dedicated Flutter developer who's all about crafting captivating mobile apps that not only look stunning but also deliver unforgettable user experiences. But it doesn't stop there – I'm also a passionate blogger, sharing insights and best practices within the Flutter community. By contributing to the growth and knowledge-sharing of fellow developers, I'm committed to fostering a dynamic and collaborative environment. And let's not forget my DevOps journey – as a seasoned engineer, I've got the CI/CD pipelines, infrastructure-as-code, and cloud platforms down to an art.

## Responses 2

Markdown supported · ⌘↵ to post

[Rashad Adel](https://hashnode.com/@rashadAdel)

[Sep 15, 2024](https://hashnode.com/posts/flutter-clean-architecture-part-2/646c3362e07e1d2187d94988/comment/66e6fe91e539e279cfe8433b)

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

[Shubham Hande](https://hashnode.com/@Shubham099)

[Sep 4, 2023](https://hashnode.com/posts/flutter-clean-architecture-part-2/646c3362e07e1d2187d94988/comment/64f575e97ec0408c689b5958)

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.

[Pranav Masekar](https://hashnode.com/@SUNGOD)

[Sep 4, 2023](https://hashnode.com/posts/flutter-clean-architecture-part-2/646c3362e07e1d2187d94988/comment/64f575e97ec0408c689b5958#reply-64f5ef34f6310e9375f96328)

[Shubham Hande](https://hashnode.com/@Shubham099)Thanks for the feedback. And yes absolutely using a wrapper service class of dio to handle exception is helpful and will help to reduce code duplication.
