Giter Site home page Giter Site logo

Comments (2)

igoriuz avatar igoriuz commented on August 28, 2024 3

Thanks for your fast reply @dshukertjr

Alternatively developers can hide this class on either of these imports.. for e.g.

import 'package:supabase/supabase.dart' hide Provider

My last suggestion would be renaming it to OAuthProvider but i can live with it.

from gotrue-dart.

dshukertjr avatar dshukertjr commented on August 28, 2024

Hi @igoriuz !

Thank you so much for opening an issue and submitting a PR about naming conflict with Gotrue and Riverpod.

I understand your pain of having to use an alias every time you use Gotrue with Riverpod.

I found an interesting thread of naming conflicts between Flutter and another package. We did chat about this issue internally, but unfortunately naming conflict could occur between any packages, and we believe it is better to have solid intuitive API than to avoid naming conflicts and end up with none-ideal names. We just cannot keep changing symbol names every time there is a conflict with other packages.

So in order to use Riverpod and Gotrue together this would be the way to do it:

import 'package:gotrue/gotrue.dart' as gotrue;

final res = await gotrueClient.signIn(provider: gotrue.Provider.github);

Or with Supabase:

import 'package:supabase/supabase.dart' as supabase;

final res = await gotrueClient.signIn(provider: supabase.Provider.github);

I really do understand the pain, and this is probably is not the answer you wanted, but I hope you could understand. We appreciate your feedback, and please don't hesitate to let us know any thoughts that might come up in the future!

from gotrue-dart.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.