flutter-sqflite-example icon indicating copy to clipboard operation
flutter-sqflite-example copied to clipboard

Breed Selector not returning latest breed list

Open nikhil0304hande opened this issue 1 year ago • 2 comments

The New dog record form on opening does not show latest breeds to select from. This is due to Line 47 in "dog_form_page.dart" file. Following is the code which I could modify and get it working:

Future<List<Breed>> _getBreeds() async { _breeds.clear(); final breeds = await _databaseService.breeds(); _breeds.addAll(breeds); if (widget.dog != null) { _selectedBreed = _breeds.indexWhere((e) => e.id == widget.dog!.breedId); } return _breeds; }

nikhil0304hande avatar Jun 21 '24 17:06 nikhil0304hande

Thanks for opening the issue.

It's been a while, to be honest, so I'll look into the code in some time. Meanwhile, if you think there's an issue, and you have a solution, please feel free to raise a PR. 🎉

thisissandipp avatar Jun 21 '24 17:06 thisissandipp

Hi Sandip, Great to hear back from you. I’ll do raise a PR with the solution and few more changes in couple of days.

Regards, Nikhil

On Fri, 21 Jun 2024 at 11:10 PM, Sandip Pramanik @.***> wrote:

Thanks for opening the issue.

It's been a while, to be honest, so I'll look into the code in some time. Meanwhile, if you think there's an issue, and you have a solution, please feel free to raise a PR. 🎉

— Reply to this email directly, view it on GitHub https://github.com/thecodexhub/flutter-sqflite-example/issues/1#issuecomment-2183172025, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKWXNPQKOLJPFFSVHZKEV23ZIRQQ7AVCNFSM6AAAAABJWNHIGWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBTGE3TEMBSGU . You are receiving this because you authored the thread.Message ID: @.***>

nikhil0304hande avatar Jun 25 '24 04:06 nikhil0304hande