39 lines
1021 B
Dart
39 lines
1021 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
import '../../../core/constants/colors.dart';
|
|
import '../../../core/constants/strings.dart';
|
|
import '../../../core/utils/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 ? AppColors.mainBlue : Colors.grey[300],
|
|
foregroundColor: Colors.white,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(28.0.w()),
|
|
),
|
|
),
|
|
child: Text(
|
|
AppStrings.loginButton,
|
|
style: TextStyle(fontSize: 16.0.sp(), fontWeight: FontWeight.bold),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|