Files
syncrow-app/lib/features/shared_widgets/default_text_button.dart
Mohammad Salameh 16f47f744c initialized Splash UI
initialized Login UI
initialized Home(no Devices) UI
Added Colors (from syncrow website)
Added Logo
2024-02-15 00:10:33 +03:00

39 lines
959 B
Dart

import 'package:flutter/material.dart';
import 'package:syncrow_app/resource_manager/color_manager.dart';
class DefaultTextButton extends StatelessWidget {
const DefaultTextButton({
super.key,
this.onPressed,
required this.text,
this.isPrimary = false,
});
final void Function()? onPressed;
final String text;
final bool isPrimary;
@override
Widget build(BuildContext context) {
return TextButton(
onPressed: onPressed,
style: isPrimary
? ButtonStyle(
backgroundColor:
MaterialStateProperty.all(ColorsManager.primaryColor),
shape: MaterialStateProperty.all(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
),
)
: null,
child: Text(
text,
style: TextStyle(color: isPrimary ? Colors.white : Colors.black),
),
);
}
}