Back

Flutter Auth

  • 0
  • Accounts
ski
21 Apr, 2023, 03:10

Hi did I miss something in the code, I have install the ask the code has no error but when I click the sign up button and check the appwrite console nothings is get added, am using flutterflow so am getting this string from argument in flutterflow

TL;DR
The user is having trouble with Flutter Auth in Flutterflow. They initially had an issue with a function not working due to Flutterflow not allowing custom dependencies and imports. They later fixed the error and got Appwrite Auth working. There is discussion about the placement of code, importing the Appwrite package, and handling errors. No solution is provided in the thread.
Drake
21 Apr, 2023, 03:12

What's your catch error do?

Drake
21 Apr, 2023, 03:14

Btw, last time I checked the Appwrite SDK didn't work well in flutterflow...how are you planning on reusing the Client in your app?

ski
21 Apr, 2023, 03:23

Last time I try it it didn’t work either but this time the code compile, i don’t know it but am just trying it out

Drake
21 Apr, 2023, 03:25

You can try it, but you may run into a problem with the users session not persisting. There's an Appwrite marketplace app you can use as a reference for connecting to Appwrite. The idea is to use the Flutter Flows API Calls directly against the Appwrite REST API

Drake
21 Apr, 2023, 03:25

Back to your code, though...what's the catchError doing?

ski
21 Apr, 2023, 03:28

It shows no error

Drake
21 Apr, 2023, 03:29

What's the code?

Drake
21 Apr, 2023, 03:29

And maybe you can add some print to verify this method is being called?

Drake
21 Apr, 2023, 03:31

It's also slightly weird you're defining a main function inside this accountcreate function

ski
21 Apr, 2023, 03:38

Currently flutterflow only allows you add function with no arguments in the main file

Drake
21 Apr, 2023, 03:40

Sorry I still don't understand why you need that main function? Why don't you have the code just in the accountcreate function?

ski
21 Apr, 2023, 03:53

Should I set it like that

Drake
21 Apr, 2023, 03:55

that makes more sense. However, did you lose the import?

ski
21 Apr, 2023, 04:00

Lol 😂 I just realized I didn’t import the appwrite package but the only error am getting now is the above screenshot am not sure where to add the )

ski
21 Apr, 2023, 04:06

Never mind I fix the error

ski
21 Apr, 2023, 21:49

@Steven hey I got appwrite Auth working with flutterflow

Drake
21 Apr, 2023, 21:50

using the SDK?

ski
21 Apr, 2023, 21:51

Yes

Drake
21 Apr, 2023, 21:53

awesome! How are you handling the Client? Are you able to make an authenticated request in another part of your app?

ski
21 Apr, 2023, 21:54

I just got it to work, so am going to play around with other stuff and I will let you know

ski
23 Apr, 2023, 05:22

Hey just to keep you update only function ( for server side code) doesn’t work since flutterflow doesn’t support adding dependencies and import packages for custom functions

Drake
23 Apr, 2023, 14:37

Sorry what do you mean?

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more