55 lines
1.4 KiB
Dart
55 lines
1.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:rluv/global/styles.dart';
|
|
|
|
class CuteDrawerButton extends StatelessWidget {
|
|
const CuteDrawerButton(
|
|
{super.key,
|
|
required this.text,
|
|
required this.color,
|
|
required this.onPressed});
|
|
|
|
final String text;
|
|
final Function onPressed;
|
|
final Color color;
|
|
final double borderRadius = 12.0;
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Padding(
|
|
padding: const EdgeInsets.all(8.0),
|
|
child: InkWell(
|
|
borderRadius: BorderRadius.circular(borderRadius),
|
|
onTap: () => onPressed(),
|
|
child: Container(
|
|
decoration: BoxDecoration(
|
|
color: color,
|
|
boxShadow: const [
|
|
BoxShadow(
|
|
color: Colors.black26,
|
|
blurRadius: 2.0,
|
|
spreadRadius: 2.0,
|
|
offset: Offset(2.5, 2.5),
|
|
)
|
|
],
|
|
borderRadius: BorderRadius.circular(borderRadius),
|
|
),
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
Padding(
|
|
padding: const EdgeInsets.all(8.0),
|
|
child: Text(
|
|
text,
|
|
style: const TextStyle(
|
|
fontSize: 14,
|
|
color: Styles.washedStone,
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|