funwithflutter / lit_firebase_auth

Lit Firebase Auth simplifies the process of adding Firebase Authentication to a Flutter application.
MIT License
76 stars 18 forks source link

Auth Related Extensions not available #29

Closed Purus closed 3 years ago

Purus commented 3 years ago

First, please accept my thanks. This package is soo cool. Thanks very much.

For some reasons, I am not able to see any of the extension methods on the BuildContext. Please let me know what I am missing.

context.signOut();

I am using latest version of tools.

    • Flutter version 1.22.5 at H:\flutter
    • Framework revision 7891006299 (3 weeks ago), 2020-12-10 11:54:40 -0800
    • Engine revision ae90085a84
    • Dart version 2.10.4

Should I use LitAuthInit class in every widget/screen classes to make use of the extension methods? Sorry if this is a beginners question.

gabber235 commented 3 years ago

Make sure you import the class

import 'package:lit_firebase_auth/lit_firebase_auth.dart';

Then flutter knows where the extension should come from. You should do this in every file that you want to use any extension.