automatecrm_flutter_cp 0.0.2 copy "automatecrm_flutter_cp: ^0.0.2" to clipboard
automatecrm_flutter_cp: ^0.0.2 copied to clipboard

A Dart package that provides an HTTP client for interacting with the Customer Portal backend APIs.

Automatecrm customer portal SDK #

A Dart client SDK for customer portal REST API.

Installation #

You can install the SDK by downloading the source.

add a line like this to your package's pubspec.yaml

dependencies:
  automatecrm_flutter_cp:
    path: downloaded package path

Note: in the above command, make sure you follow the YAML indentation

run an implicit flutter pub get

Usage/example #

Configure the crm instance in your project lib/main.dart file

import 'package:automatecrm_flutter_cp/automatecrm_flutter_cp.dart';


void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  AutomatecrmCP().init(
    instanceUrl:"CRM url"
  );

  runApp(const MyApp());
}

using the Customer portal Api's

import 'package:automatecrm_flutter_cp/automatecrm_flutter_cp.dart';

import '../models/login_model.dart';

class LoginRepository {
  Future<Map<String, dynamic>> performLogin(String username, String password) async {
    Map<String, dynamic> loginResponse =
        await AutomatecrmCP().doLogin(username: username, password: password);
    return Login.fromJson(loginResponse);
  }
}
0
likes
120
points
55
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A Dart package that provides an HTTP client for interacting with the Customer Portal backend APIs.

Homepage

License

unknown (license)

Dependencies

dio, flutter, http, shared_preferences

More

Packages that depend on automatecrm_flutter_cp