APIManager-Flutter Is A Flutter Library That Can Manage The API Calls From A Single Place

APIManager-Flutter Is A Flutter Library That Can Manage The API Calls From A Single Place

APIManager-Flutter is an API manager for flutter applications that can manage the API calls from a single place.

APIManager-Flutter

APIManager-Flutter is an API manager for flutter applications that can manage the API calls from a single place.

Features

Here's the list of your all-in-one service

  • Manage token transaction
  • Secured token transaction
  • Basic CRUD operations
  • Upload file
  • Download file
  • Enable logging
  • Support Multi environment base url

Usage

To use this package, add flutter_api_manager as a dependency in your pubspec.yaml file.

...
flutter_api_manager:
  path: <path_to_root_folder>
...

Example

Create a singleton and make requests

import 'package:flutter_api_manager/flutter_api_manager.dart';

class APIController {
  APIManager _apiManager = APIManager(baseUrl: '<your-base-url>');

  static fetchResults() {
    _apiManager.makeRequest('endPoint', APIMethod.get).then((response) {
      ...    
    });
  }

  static uploadFile(File imageFile, String fileKey, Map data,) {
    _apiManager.uploadFile('endPoint', imageFile, fileKey, data: data).then((response) {
      ...    
    });
  }
}

Login once to set the token throughout the app

...
  static login() {
    String token = _getToken();
    _apiManager.login(token);
  }
...

Logout when you want to clear the token

...
  static logout() {
    _apiManager.logout();
  }
...

Want to Contribute

Here's a way to start contributing

You are always WELCOME! We are are excited to see your awesome PRs.

NOTE: Please abide by the CODE OF CONDUCT.

Author & Maintainer ✒️

Dipanshu

Download Details:

Author: 101Loop

Source Code: https://github.com/101Loop/APIManager-Flutter

flutter dart mobile-apps

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Google's Flutter 1.20 stable announced with new features - Navoki

Google has announced new flutter 1.20 stable with many improvements, and features, enabling flutter for Desktop and Web

Top 25 Flutter Mobile App Templates in 2020

Flutter has been booming worldwide from the past few years. While there are many popular mobile app development technologies out there, Flutter has managed to leave its mark in the mobile application development world. In this article, we’ve curated the best Flutter app templates available on the market as of July 2020.

Flutter App Development Trends 2020

As the new decade dawns upon us, a slew of technologies has been making a lot of noise to grab the developers’ attention. While native app development is going strong, the trade winds are now blowing towards going cross-platform.

How To Succeed In Mobile App Wireframe Design?

This article covers everything about mobile app wireframe design: what to do and what not, tools used in designing a mobile or web app wireframe, and more.

Top 10 Mobile App Development Companies in India

The mobile application scenario has been continually changing over the years. In recent years India has become a center for mobile app development companies. The increase of smartphones has instantly increased the requirements for these apps. Every year new technological trends occur due to contin