forked from eatvio/eatvio_app
35 lines
707 B
Dart
35 lines
707 B
Dart
import 'package:eatvio_app/widgets/custom_image_view.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
class AppbarLeadingImage extends StatelessWidget {
|
|
const AppbarLeadingImage({
|
|
this.imagePath,
|
|
this.margin,
|
|
this.onTap,
|
|
});
|
|
|
|
final String? imagePath;
|
|
final EdgeInsetsGeometry? margin;
|
|
final Function? onTap;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return InkWell(
|
|
onTap: onTapCall,
|
|
child: Padding(
|
|
padding: margin ?? EdgeInsets.zero,
|
|
child: CustomImageView(
|
|
imagePath: imagePath,
|
|
height: 26,
|
|
width: 13,
|
|
fit: BoxFit.contain,
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|
|
void onTapCall() {
|
|
onTap!.call();
|
|
}
|
|
}
|