abuanwar072 / Flutter-Responsive-Admin-Panel-or-Dashboard

Responsive Admin Panel or Dashboard using Flutter
https://youtu.be/_uOgXpEHNbc
MIT License
6.61k stars 1.87k forks source link

cannot run this code with flutter 3.0.5 #51

Open guchengxi1994 opened 2 years ago

guchengxi1994 commented 2 years ago

Describe the bug raise this exception

  creator: Align ← ListTileTheme ← DrawerController-[LabeledGlobalKey<DrawerControllerState>#a3ff9] ← MediaQuery ← LayoutId-[<_ScaffoldSlot.drawer>] ← CustomMultiChildLayout ← AnimatedBuilder ← DefaultTextStyle ← AnimatedDefaultTextStyle ← _InkFeatures-[GlobalKey#9cb2d ink renderer] ← NotificationListener<LayoutChangedNotification> ← PhysicalModel ← ⋯
  parentData: offset=Offset(0.0, 0.0); id=_ScaffoldSlot.drawer
  constraints: MISSING
  size: MISSING
  alignment: AlignmentDirectional.centerStart
  textDirection: ltr
  widthFactor: expand
  heightFactor: expand
shanliangdeYWJ commented 2 years ago

Describe the bug raise this exception

  creator: Align ← ListTileTheme ← DrawerController-[LabeledGlobalKey<DrawerControllerState>#a3ff9] ← MediaQuery ← LayoutId-[<_ScaffoldSlot.drawer>] ← CustomMultiChildLayout ← AnimatedBuilder ← DefaultTextStyle ← AnimatedDefaultTextStyle ← _InkFeatures-[GlobalKey#9cb2d ink renderer] ← NotificationListener<LayoutChangedNotification> ← PhysicalModel ← ⋯
  parentData: offset=Offset(0.0, 0.0); id=_ScaffoldSlot.drawer
  constraints: MISSING
  size: MISSING
  alignment: AlignmentDirectional.centerStart
  textDirection: ltr
  widthFactor: expand
  heightFactor: expand

This may be the problem of datatabel2, modify recent Files file, the height of sizedbox outside datatable2, maybe height: 400


          SizedBox(
            width: double.infinity,
            height: 400,  // <-------------------- add this
            child: DataTable2(
              columnSpacing: defaultPadding,
              minWidth: 600,
              columns: [
                DataColumn(
                  label: Text("File Name"),
                ),
                DataColumn(
                  label: Text("Date"),
                ),
                DataColumn(
                  label: Text("Size"),
                ),
              ],
              rows: List.generate(
                demoRecentFiles.length,
                (index) => recentFileDataRow(demoRecentFiles[index]),
              ),
            ),
          ),