angel3_client 8.2.0 copy "angel3_client: ^8.2.0" to clipboard
angel3_client: ^8.2.0 copied to clipboard

A browser, mobile and command line based client that supports querying Angel3 servers

example/main.dart

import 'dart:async';
import 'package:angel3_client/angel3_client.dart';

Future doSomething(Angel app) async {
  var userService = app
      .service<String, Map<String, dynamic>>('api/users')
      .map(User.fromMap, User.toMap);

  var users = await (userService.index() as FutureOr<List<User>>);
  print('Name: ${users.first.name}');
}

class User {
  final String? name;

  User({this.name});

  static User fromMap(Map data) => User(name: data['name'] as String?);

  static Map<String, String?> toMap(User user) => {'name': user.name};
}
2
likes
160
points
769
downloads

Publisher

verified publisherdukefirehawk.com

Weekly Downloads

A browser, mobile and command line based client that supports querying Angel3 servers

Homepage
Repository (GitHub)
View/report issues
Contributing

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

angel3_http_exception, belatuk_json_serializer, collection, http, logging, meta, path

More

Packages that depend on angel3_client