Group Group Group Group Group Group Group Group Group

Showing error in code from Chapter 2 (2.4 Building a recipe list)

When entering this code

// 5
          const SizedBox(
            height: 14.0,
          ),

Showing error : Positional arguments must occur before named arguments.
I don’t know what to do from here.

@p4nd4v it looks like you added SizedBox widget as an argument of the Image widget. Should look something like this instead:

Column(
        children: <Widget>[
          Image(image: AssetImage(recipe.imageUrl)),
          const SizedBox(height: 14.0,),
          Text(
            recipe.label,
            style: const TextStyle(
              fontSize: 20.0,
              fontWeight: FontWeight.w700,
              fontFamily: 'Palatino',
            ),
          )
        ],
      ),

You are missing an additional closing parenthesis for Image widget

1 Like

Yes it worked, it was a small mistake that I overlooked. Thanks a lot.