Flutter DataTableのヘッダーを非表示にするサンプル

環境
Windows11 pro 64bit
Flutter 3.3.7

構文

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
headingRowHeight: 0,
headingRowHeight: 0,
headingRowHeight: 0,

DataTableのヘッダーを非表示にするには、引数「headingRowHeight」を使います。
引数「headingRowHeight」に「0」を指定します。

使用例

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
@override
Widget build(BuildContext context) {
return SafeArea(
child: Scaffold(
body: DataTable(
headingRowHeight: 0,
columns: [
DataColumn(
label: Text(xxx),
xxx
),
rows: _list,
),
),
);
}
@override Widget build(BuildContext context) { return SafeArea( child: Scaffold( body: DataTable( headingRowHeight: 0, columns: [ DataColumn( label: Text(xxx), xxx ), rows: _list, ), ), ); }
@override
Widget build(BuildContext context) {
  return SafeArea(
    child: Scaffold(
      body: DataTable(
        headingRowHeight: 0,
        columns: [
          DataColumn(
            label: Text(xxx),
            xxx
          ),
        rows: _list,
      ),
    ),
  );
}

 

Flutter

Posted by arkgame