|
|
|
|
@ -5,26 +5,31 @@ import 'package:test_sa/models/enums/translation_keys.dart';
|
|
|
|
|
class AppFilledButton extends StatelessWidget {
|
|
|
|
|
final VoidCallback onPressed;
|
|
|
|
|
final TranslationKeys label;
|
|
|
|
|
final bool maxWidth;
|
|
|
|
|
const AppFilledButton({
|
|
|
|
|
@required this.onPressed,
|
|
|
|
|
@required this.label,
|
|
|
|
|
this.maxWidth = false,
|
|
|
|
|
Key key,
|
|
|
|
|
}) : super(key: key);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return Padding(
|
|
|
|
|
padding: const EdgeInsets.symmetric(
|
|
|
|
|
horizontal: 16,
|
|
|
|
|
vertical: 20,
|
|
|
|
|
),
|
|
|
|
|
child: ElevatedButton(
|
|
|
|
|
style: ElevatedButton.styleFrom(
|
|
|
|
|
padding: const EdgeInsets.symmetric(vertical: 16),
|
|
|
|
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
|
|
|
|
|
return SizedBox(
|
|
|
|
|
width: maxWidth ? double.infinity : null,
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.symmetric(
|
|
|
|
|
horizontal: 16,
|
|
|
|
|
vertical: 20,
|
|
|
|
|
),
|
|
|
|
|
child: ElevatedButton(
|
|
|
|
|
style: ElevatedButton.styleFrom(
|
|
|
|
|
padding: const EdgeInsets.symmetric(vertical: 16),
|
|
|
|
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
|
|
|
|
|
),
|
|
|
|
|
onPressed: onPressed,
|
|
|
|
|
child: Text(context.translate(label)),
|
|
|
|
|
),
|
|
|
|
|
onPressed: onPressed,
|
|
|
|
|
child: Text(context.translate(label)),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|