📜  listview flutter 为列表底部提供填充 - 无论代码示例

📅  最后修改于: 2022-03-11 14:57:57.110000             🧑  作者: Mango

代码示例1
import 'package:flutter/material.dart';

main() {
  runApp(MaterialApp(
      home: Scaffold(
    body: ListView.builder(
        padding: const EdgeInsets.only(bottom: kFloatingActionButtonMargin + 48),
        itemCount: 23,
        itemBuilder: (context, index) => ListTile(
              trailing: Text('$index'),
            )),
    floatingActionButton: FloatingActionButton(
      onPressed: () {},
    ),
  )));
}