Skip to content

A Flutter app demonstrating Singleton, lazy loading, and data caching in Dart. Uses freezed for immutable classes and json_serializable for JSON handling. Clone, install dependencies, and run to explore.

License

Notifications You must be signed in to change notification settings

Ahmad-Nour-Haidar/ptc-modeling-in-dart

Repository files navigation

Modeling In Dart

✨ Features

  • Singleton Pattern: Ensures a class has only one instance and provides a global point of access to it.
  • Lazy Loading: Delays the initialization of an object until it is needed, improving performance and reducing memory usage.
  • Caching Data: Stores frequently accessed data in memory for quick retrieval.
  • Freezed Package: Simplifies creating immutable classes and union types.
  • JsonSerializable Package: Provides easy conversion between Dart objects and JSON data.

📱 App Preview

App Preview 1 App Preview 2 App Preview 3 App Preview 4 App Preview 5 App Preview 6 App Preview 7 App Preview 8 App Preview 9

📂 Main Files

Here are the links to the main files in the project:

🚀 Usage

To leverage the features in this app:

  • Singleton Pattern: Use the singleton pattern to manage your instances.
  • Lazy Loading: Ensure objects are only created when they are needed.
  • Caching Data: Utilize the caching mechanism to store and retrieve frequently accessed data efficiently.
  • Freezed: Create immutable data classes easily using freezed.
  • JsonSerializable: Automatically convert between Dart objects and JSON using json_serializable.

⚙️ Installation

  1. Clone the repository:

    git clone https://github.com/Ahmad-Nour-Haidar/ptc-modeling-in-dart.git
  2. Navigate to the project directory:

    cd ptc-modeling-in-dart
  3. Install dependencies:

    flutter pub get
  4. Run the application:

    flutter run

🤝 Contributing

We welcome contributions to enhance the Pharmageddon app. Here’s how you can help:

  1. Fork the repository.
  2. Create a new branch:
    git checkout -b feature-branch
  3. Make your changes and commit them:
    git commit -m "Description of the feature"
  4. Push to the branch:
    git push origin feature-branch
  5. Create a pull request.

Please ensure your pull request adheres to the following guidelines:

  • Describe the feature or fix in detail.
  • Ensure the code follows the existing style and conventions.
  • Include screenshots or demos of the new feature or fix if applicable.

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.

About

A Flutter app demonstrating Singleton, lazy loading, and data caching in Dart. Uses freezed for immutable classes and json_serializable for JSON handling. Clone, install dependencies, and run to explore.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages