Textknopf Flutterstil
TextButton(
child: Text('Text'),
style: TextButton.styleFrom(primary: Colors.blue),
onPressed: () {
print('Pressed');
},
)
loonix
TextButton(
child: Text('Text'),
style: TextButton.styleFrom(primary: Colors.blue),
onPressed: () {
print('Pressed');
},
)
ElevatedButton(
style: ButtonStyle(
backgroundColor: MaterialStateProperty.resolveWith<Color>(
(Set<MaterialState> states) {
if (states.contains(MaterialState.pressed))
return Theme.of(context).colorScheme.primary.withOpacity(0.5);
return null; // Use the component's default.
},
),
),
)