native_contact 0.0.3 copy "native_contact: ^0.0.3" to clipboard
native_contact: ^0.0.3 copied to clipboard

A Flutter plugin to call native contacts view on Android and iOS devices.

example/lib/main.dart

import 'package:flutter/material.dart';

import 'package:native_contact/native_contact.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: OutlineButton(
            child: Text("salvar"),
            onPressed: () {
              print("pressed");
              ContactInfo contact = ContactInfo();
              contact.name = "Túlio";
              contact.company = "Any Company";
              contact.jobTitle = "Developer";
              contact.website = "www.test.com";
              PostalAddress postalAddress = PostalAddress();
              postalAddress.city = "Any City";
              postalAddress.postcode = "38282-123";
              postalAddress.region = "Any region";
              postalAddress.street = "Any address, 797";
              postalAddress.country = "Any Country";
              contact.postalAddresses = [postalAddress];
              contact.emails = [Item(1, "test@test.com")];
              contact.phones = [Item(3, "551199999999")];

              NativeContact.addNewContact(contact);
            },
          ),
        ),
      ),
    );
  }
}
4
likes
40
pub points
48%
popularity

Publisher

unverified uploader

A Flutter plugin to call native contacts view on Android and iOS devices.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on native_contact