You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
diplomatic-quarter/lib/vital_signs/components/start_button.dart

38 lines
950 B
Dart

import 'package:flutter/material.dart';
class StartButton extends StatelessWidget {
final void Function() onPressed;
final bool disabled;
const StartButton({
Key? key,
required this.onPressed,
required this.disabled,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Align(
alignment: Alignment.bottomCenter,
child: Container(
margin: const EdgeInsets.fromLTRB(0, 0, 0, 50),
child: ElevatedButton(
onPressed: (disabled) ? () {} : onPressed,
style: ElevatedButton.styleFrom(
fixedSize: const Size(100, 100),
shape: const CircleBorder(),
backgroundColor: (disabled) ? Colors.grey : Colors.orangeAccent,
elevation: 8,
),
child: const Text(
"START",
style: TextStyle(
fontSize: 16,
),
),
),
),
);
}
}