38 lines
911 B
Dart
38 lines
911 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class NextButton extends StatelessWidget {
|
|
const NextButton
|
|
({
|
|
super.key,
|
|
required this.onPressed,
|
|
required this.label,
|
|
});
|
|
|
|
final VoidCallback? onPressed;
|
|
final String label;
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return TextButton(
|
|
onPressed: onPressed,
|
|
child: Container(
|
|
width: double.infinity,
|
|
height: 50,
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.circular(16),
|
|
color: onPressed != null ? Colors.red : Colors.grey,
|
|
),
|
|
child: Center(
|
|
child: Text(
|
|
label,
|
|
style: const TextStyle(
|
|
letterSpacing: 2,
|
|
fontSize: 16,
|
|
fontWeight: FontWeight.w500,
|
|
color: Colors.white
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
} |