---
title: "Discussion on \"Replace getter and setter blocks with a oneliner when using ChangeNotifier.\" | Hashnode"
description: "Discussion on \"Replace getter and setter blocks with a oneliner when using ChangeNotifier.\". When dart became ‘non-nullable by default’, an interesting keyword was added to the dart language: ‘late’.\nAlthough it might not be so obvious at first glance, this keyword makes it possible to simplify getter and setter blocks when using a ChangeNot..."
url: "https://hashnode.com/posts/replace-getter-and-setter-blocks-with-a-oneliner-when-using-changenotifier/61d1fc650cfc5655c1846d5d"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Replace getter and setter blocks with a oneliner when using ChangeNotifier.](https://yapb.dev/replace-getter-and-setter-blocks-with-a-oneliner-when-using-changenotifier?utm_source=hashnode&utm_medium=feed)

When dart became ‘non-nullable by default’, an interesting keyword was added to the dart language: ‘late’. Although it might not be so obvious at first glance, this keyword makes it possible to simplify getter and setter blocks when using a ChangeNot...

Aug 11, 2021 · 2 min read · yapb.dev  
Updated Jan 5, 2022  
Read the article

-   [#dart](https://hashnode.com/tag/dart)
-   [#flutter](https://hashnode.com/tag/flutter)

## Written by

[Sander Roest](https://hashnode.com/@jsroest)

@jsroest · Rotterdam, The Netherlands

  
[View profile](https://hashnode.com/@jsroest)

Programming Line Of Business Apps with Flutter

https://bsky.app/profile/sander-roest.bsky.social

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
