我只有一个简单的问题:是否可以在 flutter 应用程序中使用 bitmoji?如果可能的话,怎么可能呢?有谁知道它是如何工作的,因为我在互联网上找不到解决方案。
提前致谢
我将下面显示的地图保存到 Firestore,但我还想保存一个时间戳,其中应该包含用户使用日期和时间选择器选择的时间和日期。日期已采用“dd.MM.yyyy”格式,时间类似于“6:58 PM”。日期是变量date,时间是变量time。如何保存带有值time和 的时间戳date?
Map<String, dynamic> data = {
'name': userName,
'userUID': userUIDglobal,
'time: '//here I want to safe the timestamp
};
Firestore.instance
.collection('seller')
.document(documentID)
.collection('test')
.add(data);
}
Run Code Online (Sandbox Code Playgroud) 我尝试使用CarousellSlider.builder,但出现错误。我使用了 pub.dev 页面(https://pub.dev/packages/carousel_slider)上示例中的代码。我在行 ( itemBuilder: (BuildContext context, int itemIndex) => Container()上收到错误消息。
错误信息是: The argument type 'Container Function(BuildContext, int)' can't be assigned to the parameter type 'Widget Function(BuildContext, int, int)'.
这是我的代码:
CarouselSlider.builder(
itemCount: motivationImages.length,
itemBuilder: (BuildContext context, int index) {
Container();
}
options: CarouselOptions(
height: 300,
),
),
Run Code Online (Sandbox Code Playgroud) 我创建了一个应用程序,当您点击地图时,它会在 Google 地图中显示自定义标记,但我找不到更改标记大小的方法...有人知道我该怎么做吗?
这是 m 代码的一部分:
createMarker(context) {
if (customIcon == null) {
ImageConfiguration configuration = createLocalImageConfiguration(context);
BitmapDescriptor.fromAssetImage(configuration, 'assets/Boot-Pfeil2.png')
.then((icon) {
setState(() {
customIcon = icon;
});
});
}
}
Marker m = Marker(
markerId: MarkerId('1'),
icon: customIcon,
position: cordinate);
setState(() {
markers.add(m);
});
Run Code Online (Sandbox Code Playgroud) google-maps google-maps-markers dart flutter google-maps-flutter