Powerful, helpfull, extensible and highly customizable API's that wrap http client to make communication easier with Axelor server with boilerplate code free.

Overview

logo

Build Status Code Coverage Pub Package
style: effective dart BSD-3 License

flutter_axelor_sdk

Powerful, helpful, extensible and highly customizable API's that wrap http client to make communication easier with Axelor server with boilerplate code free.

Table of contents

Get Started

Add dependency

flutter_axelor_sdk:  
    flutter_axelor_sdk: ^0.0.1

initial in main.dart

void main()  {
  Axelor.initialize(
    builder: AxelorBuilder(
      client: Dio(),
      domain: 'com.axelor.testserver.base.db.', // replace with your axelor server prefix
    ),
  );
  runApp(const App());
}

Example

Let's take searching for contacts example (with pagination and complex search criteria)

Axelor.search(
  model: Contacts.model,                      // auto end point construct
  baseDomain: Contacts.baseDomain,            // auto end point construct
  mapper: Contacts.fromJson,                  // Auto json decode and map to class object
  page: 0,                                    // page pagination support
  body: AxelorBody(                           // Syntactic sugar to construct body
    fields: const ['fullName', 'email'],
    sortBy: const ['fullName', '-createdOn'],
    criteria: AxelorCriteria.or([
      'email'.like('%gmail.com'),
      'lang'.equal('FR'),
      'age'.between('18', '40'),
      AxelorCriteria.and(['firstName'.like('j%'), 'lastName'.like('s%')])
    ]),
  ),
);

If we want to achieve the same function without Axelor Sdk

try {
  final response = await client.post(
    '/ws/rest/com.axelor.contact.db.Contact/search',
    data: {
      'offset': 0,
      'limit': 10,
      'fields': ['fullName', 'email'],
      'sortBy': ['fullName', '-createdOn'],
      'data': {
        'criteria': [
          {
            'operator': 'or',
            'criteria': [
              {'fieldName': 'email', 'operator': 'like', 'value': '%gmail.com'},
              {'fieldName': 'lang', 'operator': '=', 'value': 'FR'},
              {'fieldName': 'age', 'operator': 'between', 'value': 18, 'value2': 40},
              {
                'operator': 'and',
                'criteria': [
                  {'fieldName': 'firstName', 'operator': 'like', 'value': 'j%'},
                  {'fieldName': 'lastName', 'operator': 'like', 'value': 's%'}
                ]
              }
            ]
          }
        ]
      }
    },
  );
  // decode to json
  final Map<String, dynamic> jsonResponse = jsonDecode(response.data);
  // check if success response or error happen
  if ((jsonResponse['status'] as int?) != 0) {
    // propagate error to ui
    return;
  }

  // map json to Contact Class
  final contacts = Contacts.fromJson(jsonResponse['data']);
} catch (ex, st) {
  // propagate general error to ui
}

Features

  • Compatible: Compatible with all your existing code so you can adopt when and where you want.
  • Less code: Do more with less code and avoid entire classes of bugs, so code is simple and easy to maintain.
  • Highly customizable : The defaults settings will cover you but if not almost every thing is customizable.
  • Architecture-agnostic: Works with any architecture approach.
  • enterprise-ready: All code is fully tested so it's save to use in production.
  • well documented: Each feature is well documented.

Axelor APIs

You can discover all api's features in documentation. Each api is well documented .

Contributing

👋 Want to contribute to Abdktefane/flutter_axelor_sdk?

If you have a bug or an idea, read the contributing guidelines before opening an issue.

You might also like...

Small, easy to use and extensible logger which prints beautiful logs.

Small, easy to use and extensible logger which prints beautiful logs.

Logger Small, easy to use and extensible logger which prints beautiful logs. Inspired by logger for Android. Show some ❤️ and star the repo to support

Jan 5, 2023

An easy-to-use flutter http network requests handler with more functionality than http but more simpler than dio.

network_requests An easy-to-use flutter http network requests handler with more functionality than http but more simpler than dio. Platform Supported

Dec 15, 2022

Response Parser makes it easier to parse data and error response from server.

Response Parser makes it easier to parse data and error response from server. Getting started Do you want to write this pretty functions... FutureEit

Nov 5, 2022

Custom dropdown widget allows to add highly customizable widget in your projects with proper open and close animations and also comes with form required validation.

