Files
game-tracker/lib/presentation/widgets/full_width_button.dart

30 lines
821 B
Dart

import 'package:flutter/material.dart';
import 'package:game_tracker/core/custom_theme.dart';
class FullWidthButton extends StatelessWidget {
const FullWidthButton({super.key, required this.text, this.onPressed});
final String text;
final VoidCallback? onPressed;
@override
Widget build(BuildContext context) {
return ElevatedButton(
onPressed: onPressed,
style: ElevatedButton.styleFrom(
minimumSize: Size(MediaQuery.sizeOf(context).width * 0.9, 60),
backgroundColor: CustomTheme.primaryColor,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
),
child: Text(
text,
style: const TextStyle(
fontWeight: FontWeight.w500,
fontSize: 22,
color: Colors.white,
),
),
);
}
}