因此,我想同时构建android和IOS应用程序,而前几天我发现自己很不稳定。我知道IOS需要MacOS,但flutter可以在Windows上运行。
我的问题是,我可以使用flutter在Windows计算机上开发和发布IOS应用程序吗?
我设置了一个动态链接,您可以在其中与这样的人分享链接
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_SUBJECT, "Join my group for Lesn");
intent.putExtra(Intent.EXTRA_TEXT, "https://y28rt.app.goo.gl/?link=https://Lesn.com/joinGroup&apn=c.kristofer.jax2[&amv=21]&groupUid=" + groupUid);
startActivity(intent);
Run Code Online (Sandbox Code Playgroud)
正如你在链接中看到的
" https://y28rt.app.goo.gl/?link=https://Lesn.com/joinGroup&apn=c.kristofer.jax2[&amv=21]&groupUid= " + groupUid
我把额外的数据是
groupUid=" + groupUid)
我的问题是如何使用此链接从链接中接收该字符串
FirebaseDynamicLinks.getInstance()
.getDynamicLink(getIntent())
.addOnSuccessListener(this, new OnSuccessListener<PendingDynamicLinkData>() {
@Override
public void onSuccess(PendingDynamicLinkData pendingDynamicLinkData) {
Uri deeplink = null;
if (pendingDynamicLinkData != null){
deeplink = pendingDynamicLinkData.getLink();
}
}
});
Run Code Online (Sandbox Code Playgroud)
编辑
所以我的问题实际上是为我的深层链接输入了错误的值。现在我已经可以使用它了,但我的另一个问题仍然存在。当我尝试记录值时,使用 deeplink.getQueryParameter("groupUid") 它返回一个空值。
我正在尝试添加一个具有 2 列和 3 行的 gridview。我的问题是,当我尝试将它添加到我的行时,它会使整个页面消失。这是我的代码
class HomePage extends StatelessWidget{
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: new AppBar(
elevation: 0.5,
title: Text("Home", style: TextStyle(fontSize: 15, color: Colors.black45)),
centerTitle: true,
backgroundColor: Colors.white,
),
body: SingleChildScrollView(
child: Column(
children: <Widget>[
new Container(
margin: const EdgeInsets.all(25),
child: Text("Shop Category", style: new TextStyle(fontSize: 18, color: Colors.black, fontFamily: 'Raleway'),textAlign: TextAlign.left,),
),
new GridView.count(
primary: true,
crossAxisCount: 2,
children: <Widget>[
new Image.asset('assets/images/meat.jpg')
],
)
],
)
),
);
}
Run Code Online (Sandbox Code Playgroud) 我已将自定义图标插入到我的应用程序中,当我运行该应用程序时,图标和文本是白色的,而不是原始颜色。
两个问题:
1) 图标原本是黑色的,但当我将其插入底部导航项目时,它们会变成白色。
2)也只有第一个项目在图标下方有一个标题,其余的没有。
这是我的代码
bottomNavigationBar: BottomNavigationBar(
items: <BottomNavigationBarItem>[
BottomNavigationBarItem(
icon: Icon(const IconData(0xe903, fontFamily: 'navBar')),
title: Text('Home'),
),
BottomNavigationBarItem(
icon: Icon(const IconData(0xe902, fontFamily: 'navBar')),
title: Text('Ideas')
),
BottomNavigationBarItem(
icon: Icon(const IconData(0xe903, fontFamily: 'navBar')),
title: Text('Profile')
),
BottomNavigationBarItem(
icon: Icon(const IconData(0xe901, fontFamily: 'navBar')),
title: Text('Bag')
),
],
),
//pubspec.yaml file
fonts:
- family: navBar
fonts:
- asset: assets/fonts/ic_navbar.ttf
Run Code Online (Sandbox Code Playgroud)
4个图标