Flutter - Loading paged JSON data into the ListView
by Brandon Donnelson youtu.be
39 min 24.8k views
In this episode, I cover building a infinite list view which loads paged data using a offset and limit. I mock a call that retrieves json and show how to update the list view. I cover these points in the video: - Fetch paged data using an offset & limit - Display loading until the data is returned - Decode JSON into a list of objects - Scrolling will fetch more paged data - Scrolling back will fetch cached data Source code: https://gist.github.com/branflake2267/dd7251ace7997622d585b4d0769c28d3 Source code fixes for Dart 2: - In this source I explicitly cast. - I change JSON.decode to new JsonCodec().decode https://gist.github.com/branflake2267/31aa8a6ce9b2f4f3956c433e3acfb60d Something I don't cover in this episode, when the cached data grows, it could reach a size detrimental to the application. With this in mind, it could easily be remedied with logic that evicts data loaded in to the cache.
More like this
- Library
Fliggy-Mobile/frefresh
Help you to build pull-down refresh and pull-up loading in the simplest way.
View on github.com
Article 6 min readAuto Generated Json Deserialization With Json Annotation In Flutter
Today we'll see how we can use auto generated deserialization library to parse json with json_annotation and json_serializable dependency in flutter example
Read on codinginfinite.com
Article 14 min readFlutter widget tests: a practical example
by
Natalie Masse Hooper
, on Flutter Pro
Natalie Masse Hooper
@nataliemassehooper 🇬🇧 United Kingdom
Mobile developer with 9 years experience with the Android SDK and 2 years with Flutter. I publish Flutter code tutorials on my blog (cogitas.net) and I also run...
View Natalie on Flutter ProWhen it comes to mobile apps, automated tests play a very important role in app maintenance. So, how do you write tests in Flutter? As you would expect from a modern framework, Flutter offers both uni...
Read on cogitas.net
Article 8 min readHow to implement a custom loading animation in Flutter
“Flutter makes it easy and fast to build beautiful mobile apps” . So let’s put this to the test by creating a custom loading animation 🙂 Of course, Flutter provides a widget for Material Design progr...
Read on cogitas.net