Reputation: 65
I'm getting a boolean status true or false from Api, to define whether it is active or inactive like shown bellow :
Align(
alignment: Alignment.topLeft,
child: Text(' ${sectorsProvider.sectorsList[index].is_active == false ?
'Inactive'
: 'Active'
}',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 20,
color: sunnyColor),
),
),
I want to set a TextStyle for both active and inactive. thanks for help
Upvotes: 0
Views: 393
Reputation: 2825
Text('bla',
style: sectorsProvider.sectorsList[index].is_active== true
? TextStyle(...)
: TextStyle(...),
)
Upvotes: 1