Files
tm_app/lib/views/widget/login_button.dart
T
2025-08-03 09:44:43 +03:30

39 lines
1003 B
Dart

import 'package:flutter/material.dart';
import '../../core/constants/colors.dart';
import '../../core/constants/texts.dart';
import '../../size_config.dart';
class LoginButton extends StatelessWidget {
final bool isEnabled;
final VoidCallback? onPressed;
const LoginButton({
super.key,
required this.isEnabled,
required this.onPressed,
});
@override
Widget build(BuildContext context) {
return SizedBox(
width: double.infinity,
height: 55.0.h(),
child: ElevatedButton(
onPressed: onPressed,
style: ElevatedButton.styleFrom(
backgroundColor: isEnabled ? ColorManager.mainBlue : Colors.grey[300],
foregroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(28.0.w()),
),
),
child: Text(
TextManager.loginButton,
style: TextStyle(fontSize: 16.0.sp(), fontWeight: FontWeight.bold),
),
),
);
}
}