avatarsimbu

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

2236

Abstract

just covers the eggs – not even a millimetre more. If you had a centimetre of water covering the egg then you could still get the same result, but you’d have to play with the timing."</span> }, { <span class="hljs-comment">"sequenceNumber"</span>: <span class="hljs-comment">"2"</span>, <span class="hljs-comment">"instruction"</span>: <span class="hljs-comment">"Put the pan on maximum heat with the lid on and bring to the boil."</span> }, { <span class="hljs-comment">"sequenceNumber"</span>: <span class="hljs-comment">"3"</span>, <span class="hljs-comment">"instruction"</span>: <span class="hljs-comment">"As soon as the water starts to bubble, remove from the heat. As you take the pan off, set a timer for six minutes; keep the lid on. Make sure you time it exactly, and you’ll end up with the perfect egg."</span> } ] }</pre></div><p id="03b0">Some acceptance criteria:</p><ul><li>Displays a list of recipes</li><li>Each recipe has a title, author and a picture.</li></ul><p id="7124">And a design for our list item:</p><figure id="3439"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*qoaRUd99dwlCKZ2N-lsZDg.png"><figcaption>Recipe list item design</figcaption></figure><p id="19fe">Because it’s so close to Christmas we couldn’t get our API approved, so we created a simple <a href="https://gitlab.com/simbu-mobile/digestibleme/-/blob/main/lib/data/api_client.dart">api client class</a> that mocks the data for the recipe list.</p><p id="416c">Now we have the data we can display the data items in a list using the <a href="https://api.flutter.dev/flutter/widgets/ListView-class.html">ListView</a> widget.</p><h2 id="e4f7">Ta Da</h2><figure id="456d"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*_x7reKwZCr5i7MBIvvHzzQ.png"><figcaption>Recipe List</figcaption></figure><p id="fa79">You maybe thinking why didn’t we build the digest list first ?</p><p id="d1fb">Because we only have one interest, recipes, we can add the digest list when it is needed.</p><p id="a4d8">The focus is on building content that matters and not framework or things we might need.</p><p id="84aa">So on that note, for now, lets just ch

Options

ange the tab description:</p><figure id="6afe"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*s7VZW3_11pBAPL4LRR6T3g.png"><figcaption>Recipe Tab Description</figcaption></figure><p id="14a7"><a href="https://gitlab.com/simbu-mobile/digestibleme/-/blob/main/lib/tabs/interests_tab.dart">recipies_tab.dart</a></p><h2 id="8e0a">BackBurner</h2><p id="4c58">Use of a API on a server, instead of mocked data.</p><p id="a808">Better application of styles, including inclusion of Apples design guideline for the TabBar, that state that it should be translucent when items are under it and opaque when at the end of the list.</p><h2 id="e079">XP</h2><p id="ab2f">Use of <b>dio</b> a powerful Http client for Dart, which supports Interceptors, used to inject canned data.</p><p id="c618">The reason for choosing and using a package now is that it saves us having to create requests and response objects, we will hook it up to a real Api soon.</p><h2 id="af66">People</h2><p id="67b5">“The speed of the project is the speed at which ideas move between minds”</p><p id="a104">“or its inverse which is stronger, anything that slows the movement of ideas between minds slows the project down”</p><p id="ec15"><b>Alistar Cockburn</b></p><figure id="a17f"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*9OFax2k1ImISj5TAdig41w.jpeg"><figcaption></figcaption></figure><figure id="945b"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*Mb6Qdsi00SFMhvAqc15vDg.jpeg"><figcaption></figcaption></figure><h2 id="3678">One more thing</h2><p id="ed69">“You can’t connect the dots looking forward; you can only connect them looking backward. So you have to trust that the dots will somehow connect in your future.”</p><p id="1f49"><b>Steve Jobs</b></p><h1 id="d05b">Other posts in the series</h1><p id="7b3e">Development</p><ul><li><a href="/@simbu/flutter-layout-aca3bbe4714d">Layout</a></li><li><a href="/@simbu/709f87b6a244?source=your_stories_page-m">Lists</a></li></ul><p id="b232">DevOps:</p><ul><li><a href="/@simbu/flutter-ci-workflow-460a00eb782e">Continuous Integration — Workflow</a></li><li><a href="/@simbu/flutter-ci-web-8d081bcbec5">Continuous Integration — Web</a></li></ul></article></body>

Join Medium to view all my articles.

Flutter for iOS-Lists

With xmas round the corner, our sponsor has asked that we add a new digest to share recipes.

Santa’s helper will need to get up and have a pre-breakfast boiled egg, so lets just cut to to the chase and start with some actual data, some json:

{
	"title": "How to boil an egg, the Heston Blumenthal way",
	"titleImage": "https://i.guim.co.uk/img/static/sys-images/Guardian/Pix/pictures/2014/11/5/1415205733799/4bfbd71a-6cd0-4494-833f-eaaed20a15b3-1020x612.jpeg?width=620&quality=45&auto=format&fit=max&dpr=2&s=ca3a95d7e761d267eff1b79b58cc4849",
	"author": "Heston Blumenthal",
	"origin": "https://www.theguardian.com/lifeandstyle/2014/nov/11/how-to-boil-an-egg-the-heston-blumenthal-way",
	"ingredients": [
        {
        	"quantity": "1",
			"quantityType": "unit",
            "name": "egg",
			"type": "Dairy"
        }
	],
	"steps": [
        {
        	"sequenceNumber": "1",
            "instruction": "Take a small saucepan with a glass lid and carefully place a single egg (or two, or three) inside it. Burford brown eggs have a nice orange yolk. Fill the pan so the water only just covers the eggs – not even a millimetre more. If you had a centimetre of water covering the egg then you could still get the same result, but you’d have to play with the timing."
        },
        {
        	"sequenceNumber": "2",
            "instruction": "Put the pan on maximum heat with the lid on and bring to the boil."
        },
		{
        	"sequenceNumber": "3",
            "instruction": "As soon as the water starts to bubble, remove from the heat. As you take the pan off, set a timer for six minutes; keep the lid on. Make sure you time it exactly, and you’ll end up with the perfect egg."
        }
	]
}

Some acceptance criteria:

  • Displays a list of recipes
  • Each recipe has a title, author and a picture.

And a design for our list item:

Recipe list item design

Because it’s so close to Christmas we couldn’t get our API approved, so we created a simple api client class that mocks the data for the recipe list.

Now we have the data we can display the data items in a list using the ListView widget.

Ta Da

Recipe List

You maybe thinking why didn’t we build the digest list first ?

Because we only have one interest, recipes, we can add the digest list when it is needed.

The focus is on building content that matters and not framework or things we might need.

So on that note, for now, lets just change the tab description:

Recipe Tab Description

recipies_tab.dart

BackBurner

Use of a API on a server, instead of mocked data.

Better application of styles, including inclusion of Apples design guideline for the TabBar, that state that it should be translucent when items are under it and opaque when at the end of the list.

XP

Use of dio a powerful Http client for Dart, which supports Interceptors, used to inject canned data.

The reason for choosing and using a package now is that it saves us having to create requests and response objects, we will hook it up to a real Api soon.

People

“The speed of the project is the speed at which ideas move between minds”

“or its inverse which is stronger, anything that slows the movement of ideas between minds slows the project down”

Alistar Cockburn_

One more thing

“You can’t connect the dots looking forward; you can only connect them looking backward. So you have to trust that the dots will somehow connect in your future.”

Steve Jobs_

Other posts in the series

Development

DevOps:

Flutter
Programming
Dart
Mobile
iOS
Recommended from ReadMedium