Reputation: 45
class FireAuth extends FirebaseAuth{
FireAuth({Key? key}) : super.instanceFor(app: app);
...
I want to be able to build my own class based on the FirebaseAuth class but I keep getting this error:
The generative constructor 'FirebaseAuth FirebaseAuth.instanceFor({required FirebaseApp app})' is expected, but a factory was found. Try calling a different constructor of the superclass, or making the called constructor not be a factory constructor.
Upvotes: 0
Views: 67
Reputation: 45
To get around the issue with inheriting the FirebaseAuth. I have used the extension function instead of the extends. So it looks like this
extension FireAuth on FirebaseAuth {
...
no need for a constructor now
Upvotes: 1