这是我的代码,它简单地使用了 listView 构建器。滚动列表视图意外地落后于上面的行小部件。对于应该使用哪个小部件而不是 listView 构建器有什么建议吗?
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: [
Row(
children: [
Text(
'Sorted By',
style: Theme.of(context).textTheme.caption?.copyWith(
color: AppColors.labelText, fontSize: 14),
).paddingForOnly(right: 20),
sortButtons()
],
),
Text(
'List of Report',
style: Theme.of(context)
.textTheme
.bodyText1
?.copyWith(color: AppColors.profileLabel),
).paddingForOnly(top: 30, bottom: 10),
Flexible(
child:
ListView.builder(
itemBuilder: (context, index) => ListTile(
onTap: () {
Application.customNavigation(
context: context,
path: ReportDetailScreen.route);
},
tileColor: AppColors.listTileBG,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15)),
leading: Image.asset(AssetsPath.calendarSymbol),
title: Text(
'Monday, Aug 05',
style: textTheme.bodyText2?.copyWith(
color: Colors.black,
fontWeight: FontWeight.w500), …Run Code Online (Sandbox Code Playgroud) **我使用 Flutter Downloader Package 完成下载一些文件后,我的应用程序自动关闭并断开与 android studio 的连接。任何人都可以帮助我找到解决方案。
final status = await Permission.storage.request();
if (status.isGranted) {
await downloadPDF();
}
downloadPDF() async {
final externalDir = await getExternalStorageDirectory();
taskId = await FlutterDownloader.enqueue(
url: pdfURL,
savedDir: externalDir.path,
fileName: "Flamingo Order Details",
showNotification: true,
openFileFromNotification: true,
);
}
Run Code Online (Sandbox Code Playgroud)
这是我的控制台错误:
final status = await Permission.storage.request();
if (status.isGranted) {
await downloadPDF();
}
downloadPDF() async {
final externalDir = await getExternalStorageDirectory();
taskId = await FlutterDownloader.enqueue(
url: pdfURL,
savedDir: externalDir.path,
fileName: "Flamingo Order Details",
showNotification: true, …Run Code Online (Sandbox Code Playgroud) download-manager android-download-manager flutter flutter-dependencies flutter-packages
这是我的index.html文件代码
<!DOCTYPE html>
<html>
<head>
<!--
If you are serving your web app in a path other than the root, change the
href value below to reflect the base path you are serving from.
The path provided below has to start and end with a slash "/" in order for
it to work correctly.
Fore more details:
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
-->
<base href="/">
<meta charset="UTF-8">
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
<meta name="description" content="A new Flutter project.">
<!-- iOS meta tags & icons --> …Run Code Online (Sandbox Code Playgroud)