forked from eatvio/eatvio_app
feature(registration): refactor
This commit is contained in:
@@ -3,35 +3,16 @@ 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,
|
||||
);
|
||||
const AppbarTitleImage({required this.imagePath, super.key});
|
||||
|
||||
String? imagePath;
|
||||
|
||||
EdgeInsetsGeometry? margin;
|
||||
|
||||
Function? onTap;
|
||||
final String? imagePath;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return InkWell(
|
||||
onTap: onTapCall,
|
||||
child: Padding(
|
||||
padding: margin ?? EdgeInsets.zero,
|
||||
child: CustomImageView(
|
||||
imagePath: imagePath,
|
||||
height: 48,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
return CustomImageView(
|
||||
imagePath: imagePath,
|
||||
height: 48,
|
||||
fit: BoxFit.contain,
|
||||
);
|
||||
}
|
||||
|
||||
void onTapCall() {}
|
||||
}
|
||||
|
||||
@@ -92,7 +92,6 @@ class CustomDropDown extends StatelessWidget {
|
||||
value: item,
|
||||
child: Text(
|
||||
item.title,
|
||||
overflow: TextOverflow.fade,
|
||||
style: hintStyle ?? Theme.of(context).textTheme.titleMedium,
|
||||
),
|
||||
);
|
||||
|
||||
@@ -62,7 +62,7 @@ class CustomTextFormField extends StatelessWidget {
|
||||
final String? initialValue;
|
||||
final Function(String)? onFieldSubmitted;
|
||||
final void Function(String?)? onSaved;
|
||||
final void Function(String?)? onChanged;
|
||||
final void Function(String)? onChanged;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -128,6 +128,7 @@ class CustomTextFormField extends StatelessWidget {
|
||||
: SizedBox(
|
||||
width: width ?? double.maxFinite,
|
||||
child: TextFormField(
|
||||
onChanged: onChanged,
|
||||
controller: controller,
|
||||
focusNode: focusNode ?? null,
|
||||
autofocus: autofocus!,
|
||||
|
||||
Reference in New Issue
Block a user