resend 1.0.0 copy "resend: ^1.0.0" to clipboard
resend: ^1.0.0 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',
    html: '<strong>it works!</strong>',
);

Learn more #

License #

MIT License