Add the log name to the container and make sure it does not move while scrolling

Viewed 29

I am writing a page in which there will be Istria events, which I could leaf through. The whole event looks the way I want it to. But the problem is that I want to add a header to this "History Event " container, in the center (which would remain in place when scrolling). I can't do it in any way, I will be grateful for your help

My Page:

enter image description here

My code:

          Expanded(
              child: Container(
                alignment: Alignment.center,
                decoration: BoxDecoration(border: Border.all(width: 2), borderRadius: BorderRadius.circular(25)),
                child: Scrollbar(
                    child: new ListView(
                      shrinkWrap: true,
                      children: [
                        Container(
                      alignment: Alignment.bottomLeft,
                            child: FixedTimeline.tileBuilder(
                              theme: TimelineThemeData(
                                nodePosition: 0.23,
                                color: Colors.blueGrey,
                                indicatorTheme: IndicatorThemeData(
                                  position: 2,
                                  size: 20.0,
                                ),
                                connectorTheme: ConnectorThemeData(
                                  thickness: 2.5,
                                ),
                              ),
                              builder: TimelineTileBuilder.connectedFromStyle(
                                contentsAlign: ContentsAlign.basic,
                                oppositeContentsBuilder: (context, index) => Padding(
                                  padding: const EdgeInsets.all(8.0),
                                  child: Text('21.09.16 \ 14:48'),
                                ),
                                contentsBuilder: (context, index) => Card(
                                  child: Padding(
                                    padding: const EdgeInsets.all(8.0),
                                    child: Text('история событий (тестовое событие)(тестовое событие)'),
                                  ),
                                ),
                                connectorStyleBuilder: (context, index) => ConnectorStyle.solidLine,
                                indicatorStyleBuilder: (context, index) => IndicatorStyle.dot,
                                itemCount: 10,
                              ),
                            )
              ),


                      ],
                    )),
              )
          )

I want to do it like this

enter image description here

1 Answers
Related