Home > Enterprise >  Beginner: How to combine a SearchView with Openfoodfacts_dart
Beginner: How to combine a SearchView with Openfoodfacts_dart

Time:12-16

I'm a total beginner in programming. But I am in need of a App (LongStoryShort: My Son has diabetes, needs an App to calculate carbs...)

I want to create a SearchView (Textfield with Input for Searchterms and a Listview (Information from Openfoodfacts esp. Product and Brand, later in a detailed View with more nutritional information). This should be connected to Openfoodfacts. There is a dependency with almost everything prepared for the API Call (Openfoodfacts_dart). But I'm not making progress. Can anyone please help me?

How do I start? Where can I find examples to learn what I'm actually not able to achieve.

CodePudding user response:

I've been playing around with OpenFoodFacts API and in order to develop this App you're looking for the main problem is that the API always asks you for a barcode, there's no way to input words, and it only returns one result. This is an instrinsic problem with the API, maybe other APIs can fit your needs better.

Anyway, wanting to program an App with close to no experience in programming can turn you mad. I'd recommend you to go step by step and start with any introductory tutorial on any language (Python, java, javascript, etc...). Then focus on a flutter specific course. There are plenty on youtube. But basically you need 3 widgets: textField, any button, and a ListView. And I'd also recommend a State manager such as provider. To keep it simple, the provider will have the functions that will search for the data introduced in your textfield and it will trigger from the button.

I'd also suggest you to look for alternatives, I don't think you're the first one with this problem, maybe some other apps are more complex, but they will work for you as well.

Happy coding! Pablo

CodePudding user response:

If you are a beginner to coding, you have made a good choice with flutter. And welcome to SackOverflow ;)

I would recommend you to buy a course on Flutter on Platforms like Udemy. When I started, it helped me a lot.

  • Related