Custom dropdown widget allows to add highly customizable widget in your projects with proper open and close animations and also comes with form required validation.

Custom Dropdown Custom Dropdown package lets you add customizable animated dropdown widget. Features Lots of properties to use and customize dropdown

Dec 29, 2022

Addons to supabase dart (and Flutter), to make development easier.

supabase_addons Make great apps with a great backend! Supabase is an open source Firebase alternative. It has support for auth, database and storage u

Dec 3, 2022

A wrapper around Navigator 2.0 and Router/Pages to make their use a easier.

A wrapper around Navigator 2.0 and Router/Pages to make their use a easier.

APS Navigator - App Pagination System This library is just a wrapper around Navigator 2.0 and Router/Pages API that tries to make their use easier: 🔧

Oct 17, 2022

A smartphone application called Easy Job goal is to make easier for businesses to find people who meet their standards as well as for job seekers to search for and choose from available positions .

Easy_Jobs 19SW54(MAD-Project) A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to ge

Nov 6, 2022

Create highly customizable, simple, and controllable autocomplete fields for Flutter.

Create highly customizable, simple, and controllable autocomplete fields for Flutter.

Field Suggestion Installing Depend on it Add this to your package's pubspec.yaml file: dependencies: field_suggestion: latest_version Install it Y

Oct 18, 2022

A highly customizable Flutter widget to render and interact with JSON objects.

A highly customizable Flutter widget to render and interact with JSON objects.

The spreadsheet with superpowers ✨ ! JSON Data Explorer A highly customizable widget to render and interact with JSON objects. Features Expand and col

Dec 21, 2022
Releases(v0.0.1)
Owner
Abd al-Rahman al-Ktefane
AI Developer, Full Stack Developer,
Abd al-Rahman al-Ktefane
App HTTP Client is a wrapper around the HTTP library Dio to make network requests and error handling simpler, more predictable, and less verbose.

App HTTP Client App HTTP Client is a wrapper around the HTTP library Dio to make network requests and error handling simpler, more predictable, and le

Joanna May 44 Nov 1, 2022
⚡️A highly customizable, powerful and easy-to-use alerting library for Flutter.

Flash ⚡️ A highly customizable, powerful and easy-to-use alerting library for Flutter. Website: https://sososdk.github.io/flash Specs This library all

null 368 Jan 5, 2023
Charlatan - A library for configuring and providing fake http responses to your dio HTTP client.

charlatan This package provides the ability to configure and return fake HTTP responses from your Dio HTTP Client. This makes it easy to test the beha

Betterment 14 Nov 28, 2022
A Flutter plugin that allows communication with a Parse Server

Parse For Flutter! Hi, this is a Flutter plugin that allows communication with a Parse Server, (https://parseplatform.org) either hosted on your own s

Doğuş Dicle 0 Apr 14, 2022
A powerful Http client for Dart, which supports Interceptors, FormData, Request Cancellation, File Downloading, Timeout etc.

dio_http A powerful Http client for Dart, which supports Interceptors, Global configuration, FormData, Request Cancellation, File downloading, Timeout

null 46 Dec 19, 2021
A powerful Http client for Dart, which supports Interceptors, FormData, Request Cancellation, File Downloading, Timeout etc.

Language: English | 中文简体 dio A powerful Http client for Dart, which supports Interceptors, Global configuration, FormData, Request Cancellation, File

Flutter中国开源项目 11.2k Jan 3, 2023
A lightweight and customizable http client that allows you to create offline-first dart app easily.

Enjoyable & customizable offline-first REST API client Unruffled is lightweight and customizable http client that allows you to create offline-first e

T. Milian 3 May 20, 2022
Quickly is build as a tool to enhance your Flutter UI development experience and make code easier

Quickly is build as a tool to enhance your Flutter UI development experience and make code easier. It is highly inspired by Bootstrap and Tailwind CSS. It also provide lots of extension methods on String, List and Map.

Aniket Khote 11 Oct 24, 2022
Flutter boilerplate - A boilerplate project created in flutter using MobX and Provider

Boilerplate Project A boilerplate project created in flutter using MobX and Prov

Wali Khan 0 Jan 22, 2022
Pdfium_bindings - This project aims to wrap the complete Pdfium API in dart, over FFI

Pdfium_bindings - This project aims to wrap the complete Pdfium API in dart, over FFI

Isaque Neves 7 Oct 22, 2022