test base project
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../custom_image_view.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class AppbarImage extends StatelessWidget {
|
||||
AppbarImage(
|
||||
{required this.height,
|
||||
required this.width,
|
||||
this.imagePath,
|
||||
this.svgPath,
|
||||
this.margin,
|
||||
this.onTap});
|
||||
|
||||
double height;
|
||||
|
||||
double width;
|
||||
|
||||
String? imagePath;
|
||||
|
||||
String? svgPath;
|
||||
|
||||
EdgeInsetsGeometry? margin;
|
||||
|
||||
Function? onTap;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
onTap?.call();
|
||||
},
|
||||
child: Padding(
|
||||
padding: margin ?? EdgeInsets.zero,
|
||||
child: CustomImageView(
|
||||
svgPath: svgPath,
|
||||
imagePath: imagePath,
|
||||
height: height,
|
||||
width: width,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user