首页 > 解决方案 > 在颤动的灼热栏后面制作一个通知徽章

问题描述

我是颤振的初学者,我试图制作一个像样机一样的小部件:它包含一个搜索栏和通知徽章,在创建代码后我在调试器中遇到错误

代码 :

Row(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Container(
            child: TextField(
              decoration: InputDecoration(
                prefixIcon: Icon(Icons.search_rounded),
                fillColor: Colors.white,
              ),
            ),
          ),
          IconButton(
            icon: Icon(Icons.notifications),
            onPressed: () {},
          ),
        ],
      ),

错误 :

Null check operator used on a null value
The relevant error-causing widget was
Column
lib\screens\homescreen.dart:10

标签: flutterwidget

解决方案


推荐阅读