我正在使用 flutter 本地通知插件来通知用户事件开始。
所有事件都存储在 firebase 中,并附有日期和时间。
如果用户将该事件添加到他的日程安排中,他就会收到通知。
我的问题是本地通知插件需要参数中的int ,并且在 firebase 中我有 id 类型 String (该事件与另一个生成字符串 ID 的 web 应用程序一起添加到 firebase 中)。
那么flutter中有没有办法让通知与String ID一起工作呢?
这是数据库:

lass DetailScreen extends StatefulWidget {
final String id;
DetailScreen(this.id);
@override
_DetailScreenState createState() => _DetailScreenState();
}
class _DetailScreenState extends State<DetailScreen> {
String firstHalf;
String secondHalf;
bool flag = true;
int selectedValue;
bool isScheduled = false;
bool isLoading = true;
initState() {
selectedValue = 0;
Future.delayed(Duration(seconds: 0), () async {
await getStatus();
final response = await flutterLocalNotificationsPlugin …Run Code Online (Sandbox Code Playgroud)