hi I have the example code:
Expanded(
flex: 1,
child: FittedBox(
fit: BoxFit.contain,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
if (result != null) //result != null
Column(
children: <Widget>[
Padding(
padding: const EdgeInsets.all(12.0),
child: Column(
children: [
Text(
"Eldiven Bulundu",
textAlign: TextAlign.center,
style: Theme.of(context)
.textTheme
.headline4!
.copyWith(
fontWeight: FontWeight.bold,
color: ProjectColors.darkBlue),
),
as you can see here, there's a condition works real time.
if (result != null)
it builds something based on value of the varriable. Can you explain how it works and why it does not have function body? Plus, I would like to add vibration when if(result != null) is true but could not manage how to do. How can I add vibration without function body? thanks.