This is a Flutter project that uses clean architecture, dependency injection with GetIt, and functional programming with Dartz. The state management is handled with BLoC pattern.
The project is structured as follows:
-
lib
: contains the main source code of the project.-
main.dart
: the entry point of the application. It sets up the dependency injection, the localization, the theme, and the routes of the application. -
app.dart
: the main widget of the application. It contains theMainApp
widget that displays the UI of the application. -
core
: contains the core functionality of the application.-
constants
: contains the constants of the application.assets.dart
: contains the assets of the application.
-
di/injector.dart
: contains theInjector
class that sets up the dependency injection with GetIt. -
errors/failures.dart
: contains theFailure
class hierarchy that represents the possible failures in the -
extensions
: contains the extensions of the application. -string_extensions
: contains theStringExtensions
extension that provides string manipulation methods. application. -
network
:network_info.dart
: contains theNetworkInfo
class that checks the network connectivity of the application.
-
router/app_router.dart
: contains theAppRouter
class that defines the routes of the application. -
themes
: contains the themes of the application.app_theme.dart
: contains theAppTheme
class that defines the theme of the application.
-
utils
: contains the utility classes of the application.input_converter.dart
: contains theInputConverter
class that converts the input of the application.
-
-
features
: contains the features of the application.feature_a
: an example feature.presentation
: contains the presentation layer of the feature.blocs
: contains theFeatureABloc
class that handles the state management of the feature.screens
: contains theFeatureAScreen
class that displays the UI of the feature.widgets
: contains theFeatureAWidget
class that displays a widget of the feature.
domain
: contains the domain layer of the feature.entities
: contains theFeatureAEntity
class that represents the entity of the feature.repositories
: contains theFeatureARepository
interface that defines the methods for accessing the data of the feature.usecases
: contains theFeatureAUsecase
class that defines the business logic of the feature.
data
: contains the data layer of the feature.models
: contains theFeatureAModel
class that represents the model of the feature.datasources
: contains theFeatureADatasource
interface that defines the methods for accessing the data source of the feature.repositories
: contains theFeatureARepositoryImpl
class that implements theFeatureARepository
interface.
feature_b
: another example feature.- ... (similar structure to feature_a)
-
-
test
: contains the tests of the application. -
pubspec.yaml
: the configuration file of the application.
To get started with the project, follow these steps:
- Clone the repository.
- Run
dart pub get
to install the dependencies. - Run the application with
flutter run
.