我们可以在Flutter中使用Openstreetmap,还是只能使用Google Maps?我想用另一种方式来显示地图.因为当使用googlemaps api密钥时,他们需要知道一张信用卡而我却没有.
当我选择文本字段时,将显示键盘,但键盘隐藏我选择的TextField.有人有解决方案吗?
谢谢.
我初始化了FireStore.Collection的一个实例:
final Firestore store = Firestore.instance;
Run Code Online (Sandbox Code Playgroud)
现在,如果我按下一个按钮,我想向数据库中添加一个包含新文档和一些字段的新Collection。目前,我只能选择一个现有的集合,并向该集合添加一个字段。该文档是自动编写的,但我想给它起个名字。代码:
onPressed: (){
store.runTransaction((Transaction transaction)async{
store.collection("test@test.de").add({"flutter":"awesome"});
});
print("Absenden");
},
Run Code Online (Sandbox Code Playgroud)
我怎样才能做到这一点?感谢帮助!
import 'package:flutter/material.dart';
class PersonalData extends StatelessWidget {
final String Name;
final String Alter;
final String urlImage;
PersonalData(this.Name, this.Alter, this.urlImage);
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(title: new Text(Name),),
body: new Container(
child: new Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
new Text("Name: " + Name, textAlign: TextAlign.left),
new Text("Alter: " + Alter),
new Image.network(urlImage, height: 200.0, width: 200.0, alignment: Alignment.topRight,),
],
),
),
);
}
}
Run Code Online (Sandbox Code Playgroud)
我怎样才能在文本附近获得图像。目前文本保持左侧,图像位于右侧文本下方