last day (15 days later) » 

6:12 PM
Hi! I will upload the project, one moment. Maybe that will help :)
 
6:22 PM
Please be careful with it, it's a production version, so every parameter is live, don't make any order if possible :D But I trust you. Upload is at 70%
 
Hey, I'll give a quick look at it but I can't promise anything. No worries I'll block any request which aren't a GET to avoid getting you in troubles
 
6:45 PM
oh, the file you are looking for is: list_recipe_screen.dart
Thank you very much. With the proejct you will have a much better overview. You don't have to promise anything :) If you will have some ideas, that's also okay. Most likely I'm overcomplicating or don't see the right spot because of the lack of Flutter knowledge... Or I just wanted to solve it via the Java way I know.
oh, I'm from Hungary (Greetings from here :) ), I think I removed any other languages from the project...sorry for that. App is only for this region right now.
 
No problem.
I'd need to know the Flutter version you're currently using to work on this project
 
7:01 PM
uhm... 2.0 I think
yeah, 2.0
 
Ok thx
 
Thanks to you
 
7:57 PM
Didn't run the project because of the old dependencies, but at least I'm able to understand how it was built.

You created the CustomSearchDelegate, right ?
In your original post, you were saying that you successfully queried your endpoint with the search terms, are you sure about that ?
My guess is that you correctly updated your global var "recipeSerachTerms" but you didn't trigger the request toward your endpoint afterward.
 
yes, the search endpoint is reached and the correct result is there
but only if I pull down the screen
after I made a search
so if I enter some search term, start the search, the list is unfiltered
 
Okay so my guess was right.
In your list_recipe_screen, add
Provider.of<SearchRecipeModel>(context, listen: false).searchRecipes();
line 131
 
after pulled down, the screen is refreshed and the filtered list is there
 
@override
Widget buildResults(BuildContext context) {
if (query.length < 4) {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Center(
child: Text(
"Search term must be longer than three letters.",
),
),
],
);
}else{
globals.recipeSerachTerm = query;
Provider.of<SearchRecipeModel>(context, listen: false).searchRecipes();
}
woah that look shitty
 
no problem, can be copied :D
 
8:01 PM
 
and I need that one line
Undefined name 'Provider'
 
you have to import it
your IDE shall help you doing it by putting your cursor above it
import 'package:provider/provider.dart';
 

last day (15 days later) »