Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add dio extension for flexible interseptor setup and update dio and mutex packages #47

Merged
merged 14 commits into from
Nov 13, 2023

Conversation

daniilborovoy
Copy link
Contributor

@daniilborovoy daniilborovoy commented Nov 8, 2023

Summary of change

  • Update dio and mutex packages
  • Add dio mixin for flexible setup

Related issues

@nkshah2
Copy link
Contributor

nkshah2 commented Nov 9, 2023

Hi @daniil-borovoy

You can mark me as a reviewer for this whenever you are ready for this PR to be merged

@daniilborovoy
Copy link
Contributor Author

Hi @daniil-borovoy

You can mark me as a reviewer for this whenever you are ready for this PR to be merged

Sure!

@daniilborovoy daniilborovoy marked this pull request as ready for review November 9, 2023 15:57
@daniilborovoy daniilborovoy marked this pull request as draft November 9, 2023 16:07
@daniilborovoy daniilborovoy marked this pull request as ready for review November 9, 2023 16:09
@daniilborovoy daniilborovoy changed the title build: bump package versions Update dio and mutex packages & Add dio mixin for flexible setup Nov 9, 2023
@rishabhpoddar rishabhpoddar requested a review from nkshah2 November 9, 2023 16:36
@daniilborovoy daniilborovoy changed the title Update dio and mutex packages & Add dio mixin for flexible setup feat: add dio mixin for flexible setup and update dio and mutex packages Nov 9, 2023
CHANGELOG.md Outdated Show resolved Hide resolved
pubspec.lock Outdated Show resolved Hide resolved
pubspec.lock Outdated Show resolved Hide resolved
lib/src/supertokens_dio_extension.dart Show resolved Hide resolved
lib/src/dio-interceptor-wrapper.dart Show resolved Hide resolved
Comment on lines +92 to +98
import 'package:supertokens_flutter/dio.dart';

void setup() {
Dio dio = Dio(); // Create a Dio instance.
dio.addSupertokensInterceptor();
}
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a better way over the existing method? If so, do you think we should recommend this method on our website docs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I was inspired by the Flutter Sentry SDK and they do the same thing in their SDK. So you can use the cascade operator and make something like this

Dio(options) ..addSentry() ..addSupertokensInterceptor()

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha! thanks. Keeping this comment open cause we will add it to our docs.

CHANGELOG.md Outdated Show resolved Hide resolved
@rishabhpoddar rishabhpoddar changed the base branch from master to 0.2 November 13, 2023 06:23
pubspec.yaml Outdated Show resolved Hide resolved
@rishabhpoddar rishabhpoddar changed the base branch from 0.2 to 0.3 November 13, 2023 09:54
@daniilborovoy daniilborovoy changed the title feat: add dio mixin for flexible setup and update dio and mutex packages feat: add dio extension for flexible interseptor setup and update dio and mutex packages Nov 13, 2023
@rishabhpoddar rishabhpoddar merged commit 2808afa into supertokens:0.3 Nov 13, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants