kuwabara tech note

2022-08-20から1日間の記事一覧

Flutterのtear-offとは?使うべき理由

tear-off とは Flutterで関数のコールバックに匿名関数を用いない方法です。他の言語でいうfunction pointerです。 ・tear-offの例 TextButton( onPressed:button.toggle ) ・tear-offを使わない例 TextButton( onPressed: () { button.toggle(); } ) TextBu…