RenderRepaintBoundary对象在布局期间被赋予了无限大小

时间:2020-07-12 13:48:58

标签: flutter scaffold

调用closescalenderevent页面时出现此错误。我想显示我创建的列表,如果想从应用程序栏中的“后退”按钮返回到上一页,但出现此错误。屏幕不显示。


当我单击日历中的任何一天时,我想转到closeseventcalendar页面,我想从应用程序栏中返回此页面,但标题出现错误,并且该页面未显示。

import 'package:flutter/material.dart';
import 'package:takvim_app/page/calendar.dart';
import 'package:intl/intl.dart' show DateFormat;
import 'package:takvim_app/events/Closespart.dart';
import 'package:takvim_app/Widgets/DropDownmenu.dart';
class CalanderEvent extends StatefulWidget{
  final tarih;

  CalanderEvent(this.tarih);

  @override
  _CalanderEventstate createState() => _CalanderEventstate();

}

class _CalanderEventstate extends State<CalanderEvent> {
  final List<Closespart> tripsList = [
    Closespart(
        "Etkinlik başlığı", DateTime.now(), DateTime.now(), DateTime.now(),
        "Merhaba benim adım name bugun bunu özet yapmak için yaptım ve uzun oldugu zaman aşşağıya inme duurumu olacak diye kontrol ediyorum corona gunlcerınde app geliştme keyfisi Hadi Allaha emanetsın kardeşim"),
    Closespart(
        "Etkinlik başlığı", DateTime.now(), DateTime.now(), DateTime.now(),
        "Özet"),
    Closespart(
        "Etkinlik başlığı", DateTime.now(), DateTime.now(), DateTime.now(),
        "Özet"),
    Closespart(
        "Etkinlik başlığı", DateTime.now(), DateTime.now(), DateTime.now(),
        "Özet"),
  ];

  @override
  Widget build(BuildContext context) {
    return Container(
      child: new ListView.builder(
          itemCount: tripsList.length,
          itemBuilder: (BuildContext context, int index) =>
              buildCalendarevent(context, index)),
    );
  }

  @override
  Widget buildCalendarevent(BuildContext context, int index) {
    final trip = tripsList[index];
    String dropdown = "One";
      return Scaffold(
        appBar: AppBar(
          title: Text("Detaylar"),
          leading: IconButton(
              icon: Icon(Icons.arrow_back),
              onPressed: () {
                Navigator.of(context).pop();
                Navigator.push(
                    context,
                    MaterialPageRoute(builder: (context) => Calendar()));
              }),
        ),
        body: Container(
          child: Card(
            child: Padding(
              padding: const EdgeInsets.all(24.0),
              child: Column(
                children: <Widget>[
                  Row(mainAxisAlignment: MainAxisAlignment.spaceBetween,
                      children: <Widget>[
                        Text(
                          trip.title,
                          style: new TextStyle(fontSize: 30.0),
                        ),
                        Container(child: DropDown(index))
                      ]),
                  Padding(
                    padding: const EdgeInsets.only(top: 1.0, bottom: 16.0),
                    child: Row(children: <Widget>[
                      Text(
                        "${DateFormat('dd/MM/yyyy')
                            .format(trip.Date)
                            .toString()} - ${DateFormat('HH:mm').format(
                            trip.startDate).toString()} - ${DateFormat(
                            'HH:mm')
                            .format(trip.endDate)
                            .toString()}",
                        style: new TextStyle(fontSize: 15),
                      ),
                      Spacer()
                    ]),
                  ),
                  Padding(
                    padding: const EdgeInsets.only(top: 16.0, bottom: 16.0),
                    child: Row(
                      children: <Widget>[
                        Expanded(
                          child: Text(trip.summary,
                              maxLines: 2, overflow: TextOverflow.ellipsis),
                        ),
                        SizedBox(
                          height: 15.0,
                        ),
                        //Spacer()
                      ],
                    ),
                  )
                ],
              ),
            ),
          ),
        ),
      );
    }
  }

0 个答案:

没有答案