flutter / website

Flutter documentation web site
https://docs.flutter.dev
Other
2.8k stars 3.21k forks source link

Document "How to create a widget with a custom RenderObject" #2122

Open zoechi opened 5 years ago

zoechi commented 5 years ago

@sethladd commented on Mon Aug 01 2016

From a user:

A “creating a custom widget” section in basic Flutter layout documentation would be helpful, as the setup for a new Custom Widget requires a lot of knowledge up front:


@Hixie commented on Tue Nov 14 2017

Some of this is documented now in the RenderBox and RenderObject API docs. Maybe we should add more to the RenderObjectWidget API docs too?


@xster commented on Fri Dec 22 2017

The RenderBox doc was pretty useful. Especially examples like with RenderOpacity. I think a page like https://flutter.io/tutorials/layout/ that walks through a hypothetical exercise with a flow-chart like structure would be nice too.

i.e. so you want to write your own RenderBox?

How many children? -> Common reusable utils -> One -> Many

Do you want to customize layout? -> Override X, details -> Override Y, details -> Example/exercise

Do you want to paint different? -> Override X, details -> Override Y, details -> Example/exercise


@goderbauer commented on Thu Dec 27 2018

@zoechi Should this be moved to the website repo? Most people I've talked to expect this to be a tutorial on the website. The API docs already have a lot of information on this, but most people want some kind of a codelab on this.

zoechi commented 5 years ago

Copied here for

kind of a codelab on this.

sfshaza2 commented 5 years ago

Good idea. We could add it to the basic layout page/