File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -7,10 +7,18 @@ import 'src/utils/validate_params.dart';
7
7
import 'src/api/send_json.dart' ;
8
8
9
9
class EmailJS {
10
+ /// Public Key specified in the [init] method
10
11
static String _publicKey = '' ;
12
+
13
+ /// API host specified in the [init] method
11
14
static String _origin = 'api.emailjs.com' ;
15
+
16
+ /// HTTP Client specified in the [init] method
12
17
static http.Client _httpClient = http.Client ();
13
18
19
+ /// Global configuration for EmailJS
20
+ ///
21
+ /// Sets globally the [publicKey] for the application
14
22
static void init (
15
23
String publicKey, [
16
24
String ? origin,
@@ -21,6 +29,10 @@ class EmailJS {
21
29
EmailJS ._httpClient = httpClient ?? http.Client ();
22
30
}
23
31
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.
24
36
static Future <String > send (
25
37
String serviceID,
26
38
String templateID, [
You can’t perform that action at this time.
0 commit comments