forked from eatvio/eatvio_app
New screen names
This commit is contained in:
38
lib/widgets/app_bar/appbar_leading_image.dart
Normal file
38
lib/widgets/app_bar/appbar_leading_image.dart
Normal file
@@ -0,0 +1,38 @@
|
||||
import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class AppbarLeadingImage extends StatelessWidget {
|
||||
AppbarLeadingImage({
|
||||
Key? key,
|
||||
this.imagePath,
|
||||
this.margin,
|
||||
this.onTap,
|
||||
}) : super(
|
||||
key: key,
|
||||
);
|
||||
|
||||
String? imagePath;
|
||||
|
||||
EdgeInsetsGeometry? margin;
|
||||
|
||||
Function? onTap;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
onTap!.call();
|
||||
},
|
||||
child: Padding(
|
||||
padding: margin ?? EdgeInsets.zero,
|
||||
child: CustomImageView(
|
||||
imagePath: imagePath,
|
||||
height: 26.v,
|
||||
width: 13.h,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
38
lib/widgets/app_bar/appbar_title_image.dart
Normal file
38
lib/widgets/app_bar/appbar_title_image.dart
Normal file
@@ -0,0 +1,38 @@
|
||||
import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class AppbarTitleImage extends StatelessWidget {
|
||||
AppbarTitleImage({
|
||||
Key? key,
|
||||
this.imagePath,
|
||||
this.margin,
|
||||
this.onTap,
|
||||
}) : super(
|
||||
key: key,
|
||||
);
|
||||
|
||||
String? imagePath;
|
||||
|
||||
EdgeInsetsGeometry? margin;
|
||||
|
||||
Function? onTap;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
onTap!.call();
|
||||
},
|
||||
child: Padding(
|
||||
padding: margin ?? EdgeInsets.zero,
|
||||
child: CustomImageView(
|
||||
imagePath: imagePath,
|
||||
height: 26.v,
|
||||
width: 13.h,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
51
lib/widgets/app_bar/custom_app_bar.dart
Normal file
51
lib/widgets/app_bar/custom_app_bar.dart
Normal file
@@ -0,0 +1,51 @@
|
||||
import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
|
||||
CustomAppBar({
|
||||
Key? key,
|
||||
this.height,
|
||||
this.leadingWidth,
|
||||
this.leading,
|
||||
this.title,
|
||||
this.centerTitle,
|
||||
this.actions,
|
||||
}) : super(
|
||||
key: key,
|
||||
);
|
||||
|
||||
final double? height;
|
||||
|
||||
final double? leadingWidth;
|
||||
|
||||
final Widget? leading;
|
||||
|
||||
final Widget? title;
|
||||
|
||||
final bool? centerTitle;
|
||||
|
||||
final List<Widget>? actions;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppBar(
|
||||
elevation: 0,
|
||||
toolbarHeight: height ?? 56.v,
|
||||
automaticallyImplyLeading: false,
|
||||
backgroundColor: Colors.transparent,
|
||||
leadingWidth: leadingWidth ?? 0,
|
||||
leading: leading,
|
||||
title: title,
|
||||
titleSpacing: 0,
|
||||
centerTitle: centerTitle ?? false,
|
||||
actions: actions,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Size get preferredSize => Size(
|
||||
mediaQueryData.size.width,
|
||||
height ?? 56.v,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user