elektronika/lib/app/global_widgets/circular_splash_button.dart

46 lines
1.2 KiB
Dart

import 'package:elektronika/app/core/themes/theme.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_svg/flutter_svg.dart';
class CircularSplashButton extends StatelessWidget {
final String icon;
final VoidCallback callback;
const CircularSplashButton({
required this.icon,
required this.callback,
});
@override
Widget build(BuildContext context) {
return Material(
color: Colors.transparent,
child: InkWell(
splashColor: Theme.of(context).splashColor,
borderRadius: BorderRadius.circular(50),
onTap: callback,
child: Container(
width: 28.w,
height: 28.h,
decoration: new BoxDecoration(
shape: BoxShape.circle,
// color: Colors.yellow,
),
child: Container(
padding: const EdgeInsets.all(6),
width: 16.w,
height: 16.w,
child: SvgPicture.asset(
icon,
color: ThemeColor.mainColor,
width: 16.w,
height: 16.h,
),
),
),
),
);
}
}