frappe_dart2 0.1.2 copy "frappe_dart2: ^0.1.2" to clipboard
frappe_dart2: ^0.1.2 copied to clipboard

A comprehensive Dart wrapper for interacting with the Frappe API, providing easy access to its features and enabling seamless communication with Frappe-based systems.

example/example.dart

import 'package:frappe_dart2/frappe_dart2.dart';

void main() async {
  final frappe = FrappeV15(
    baseUrl: 'https://your-frappe-url.com',
  );

  try {
    final authResponse = await frappe.login(
      LoginRequest(
        usr: 'your-username',
        pwd: 'your-password',
      ),
    );

    frappe.cookie = authResponse.cookie;

    final sidebarItems = await frappe.getDeskSideBarItems();

    final page = sidebarItems.message!.pages!
        .firstWhere((element) => element.name == 'Users');

    final deskPage = await frappe.getDesktopPage(
      DesktopPageRequest(
        name: page.name,
      ),
    );

    print(deskPage.toJson());
  } catch (error) {
    print('Error: $error');
  }
}
1
likes
155
points
40
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A comprehensive Dart wrapper for interacting with the Frappe API, providing easy access to its features and enabling seamless communication with Frappe-based systems.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

dio, equatable, socket_io_client

More

Packages that depend on frappe_dart2