Reputation: 37
Here I want to compare the currentvalue with the two strings I gave and I want to create a widget accordingly, but I can only check if it is equal to one string.
Widget buildSecondDropDown() {
return currentValue == "Kare" && "Dikdörtgen"
? Container(
width: 200,
padding: const EdgeInsets.symmetric(
horizontal: 12,
vertical: 4,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.white,
),
)
: Container();
}
Upvotes: 1
Views: 1229
Reputation:
try replace line 2 :
return currentValue == "Kare" && currentValue == "Dikdörtgen"
This should work
Upvotes: 4