<commit_before><!--
Copyright (c) 2016, the Flutter project authors.  Please see the AUTHORS file
for details. All rights reserved. Use of this source code is governed by a
BSD-style license that can be found in the LICENSE file.
-->

Flutter: A Walk Up A Mahogony Staircase
=======================================

Prologue
--------

This talk is intended to explain Flutter's design. As such, it starts
from first principles and slowly walks up to the full design. This
means that, especially early in the talk, the code presented will not
be very ergonomic. If you're looking for a tutorial on how to use
Flutter, this is not it. Nor is it a comprehensive API description.

   This is a tutorial: https://flutter.io/tutorial/

   These are our API docs: http://docs.flutter.io/

   This is our Web site with more information: https://flutter.io/


Chapter 1: Let's create an app!
-------------------------------

Let's write a trivial app. It'll just show a table with my wishlist of
items I want from the Märklin 2016 model train catalogue.

```
$ flutter create trains
```

Type type type.

<https://github.com/Hixie/mahogony-staircase/blob/master/apps/chapter1/trains/lib/main.dart>

```
$ flutter analyze
$ flutter run
```

Success!

Pros of this approach: There's only one code path.
Cons of this approach: You do a ton of work every frame.


Chapter 2: Adding more to the app
---------------------------------

Ok. Let's add a checkbox to the first cell of each row so that we can
track which one's I've preordered.

<https://github.com/Hixie/mahogony-staircase/blob/master/apps/chapter2/trains/lib/main.dart>


Chapter 3: Rendering library
----------------------------

Having to do all these calculations is ridiculous.
<commit_msg>Add more text to chapter 1. (WIP, will continue tonight.)<commit_after><!--
Copyright (c) 2016, the Flutter project authors.  Please see the AUTHORS file
for details. All rights reserved. Use of this source code is governed by a
BSD-style license that can be found in the LICENSE file.
-->

Flutter: A Walk Up A Mahogony Staircase
=======================================

Prologue
--------

This talk is intended to explain Flutter's design. As such, it starts
from first principles and slowly walks up to the full design. This
means that, especially early in the talk, the code presented will not
be very ergonomic. If you're looking for a tutorial on how to use
Flutter, this is not it. Nor is it a comprehensive API description.

   This is a tutorial: https://flutter.io/tutorial/

   These are our API docs: http://docs.flutter.io/

   This is our Web site with more information: https://flutter.io/


Chapter 1: Let's create an app!
-------------------------------

Let's write a trivial app. It'll just show a table with my wishlist of
items I want from the Märklin 2016 model train catalogue.

```
$ flutter create trains
```

Type type type.

<https://github.com/Hixie/mahogony-staircase/blob/master/apps/chapter1/trains/lib/main.dart>

```
$ flutter analyze
$ flutter run
```

Success!


Chapter 2: Adding more to the app
---------------------------------

Ok. Let's add a checkbox to the first cell of each row so that we can
track which one's I've preordered.

<https://github.com/Hixie/mahogony-staircase/blob/master/apps/chapter2/trains/lib/main.dart>

Pros of this approach:
- There's only one code path.
- There's no question what's going on.

Cons of this approach:
- You do a ton of work every frame.
- Holy cow the mathematics.

Trees:



Chapter 3: Rendering library
----------------------------

Having to do all these calculations is ridiculous.

{'fraction_non_alphanumeric': 0.1478814732761008, 'fraction_numerical': 0.007477153143173636, 'mean_word_length': 2.9518599562363237, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3988915', 'n_tokens_mistral': 1102, 'n_tokens_neox': 996, 'n_words': 480}