39 lines
988 B
Dart
39 lines
988 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:rive/rive.dart';
|
|
|
|
class MenuBtn extends StatelessWidget {
|
|
const MenuBtn({super.key, required this.press, required this.riveOnInit});
|
|
|
|
final VoidCallback press;
|
|
final ValueChanged<Artboard> riveOnInit;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return SafeArea(
|
|
child: GestureDetector(
|
|
onTap: press,
|
|
child: Container(
|
|
margin: const EdgeInsets.only(left: 12),
|
|
height: 40,
|
|
width: 40,
|
|
decoration: const BoxDecoration(
|
|
color: Colors.white,
|
|
shape: BoxShape.circle,
|
|
boxShadow: [
|
|
BoxShadow(
|
|
color: Colors.black12,
|
|
offset: Offset(0, 3),
|
|
blurRadius: 8,
|
|
),
|
|
],
|
|
),
|
|
child: RiveAnimation.asset(
|
|
"assets/RiveAssets/menu_button.riv",
|
|
onInit: riveOnInit,
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|