forked from eatvio/eatvio_app
Finished Auth
This commit is contained in:
@@ -29,7 +29,7 @@ class AppbarSubtitle extends StatelessWidget {
|
||||
child: Text(
|
||||
text,
|
||||
style: CustomTextStyles.titleMediumBlack.copyWith(
|
||||
color: appTheme.blue400,
|
||||
color: appTheme.black900,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
38
lib/widgets/app_bar/exit_button.dart
Normal file
38
lib/widgets/app_bar/exit_button.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 ExitButton extends StatelessWidget {
|
||||
ExitButton({
|
||||
Key? key,
|
||||
required this.text,
|
||||
this.margin,
|
||||
this.onTap,
|
||||
}) : super(
|
||||
key: key,
|
||||
);
|
||||
|
||||
String text;
|
||||
|
||||
EdgeInsetsGeometry? margin;
|
||||
|
||||
Function? onTap;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
onTap!.call();
|
||||
},
|
||||
child: Padding(
|
||||
padding: margin ?? EdgeInsets.zero,
|
||||
child: Text(
|
||||
text,
|
||||
style: CustomTextStyles.titleSmallRed200.copyWith(
|
||||
color: Colors.red,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
166
lib/widgets/custom_bottom_bar.dart
Normal file
166
lib/widgets/custom_bottom_bar.dart
Normal file
@@ -0,0 +1,166 @@
|
||||
import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class CustomBottomBar extends StatefulWidget {
|
||||
CustomBottomBar({this.onChanged});
|
||||
|
||||
Function(BottomBarEnum)? onChanged;
|
||||
|
||||
@override
|
||||
CustomBottomBarState createState() => CustomBottomBarState();
|
||||
}
|
||||
|
||||
class CustomBottomBarState extends State<CustomBottomBar> {
|
||||
int selectedIndex = 0;
|
||||
|
||||
List<BottomMenuModel> bottomMenuList = [
|
||||
BottomMenuModel(
|
||||
icon: ImageConstant.imgNav,
|
||||
activeIcon: ImageConstant.imgNav,
|
||||
title: "lbl17".tr,
|
||||
type: BottomBarEnum.tf,
|
||||
),
|
||||
BottomMenuModel(
|
||||
icon: ImageConstant.imgNavBlueGray400,
|
||||
activeIcon: ImageConstant.imgNavBlueGray400,
|
||||
title: "lbl18".tr,
|
||||
type: BottomBarEnum.tf,
|
||||
),
|
||||
BottomMenuModel(
|
||||
icon: ImageConstant.imgNavBlueGray40024x23,
|
||||
activeIcon: ImageConstant.imgNavBlueGray40024x23,
|
||||
title: "lbl19".tr,
|
||||
type: BottomBarEnum.tf,
|
||||
),
|
||||
BottomMenuModel(
|
||||
icon: ImageConstant.imgNavPrimary,
|
||||
activeIcon: ImageConstant.imgNavPrimary,
|
||||
title: "lbl20".tr,
|
||||
type: BottomBarEnum.tf,
|
||||
),
|
||||
BottomMenuModel(
|
||||
icon: ImageConstant.imgNavBlueGray40024x25,
|
||||
activeIcon: ImageConstant.imgNavBlueGray40024x25,
|
||||
title: "lbl21".tr,
|
||||
type: BottomBarEnum.tf,
|
||||
)
|
||||
];
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
height: 80.v,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
color: appTheme.whiteA700,
|
||||
width: 1.h,
|
||||
),
|
||||
),
|
||||
child: BottomNavigationBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
showSelectedLabels: false,
|
||||
showUnselectedLabels: false,
|
||||
selectedFontSize: 0,
|
||||
elevation: 0,
|
||||
currentIndex: selectedIndex,
|
||||
type: BottomNavigationBarType.fixed,
|
||||
items: List.generate(bottomMenuList.length, (index) {
|
||||
return BottomNavigationBarItem(
|
||||
icon: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
CustomImageView(
|
||||
imagePath: bottomMenuList[index].icon,
|
||||
height: 24.v,
|
||||
width: 19.h,
|
||||
color: appTheme.blueGray400,
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 8.v),
|
||||
child: Text(
|
||||
bottomMenuList[index].title ?? "",
|
||||
style:
|
||||
CustomTextStyles.bodySmallMulishBluegray80012.copyWith(
|
||||
color: appTheme.blueGray800,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
activeIcon: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
CustomImageView(
|
||||
imagePath: bottomMenuList[index].activeIcon,
|
||||
height: 24.adaptSize,
|
||||
width: 24.adaptSize,
|
||||
color: theme.colorScheme.primary,
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 9.v),
|
||||
child: Text(
|
||||
bottomMenuList[index].title ?? "",
|
||||
style: CustomTextStyles.bodySmallMulishPrimary.copyWith(
|
||||
color: theme.colorScheme.primary,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
label: '',
|
||||
);
|
||||
}),
|
||||
onTap: (index) {
|
||||
selectedIndex = index;
|
||||
widget.onChanged?.call(bottomMenuList[index].type);
|
||||
setState(() {});
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
enum BottomBarEnum {
|
||||
tf,
|
||||
}
|
||||
|
||||
class BottomMenuModel {
|
||||
BottomMenuModel({
|
||||
required this.icon,
|
||||
required this.activeIcon,
|
||||
this.title,
|
||||
required this.type,
|
||||
});
|
||||
|
||||
String icon;
|
||||
|
||||
String activeIcon;
|
||||
|
||||
String? title;
|
||||
|
||||
BottomBarEnum type;
|
||||
}
|
||||
|
||||
class DefaultWidget extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
color: Colors.white,
|
||||
padding: EdgeInsets.all(10),
|
||||
child: Center(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'Please replace the respective Widget here',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user