feat: merchant page
This commit is contained in:
@@ -3,3 +3,4 @@ import 'package:flutter/material.dart';
|
||||
import '../../../common/theme/theme.dart';
|
||||
|
||||
part 'text_form_field.dart';
|
||||
part 'search_text_form_field.dart';
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
part of 'field.dart';
|
||||
|
||||
class SearchTextField extends StatelessWidget {
|
||||
final String hintText;
|
||||
final IconData prefixIcon;
|
||||
final TextEditingController? controller;
|
||||
final Function()? onClear;
|
||||
|
||||
const SearchTextField({
|
||||
super.key,
|
||||
required this.hintText,
|
||||
required this.prefixIcon,
|
||||
this.controller,
|
||||
this.onClear,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
margin: EdgeInsets.fromLTRB(16, 0, 16, 16),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.white,
|
||||
borderRadius: BorderRadius.circular(25),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.05),
|
||||
blurRadius: 10,
|
||||
offset: Offset(0, 2),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: TextField(
|
||||
cursorColor: AppColor.primary,
|
||||
controller: controller,
|
||||
decoration: InputDecoration(
|
||||
hintText: hintText,
|
||||
hintStyle: TextStyle(color: AppColor.textLight, fontSize: 14),
|
||||
disabledBorder: InputBorder.none,
|
||||
enabledBorder: InputBorder.none,
|
||||
errorBorder: InputBorder.none,
|
||||
focusedBorder: InputBorder.none,
|
||||
prefixIcon: Container(
|
||||
margin: EdgeInsets.all(12),
|
||||
width: 24,
|
||||
height: 24,
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.primary,
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
),
|
||||
child: Icon(prefixIcon, color: AppColor.white, size: 14),
|
||||
),
|
||||
border: InputBorder.none,
|
||||
contentPadding: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -43,7 +43,7 @@ class ImagePlaceholder extends StatelessWidget {
|
||||
: null,
|
||||
),
|
||||
child: Center(
|
||||
child: minDimension < 100
|
||||
child: minDimension < 150
|
||||
? _buildSimpleVersion(minDimension)
|
||||
: _buildDetailedVersion(minDimension),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user