草庐IT

Flutter_Blue

全部标签

flutter - InkWell 小部件需要 Material 小部件祖先

我在Row中添加InkWell作为Widget,但它抛出了一个错误:flutter:══╡EXCEPTIONCAUGHTBYWIDGETSLIBRARY╞═══════════════════════════════════════════════════════════flutter:ThefollowingassertionwasthrownbuildingInkWell(gestures:[tap],clippedtoBoxShape.rectangle,flutter:dirty,state:_InkResponseState#0e6c5):flutter:NoMaterial

flutter - InkWell 小部件需要 Material 小部件祖先

我在Row中添加InkWell作为Widget,但它抛出了一个错误:flutter:══╡EXCEPTIONCAUGHTBYWIDGETSLIBRARY╞═══════════════════════════════════════════════════════════flutter:ThefollowingassertionwasthrownbuildingInkWell(gestures:[tap],clippedtoBoxShape.rectangle,flutter:dirty,state:_InkResponseState#0e6c5):flutter:NoMaterial

firebase - 如何在 flutter 中按日期将数据从 firestore 排序到 map

我正在尝试将我的firestore中的事件列表排序到map中。像这样Map_events;_events={DateTime.parse('2019-06-30'):['Event1','Event2'],DateTime.parse('2019-06-20'):['Event3','Event4'],}我将Firestore数据文档作为事件有字段name:'Event1'date:'2019-06-20'name:'Event2'date:'2019-06-30'name:'Event3'date:'2019-06-20'name:'Event4'date:'2019-06-20'每

firebase - 如何在 flutter 中按日期将数据从 firestore 排序到 map

我正在尝试将我的firestore中的事件列表排序到map中。像这样Map_events;_events={DateTime.parse('2019-06-30'):['Event1','Event2'],DateTime.parse('2019-06-20'):['Event3','Event4'],}我将Firestore数据文档作为事件有字段name:'Event1'date:'2019-06-20'name:'Event2'date:'2019-06-30'name:'Event3'date:'2019-06-20'name:'Event4'date:'2019-06-20'每

flutter - 在 Flutter 中从 timePicker 选择时间后如何删除 TimeOfDay 文本

我在Flutter中使用timePicker。一旦我从弹出对话框中选择了时间,它就会显示选择的时间,但它不仅会显示时间,例如:12:45,还会显示TimeOfDay,例如:TimeOfDay(12:45)。如何去掉TimeOfDay文本?//DeclarationexampleTimeOfDay_time=newTimeOfDay.now();//TimepickerexamplecodeFuture_selectTime(BuildContextcontext)async{finalTimeOfDaypicked=awaitshowTimePicker(context:context

flutter - 在 Flutter 中从 timePicker 选择时间后如何删除 TimeOfDay 文本

我在Flutter中使用timePicker。一旦我从弹出对话框中选择了时间,它就会显示选择的时间,但它不仅会显示时间,例如:12:45,还会显示TimeOfDay,例如:TimeOfDay(12:45)。如何去掉TimeOfDay文本?//DeclarationexampleTimeOfDay_time=newTimeOfDay.now();//TimepickerexamplecodeFuture_selectTime(BuildContextcontext)async{finalTimeOfDaypicked=awaitshowTimePicker(context:context

flutter - 向 map 中的列表添加值的正确方法是什么?

我正在创建一个Flutter应用程序,我希望用户能够将事件(字符串)添加到Map(Map>)中的列表中。.然后在屏幕上显示它们(稍后在listView上)。这是Events和DatePicker所在的类:classEventBrain{finalMap>events={};FutureaddEvent(BuildContextcontext,Stringtitle)async{finaldtPick=awaitshowDatePicker(context:context,initialDate:DateTime.now(),firstDate:DateTime(2019),lastDa

flutter - 向 map 中的列表添加值的正确方法是什么?

我正在创建一个Flutter应用程序,我希望用户能够将事件(字符串)添加到Map(Map>)中的列表中。.然后在屏幕上显示它们(稍后在listView上)。这是Events和DatePicker所在的类:classEventBrain{finalMap>events={};FutureaddEvent(BuildContextcontext,Stringtitle)async{finaldtPick=awaitshowDatePicker(context:context,initialDate:DateTime.now(),firstDate:DateTime(2019),lastDa

flutter - 卡片小部件内的 ListView 未使用列布局显示在屏幕上

我正在尝试使用列布局在卡片小部件内显示ListView,但卡片小部件未出现在屏幕中,我收到错误消息。然而,当我更改为堆栈布局时,小部件出现在屏幕上但位于其他组件之上,这不是我想要的。请参阅下面我的卡片小部件代码import'package:flutter/material.dart';import'package:finsec/widget/cardview_list_widget.dart';import'package:finsec/widget/header.dart';import'package:finsec/widget/vertical_padding.dart';imp

flutter - 卡片小部件内的 ListView 未使用列布局显示在屏幕上

我正在尝试使用列布局在卡片小部件内显示ListView,但卡片小部件未出现在屏幕中,我收到错误消息。然而,当我更改为堆栈布局时,小部件出现在屏幕上但位于其他组件之上,这不是我想要的。请参阅下面我的卡片小部件代码import'package:flutter/material.dart';import'package:finsec/widget/cardview_list_widget.dart';import'package:finsec/widget/header.dart';import'package:finsec/widget/vertical_padding.dart';imp