contactos_platform_interface 1.0.1 copy "contactos_platform_interface: ^1.0.1" to clipboard
contactos_platform_interface: ^1.0.1 copied to clipboard

A common platform interface for the contactos plugin.

contactos_platform_interface #

pub package License: BSD-3-Clause style: very_good_analysis

A common platform interface for the contactos plugin.

This interface allows platform-specific implementations of the contactos plugin, as well as the plugin itself, to ensure they are supporting the same interface.

Architecture #

The contactos plugin uses the federated plugin architecture.

  • contactos: The app-facing package that developers depend on.
  • contactos_platform_interface: This package. It declares the interface that platform packages must implement.
  • contactos_android, contactos_foundation: Platform-specific implementations.

Usage #

To implement a new platform-specific implementation of contactos, extend ContactosPlatform with implementations that perform the platform-specific behaviors.

Example #

class ContactosWindows extends ContactosPlatform {
  static void registerWith() {
    ContactosPlatform.instance = ContactosWindows();
  }

  @override
  Future<List<Contact>> getContacts({String? query, ...}) {
    // Implementation for Windows
  }

  // ... implement other methods
}
0
likes
150
points
108
downloads

Publisher

unverified uploader

Weekly Downloads

A common platform interface for the contactos plugin.

Repository (GitHub)
View/report issues

Topics

#contacts

Documentation

API reference

Funding

Consider supporting this project:

www.buymeacoffee.com
boosty.to

License

BSD-3-Clause (license)

Dependencies

collection, flutter, meta, plugin_platform_interface

More

Packages that depend on contactos_platform_interface