mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-16 01:56:19 +00:00
initialized Splash UI
initialized Login UI initialized Home(no Devices) UI Added Colors (from syncrow website) Added Logo
This commit is contained in:
38
lib/features/shared_widgets/default_text_button.dart
Normal file
38
lib/features/shared_widgets/default_text_button.dart
Normal file
@ -0,0 +1,38 @@
|
||||
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),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user