flutter - 为什么每次使用 SfCalendar() Widget 时都会出错?我已经输入了依赖项
问题描述
“发生异常。FlutterError(无法加载资产:packages/timezone/data/2020a.tzf)”。我不能简单地运行 SfCalendar 小部件。这是我的代码:
return Scaffold(
backgroundColor: Colors.transparent,
appBar: AppBar(
title: Text(
'Calendar View',
style: TextStyle(fontSize: 22, fontWeight: FontWeight.w500),
),
centerTitle: true,
backgroundColor: Color(0xFF57A0D3),
elevation: 0.0,
),
body: Container(
child: SfCalendar(
view: CalendarView.month,
),
),
);
解决方案
执行flutter clean
并重新启动应用程序,然后flutter pub get
在终端中执行。它对我有用
推荐阅读
- ionic-framework - 如何通过 IFRAME 在 IONIC APP 中嵌入网站?
- github - Github 使用哪种算法来生成他们的个人访问令牌
- solidity - 数据“位置”必须是“存储”或“内存”,但没有给出?
- json - 如何在 SwiftUI 中访问嵌套的 JSON API 数据?
- powershell - Powershell Invoke-RestMethod - 处理 Uri 中的特殊字符
- java - 读取音频文件的外部存储并将它们作为Java列表返回的最佳方法是什么?
- react-native - 在本机反应中加载PNG图像
- java - 与复合主键的双向 OneToMany 关系
- react-router - 嵌套的 React Route 导致父级重新挂载
- c++ - Dev C++ 提供一个输出,但 Visual Studio 代码为相同代码提供另一个输出