mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-16 10:06:16 +00:00

initialized Login UI initialized Home(no Devices) UI Added Colors (from syncrow website) Added Logo
39 lines
959 B
Dart
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),
|
|
),
|
|
);
|
|
}
|
|
}
|