# Chapter 10 won't build

**URL:** <https://forums.kodeco.com/t/chapter-10-wont-build/215119>\
**Category:** Flutter Apprentice\
**Created:** [September 13, 2026, 12:40am UTC](https://forums.kodeco.com/t/chapter-10-wont-build/215119 "2026-09-13T00:40:02Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![rttngmsft](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/rttngmsft/32/111867_2.png) [@rttngmsft](https://forums.kodeco.com/u/rttngmsft)\
**Post date:** [September 13, 2026, 12:40am UTC](https://forums.kodeco.com/t/chapter-10-wont-build/215119/1 "2026-09-13T00:40:02Z")

</div>

ERROR: ../../.pub-cache/hosted/pub.dev/flutter\_html-3.0.0/lib/src/tree/styled\_element.dart:31:17: Error: Method not found: ‘matches’.  
ERROR: return qs.matches(element, selector);  
ERROR: ^^^^^^^  
ERROR: Target kernel\_snapshot\_program failed: Exception  
Error: Build process failed  
App failed to start

---

<div class="post-metadata">

**Author:** ![rttngmsft](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/rttngmsft/32/111867_2.png) [@rttngmsft](https://forums.kodeco.com/u/rttngmsft)\
**Post date:** [September 13, 2026, 12:40am UTC](https://forums.kodeco.com/t/chapter-10-wont-build/215119/2 "2026-09-13T00:40:51Z")

</div>

This is the message I get when trying to run the chapter 10 project.

Anybody have any ideas where to start with this?

---

<div class="post-metadata">

**Author:** ![robertomachorro](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/robertomachorro/32/111603_2.png) [@robertomachorro](https://forums.kodeco.com/u/robertomachorro)\
**Post date:** [September 13, 2026, 7:10pm UTC](https://forums.kodeco.com/t/chapter-10-wont-build/215119/3 "2026-09-13T19:10:53Z")

</div>

This seems to be a dependency incompatibility between what the books code has and what you have. What does your flutter\_html contain? try updating to latest and then do the old:

```auto
flutter clean
rm -rf pubspec.lock .dart_tool
flutter pub get
flutter run

```

@spgms

---

<div class="post-metadata">

**Author:** ![rttngmsft](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/rttngmsft/32/111867_2.png) [@rttngmsft](https://forums.kodeco.com/u/rttngmsft)\
**Post date:** [September 13, 2026, 9:25pm UTC](https://forums.kodeco.com/t/chapter-10-wont-build/215119/4 "2026-09-13T21:25:30Z")

</div>

I tried the flutter clean steps to no avail.

I ran: flutter pub run build\_runner build --delete-conflicting-outputs

`That seemed to generate some new freeze output files.`

I am getting a lot of ‘undefined variables’ messages now.

I have to get up to speed with the freeze package and see what is going on with that.

Thanks for your help.

I’ll work on seeing how this freeze/json code works.

---

<div class="post-metadata">

**Author:** ![rttngmsft](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/rttngmsft/32/111867_2.png) [@rttngmsft](https://forums.kodeco.com/u/rttngmsft)\
**Post date:** [September 19, 2026, 5:48am UTC](https://forums.kodeco.com/t/chapter-10-wont-build/215119/5 "2026-09-19T05:48:18Z")

</div>

These are the steps I took to repair chap 10 starter app.

1. flutter create starter  
This will give you a clean project so you can avoid some error messages  
about gradle versions and index.html.  
starter matches the name in the pubspec.yaml. See below.

2. Copy over /assets and /lib from the original project.  
That is all you need from the old folder. So far at least.

3. Replace the pubspec.yaml  
flutter\_html 3.0.0 has a problem. This is what breaks the build.  
[[BUG] Build broken by html 0.15.7: Method not found: 'matches' in styled\_element.dartError · Issue #1522 · Sub6Resources/flutter\_html · GitHub](https://github.com/Sub6Resources/flutter_html/issues/1522)

Notice in pubspec.yaml it is ‘flutter\_html: 3.0.0-beta.2’ , no circumflex.  
The circumflex causes flutter to bring in 3.0.0, which has a problem.

Notice also the pubspec.yaml has a lot of upgrades to the latest and greatest  
packages. Most these are needed for a good result. Especially the riverpod  
and freeze stuff.

vs code does a pretty good job of fetching packages, but don’t be  
afraid to do:  
flutter clean  
rm -rf pubspec.lock .dart\_tool  
flutter pub get

1. freeze stuff  
Search for @freeze functions.  
Append abstract to each of these. The latest version apparently needs this.  
vs code highlights a lot of these errors.

Generated freeze files need regeneration.  
dart run build\_runner clean  
dart run build\_runner build

1. vs code fixed a bunch of super.key red flags. Take advantage.

2. image path curiosities  
Errors will show up at run-time about not locating images.  
Should it be /assets/images… or /images…  
Do the cut and paste fix ups.

3. Click on main and run the app. It should come up now.

* * *

## pubspec.yaml

name: starter  
description: “A new Flutter project.”

publish\_to: ‘none’

version: 1.0.0+1

environment:  
sdk: ^3.13.3

dependencies:  
flutter:  
sdk: flutter  
freezed\_annotation: ^3.1.0  
json\_annotation: ^4.12.0  
colorize\_lumberdash: ^3.0.0  
desktop\_window: ^0.4.4  
flutter\_riverpod: ^3.4.3  
lumberdash: ^3.0.0  
logging: ^1.3.0  
cupertino\_icons: ^1.0.9  
flutter\_svg: ^2.3.0  
#adaptive\_scaffold\_plus: ^1.1.1  
flutter\_adaptive\_scaffold: ^0.1.6  
auto\_size\_text: ^3.0.0  
cached\_network\_image: ^4.0.0  
flutter\_html: 3.0.0-beta.2  
#flutter\_html: 3.0.0  
flutter\_slidable: ^4.0.3

dev\_dependencies:  
flutter\_test:  
sdk: flutter  
build\_runner: ^2.16.1  
freezed: ^4.0.1  
json\_serializable: ^6.14.1  
flutter\_lints: ^6.0.0

flutter:  
uses-material-design: true

---

<div class="post-metadata">

**Author:** ![rttngmsft](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/rttngmsft/32/111867_2.png) [@rttngmsft](https://forums.kodeco.com/u/rttngmsft)\
**Post date:** [September 19, 2026, 6:13am UTC](https://forums.kodeco.com/t/chapter-10-wont-build/215119/6 "2026-09-19T06:13:54Z")

</div>

One more point:

providers.dart has a problem function which you should comment out.

Needs some work.

/\* final repositoryProvider = ChangeNotifierProvider((ref) {

return MemoryRepository();

});

\*/

---

<div class="post-metadata">

**Author:** ![spgms](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/spgms/32/111854_2.png) [@spgms](https://forums.kodeco.com/u/spgms)\
**Post date:** [September 19, 2026, 6:48pm UTC](https://forums.kodeco.com/t/chapter-10-wont-build/215119/7 "2026-09-19T18:48:33Z")

</div>

Hi! Sorry, I missed these messages. Let me see if I can find a quick solution.

---

<div class="post-metadata">

**Author:** ![spgms](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/spgms/32/111854_2.png) [@spgms](https://forums.kodeco.com/u/spgms)\
**Post date:** [September 20, 2026, 1:47am UTC](https://forums.kodeco.com/t/chapter-10-wont-build/215119/8 "2026-09-20T01:47:39Z")

</div>

There were more things than @rttngmsft had that needed updated. I have the starter project done, but still need to work through the chapter to get the final project done. This will impact future chapters and text for the chapters.

cc: @robertomachorro
