ohneMaengelButton method
Implementation
Widget ohneMaengelButton(BuildContext context) {
return FutureBuilder(
future: all().last,
builder: (context, snapshot) {
if (snapshot.connectionState != ConnectionState.done) {
return Container();
}
return TextButton(
style: TextButton.styleFrom(
foregroundColor:
Theme.of(context).colorScheme.onPrimaryContainer,
// iconColor: Theme.of(context)
// .colorScheme
// .onPrimaryContainer,
backgroundColor: snapshot.data!.isNotEmpty
? Colors.grey.shade400
: Theme.of(context).colorScheme.primaryContainer,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15),
),
padding: EdgeInsets.all(0),
),
onPressed: () => ohneMaengelAction(context),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
children: [
Icon(
Icons.check,
),
SizedBox(width: 5),
Text(S.of(context).ohneMaengel),
],
),
));
});
}