import 'package:flutter/material.dart'; class FilledButton extends StatelessWidget { const FilledButton({ Key? key, this.onPressed, this.title, this.child, }) : super(key: key); final VoidCallback? onPressed; final String? title; final Widget? child; @override Widget build(BuildContext context) { return ElevatedButton( onPressed: onPressed, child: child ?? Text(title ?? ''), style: ElevatedButton.styleFrom( onPrimary: Theme.of(context).colorScheme.onPrimary, primary: Theme.of(context).colorScheme.primary, ).copyWith(elevation: ButtonStyleButton.allOrNull(0.0)), ); } }