Erweiterungen

This commit is contained in:
Sven committed 2024-01-18 10:41:01 +01:00
1 parent 550c11cb58
commit fcda77177a
9 files changed
+1275 -13

No files matched your search

+37 -4
View File
@@ -177,15 +177,16 @@ class Util {
}
Widget getDefaultButton(String text, Function() onPressed, {Image? image, double? buttonHeight}) {
return SizedBox(
/*return SizedBox(
height: buttonHeight ?? 60,
child: Stack(
fit: StackFit.expand,
children: [
Row(
children: [
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
Padding(
padding: const EdgeInsets.all(0),
child: Expanded(
child: SizedBox(
height: 60,
child: ElevatedButton(
@@ -211,6 +212,38 @@ Widget getDefaultButton(String text, Function() onPressed, {Image? image, double
Positioned(left: 20, top: 15, child: Center(child: image))
],
),
);*/
return SizedBox(
height: buttonHeight ?? 50,
child: MaterialButton(
color: const Color.fromARGB(255, 220, 220, 220),
disabledColor: Colors.indigo[400],
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(
Radius.circular(15),
),
),
onPressed: onPressed,
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Visibility(
visible: image != null,
child: CircleAvatar(
backgroundColor: Colors.transparent,
child: image,
),
),
Expanded(
child: Text(
text,
style: const TextStyle(color: Colors.black, fontSize: 18.0),
textAlign: TextAlign.center,
),
),
],
),
),
);
}