First commit

This commit is contained in:
2025-03-17 13:58:47 +01:00
commit fff5617757
159 changed files with 6972 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import '../../globals.dart';
class ReflexButton extends StatelessWidget implements PreferredSizeWidget {
final Function()? onPressed;
final String text;
final bool? isFullWidth;
final Color? color;
final Color? textColor;
const ReflexButton(
{Key? key,
this.onPressed,
required this.text,
this.isFullWidth,
this.color,
this.textColor})
: super(key: key);
@override
Widget build(BuildContext context) {
return ElevatedButton(
style: ElevatedButton.styleFrom(
minimumSize: isFullWidth == true
? const Size.fromHeight(36)
: const Size(0, 36),
backgroundColor: color ?? Globals.RP_PRIMARY_COLOR,
foregroundColor: textColor ?? Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(5.0),
),
),
onPressed: onPressed,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Text(text),
));
}
@override
Size get preferredSize => const Size.fromHeight(kToolbarHeight);
}