mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-16 01:56:19 +00:00
initialized Application theme
This commit is contained in:
@ -1,25 +1,25 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:syncrow_app/resource_manager/color_manager.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
||||
|
||||
class DefaultTextButton extends StatelessWidget {
|
||||
const DefaultTextButton({
|
||||
super.key,
|
||||
this.onPressed,
|
||||
required this.text,
|
||||
this.isPrimary = false,
|
||||
this.isSecondary = false,
|
||||
});
|
||||
|
||||
final void Function()? onPressed;
|
||||
final String text;
|
||||
|
||||
final bool isPrimary;
|
||||
final bool isSecondary;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return TextButton(
|
||||
onPressed: onPressed,
|
||||
style: isPrimary
|
||||
? ButtonStyle(
|
||||
style: isSecondary
|
||||
? null
|
||||
: ButtonStyle(
|
||||
backgroundColor:
|
||||
MaterialStateProperty.all(ColorsManager.primaryColor),
|
||||
shape: MaterialStateProperty.all(
|
||||
@ -27,11 +27,10 @@ class DefaultTextButton extends StatelessWidget {
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
),
|
||||
)
|
||||
: null,
|
||||
),
|
||||
child: Text(
|
||||
text,
|
||||
style: TextStyle(color: isPrimary ? Colors.white : Colors.black),
|
||||
style: TextStyle(color: isSecondary ? Colors.black : Colors.white),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user