German Saprykin
German Saprykin

Reputation: 6961

Building calendar. Overlapping scrollable content.

I am building calendar based app and trying Flutter.

Can you give advice/example of hierarchy how build complex and efficient layout like Google Calendar daily view? Main question: how should I layout constant hours background and overlapping dynamic events layer?

I used RecyclerView and custom RecyclerView.LayoutManager before, but have no idea about Flutter way.

Google Calendar daily view

Upvotes: 2

Views: 2297

Answers (1)

Collin Jackson
Collin Jackson

Reputation: 116808

You can construct your layout efficiently using GridView.custom.

A custom SliverGridDelegate can produce an aribtrary 2D arrangement of children, including arrangements that are unaligned or overlapping.

An easier option might be to use a CustomMultiChildLayout but that will require laying out all the children instead of just the ones that are visible. It could be slower, but maybe that isn't the bottleneck for a calendar app.

Upvotes: 4

Related Questions