Skip to content

Commit 60cad29

Browse files
committed
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
1 parent cd1a925 commit 60cad29

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/content/docs/api-server/guides/implement-alternative-email-client.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ This guide demonstrates the value of this architecture by walking you through th
1313

1414
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.
1515

16-
The contract is simple:
16+
The contract, defined in the `email_client` package, is simple:
1717

1818
```dart
19-
// path: packages/email_client/lib/src/email_client.dart
19+
// lib/src/email_client.dart
2020
abstract class EmailClient {
2121
const EmailClient();
2222
@@ -34,7 +34,7 @@ abstract class EmailClient {
3434
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.
3535

3636
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.
3838

3939
2. **Implement the `EmailClient`:**
4040

@@ -71,7 +71,7 @@ Let's create a simple "logging" email client that doesn't actually send emails b
7171

7272
Swapping the implementation is the easiest part. You only need to change a single part of the dependency injection setup.
7373

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`.
7575

7676
<Tabs>
7777
<TabItem label="Before (Default)">

0 commit comments

Comments
 (0)