Skip to content

Commit ae7e5b3

Browse files
author
Sergey Khomushin
committed
emailjs.dart: add dartdoc
1 parent 4dc94a7 commit ae7e5b3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/emailjs.dart

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,18 @@ import 'src/utils/validate_params.dart';
77
import 'src/api/send_json.dart';
88

99
class EmailJS {
10+
/// Public Key specified in the [init] method
1011
static String _publicKey = '';
12+
13+
/// API host specified in the [init] method
1114
static String _origin = 'api.emailjs.com';
15+
16+
/// HTTP Client specified in the [init] method
1217
static http.Client _httpClient = http.Client();
1318

19+
/// Global configuration for EmailJS
20+
///
21+
/// Sets globally the [publicKey] for the application
1422
static void init(
1523
String publicKey, [
1624
String? origin,
@@ -21,6 +29,10 @@ class EmailJS {
2129
EmailJS._httpClient = httpClient ?? http.Client();
2230
}
2331

32+
/// Sends the email through the [serviceID] using the ready-made [templateID].
33+
///
34+
/// It's possible to pass [templatePrams] dynamic variables,
35+
/// and set the [publicKey] for this call.
2436
static Future<String> send(
2537
String serviceID,
2638
String templateID, [

0 commit comments

Comments
 (0)