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

Dart Package for resend

resend dart #

pub package

pub points

Dart library for the Resend API.

Platform Support #

Android iOS MacOS Web Linux Windows

Setup #

First, you need to get an API key, which is available in the Resend Dashboard.

Usage #

Import package:resend/resend.dart

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    Resend(apiKey: "re_123456789");

    return MaterialApp(
      ...
    );
  }
}

Create Instance of Resend #

final resend = Resend.instance;

Usage #

Send your first email:

resend.sendEmail(
    from: 'you@example.com',
    to: 'user@gmail.com',
    subject: 'hello world',
    text: 'it works!',
);

Send email using HTML #

Send an email custom HTML content:

resend.sendEmail(
    from: 'you@example.com',
    to: 'user@gmail.com',
    subject: 'hello world',
    text: '<strong>it works!</strong>',
);

Learn more #

License #

MIT License