You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(email-client): update implementation guide for custom email clients
- Clarify the location of the EmailClient interface
- Simplify the implementation example and clarify the file location
- Update the dependency configuration file reference
Copy file name to clipboardExpand all lines: src/content/docs/api-server/guides/implement-alternative-email-client.mdx
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,10 +13,10 @@ This guide demonstrates the value of this architecture by walking you through th
13
13
14
14
The core of this flexibility is the `EmailClient` abstract class, defined in the `email_client` package. Any email service you wish to use must have a corresponding class that implements this interface.
15
15
16
-
The contract is simple:
16
+
The contract, defined in the `email_client` package, is simple:
Let's create a simple "logging" email client that doesn't actually send emails but instead prints the details to the console. This is useful for local development or testing.
35
35
36
36
1.**Create the Implementation File:**
37
-
Create a new file, for example, `packages/email_logging/lib/src/email_logging.dart`.
37
+
You can create a new implementation anywhere, but for this example, let's assume you create a new local file for testing purposes.
38
38
39
39
2.**Implement the `EmailClient`:**
40
40
@@ -71,7 +71,7 @@ Let's create a simple "logging" email client that doesn't actually send emails b
71
71
72
72
Swapping the implementation is the easiest part. You only need to change a single part of the dependency injection setup.
73
73
74
-
Open the dependency configuration file: `apps/flutter-news-app-api-server-full-source-code/lib/src/config/app_dependencies.dart`.
74
+
Open the dependency configuration file within the API server project: `lib/src/config/app_dependencies.dart`.
0 commit comments