Getting Started

Introduction

Flutter integration for Laravel REST API using laravel_rest_api_flutter.

Laravel REST API – Flutter Integration

laravel_rest_api_flutter is a Flutter package that simplifies interaction with a Laravel REST API.

Laravel REST API is the backend package this Flutter client is designed to work with.

It provides:

  • A standard client interface (RestApiClient) that you implement with your preferred HTTP library (e.g. dio).
  • High-level factories for:
    • 🔍 Search
    • 🧬 Mutations (create / update)
    • 🗑️ Delete
    • ⚙️ Custom actions

This design helps you keep your integration:

  • Typed — through your own models,
  • Testable — through repositories and factories,
  • Consistent — same patterns across all modules and projects.

Use this documentation to:

  1. Install the package.
  2. Configure your HTTP client.
  3. Define models and repositories.
  4. Use search, mutate, delete, and actions in your Flutter app.

SDK Coverage & Recent Updates

The Flutter SDK provides a typed client for the Laravel Rest API (Lomkit), covering all main resource interactions:

  • Search (filters, scopes, includes, aggregates, instructions, pagination)
  • Details (single resource retrieval with metadata and gates)
  • Mutate (create/update with nested relation operations)
  • Actions (custom resource actions)
  • Delete / Restore / Force Delete lifecycle
  • Gates & authorization metadata

Recent improvements

  • Fixed nested mutate relation serialization
  • Correct pagination handling in search requests
  • Instruction payload alignment with backend expectations
  • Explicit null handling in filters and instruction fields
  • Full test coverage across all factories

For detailed examples, refer to the dedicated documentation sections.