小编Civ*_*vaa的帖子

如何使多个图标转到不同的网址

我的应用程序有一些图标,问题是我将图标设置为一个图标的扩展名/父项,因此当我设置一个图标以转到某个网址时,所有其他图标也会转到该网址。但这不是我想要的,我希望每个图标都转到单独的网址。扩展图标的代码是:`

 Row(
                children: [
                  Expanded(
                      child: TaskCard(
                    label: "Teachers",
                  )),
                  Expanded(
                      child: TaskCard(
                    imageUrl: "assets/school-bag.png",
                    label: "EduPage",
                    pageUrl: "https://willowcosta.edupage.org",
                  )),
Run Code Online (Sandbox Code Playgroud)

`

显示错误: 在此输入图像描述 父图标的代码是:

 SizedBox(
                height: 20.0,
              ),
              Text(
                "Sections",
                style: TextStyle(
                    fontSize: 20.0,
                    fontWeight: FontWeight.bold,
                    fontFamily: "SpaceGrotesk",
                    color: Colors.black),
              ),

              //Here we set the "Shortcuts"

              //If you click Teachers it will take you the page where you can see the Teachers -
              //names a nd availabity alongs side the subject they teach
              //If you click EduPage it takes you to …
Run Code Online (Sandbox Code Playgroud)

dart flutter flutter-layout url-launcher

2
推荐指数
1
解决办法
55
查看次数

标签 统计

dart ×1

flutter ×1

flutter-layout ×1

url-launcher ×1