Brickwork
Brickwork is a modular Flutter package designed to accelerate app development by providing a scalable architecture, reusable UI components, utilities, and seamless integrations. With pre-built authentication flows, API clients, responsive design helpers, and essential resources, Brickwork helps you kickstart and maintain high-quality Flutter projects efficiently.
✨ Features
- Scalable Architecture: Organize your codebase with proven patterns for maintainability and scalability.
- Reusable UI Components: Ready-to-use widgets for dialogs, buttons, loading indicators, and more.
- API Client Utilities: Built-in support for Dio, interceptors, error handling, and logging.
- Authentication Flows: Pre-built controllers, repositories, and screens for user authentication.
- Responsive Design Helpers: Utilities for screen adaptation and responsive layouts.
- Theming & Styling: Easily customizable color schemes and text styles.
- Validation & Utilities: Common validation logic and helper functions.
- Localization Ready: Integrates with
easy_localization
for multi-language support. - Third-party Integrations: Includes packages like GetX, Dio, Flutter SVG, and more.
lib │ ├── app.dart │ ├── brickwork.dart │ ├── core │ │ ├── api_client │ │ │ ├── auth_interceptor.dart │ │ │ ├── crypto_interceptor.dart │ │ │ ├── dio_utils.dart │ │ │ ├── refresh_token_interceptor.dart │ │ │ └── retry_on_connection_change_interceptor.dart │ │ ├── common_ui │ │ │ ├── app_alert_dialog.dart │ │ │ ├── app_api_failure_screen.dart │ │ │ ├── app_button.dart │ │ │ ├── app_loading_widget.dart │ │ │ └── models │ │ │ └── user.dart │ │ ├── config │ │ │ ├── app_global_constants.dart │ │ │ └── store_config.dart │ │ ├── constants │ │ │ ├── app_data.dart │ │ │ └── enums.dart │ │ ├── errors │ │ │ ├── failures.dart │ │ │ └── result.dart │ │ ├── extensions │ │ │ └── size_extension.dart │ │ ├── log │ │ │ ├── app_dio_logger.dart │ │ │ ├── app_logger.dart │ │ │ └── custom_console_output.dart │ │ ├── responsive │ │ │ └── size_config.dart │ │ ├── route │ │ │ ├── api_route.dart │ │ │ └── app_route.dart │ │ ├── theme │ │ │ ├── app_color_scheme.dart │ │ │ ├── app_colors.dart │ │ │ └── app_text_style.dart │ │ ├── utils │ │ │ ├── common_functions.dart │ │ │ ├── connection_util.dart │ │ │ └── local_data_manager.dart │ │ └── validations │ │ └── email_validation.dart │ ├── injection.dart │ └── src │ └── features │ └── auth │ ├── controllers │ │ └── auth_controller.dart │ ├── models │ │ └── user_register_response.dart │ ├── repository │ │ └── auth_repository.dart │ ├── view │ │ ├── login_screen.dart │ │ └── splash_screen.dart │ └── widgets │ └── auto_otp.dart ├── pubspec.yaml
🚀 Getting Started
Prerequisites
- Flutter SDK (>=3.6.0 <4.0.0)
- Dart SDK (>=3.6.0 <4.0.0)
Installation
Add Brickwork to your pubspec.yaml
:
dependencies:
brickwork:
git:
url: https://github.com/ShashankMangal/brickwork.git
ref: main
Or use a local path during development:
dependencies:
brickwork:
path: ../brickwork
Run:
flutter pub get
🛠 Usage
Import Brickwork in your Dart files:
import 'package:brickwork/brickwork.dart';
Example: Using a Pre-built Button
AppButton(
text: 'Login',
onPressed: () {
// Your logic here
},
)
Example: Using API Client
final dio = DioUtils.createDio();
Example: Authentication Controller
final authController = AuthController();
authController.login(email, password);
📂 Folder Structure
core/
– Architecture, API clients, utilities, theming, and more.src/features/
– Pre-built features like authentication.assets/
– Images and other resources.
📚 Additional Information
- API Reference
- Contributions are welcome! Please open issues or pull requests.
- For questions, contact shashankmangal10@gmail.com.
Accelerate your Flutter development with Brickwork!
Libraries
- app
- brickwork
- core/api_client/auth_interceptor
- core/api_client/crypto_interceptor
- core/api_client/dio_utils
- core/api_client/refresh_token_interceptor
- core/api_client/retry_on_connection_change_interceptor
- core/common_ui/app_alert_dialog
- core/common_ui/app_api_failure_screen
- core/common_ui/app_loading_widget
- core/common_ui/models/user
- core/config/app_global_constants
- core/config/store_config
- core/constants/app_data
- core/constants/enums
- core/errors/failures
- core/errors/result
- core/extensions/size_extension
- core/log/app_dio_logger
- core/log/app_logger
- core/log/custom_console_output
- core/responsive/size_config
- core/route/api_route
- core/route/app_route
- core/theme/app_color_scheme
- core/theme/app_colors
- core/theme/app_text_style
- core/utils/common_functions
- core/utils/connection_util
- core/utils/local_data_manager
- core/validations/email_validation
- injection