Hello and welcome,
You are probably not that far away from getting it to work based on your description; however, if you could be more specific about what didn’t work, we could help more easily.
For example, you could share a more complete snippet of code, include the exact error you are receiving, and if possible share a simple clone app to demonstrate the issue (i.e., click on the icon in the IDE and follow the instructions).
Here are some general guidelines for ensuring that you get a helpful response.
Also, you may find the learning resources helpful.