44 lines
1.2 KiB
Dart
44 lines
1.2 KiB
Dart
|
|
import 'package:adaptix/adaptix.dart';
|
||
|
|
import 'package:flutter/material.dart';
|
||
|
|
import 'package:sapaly_shop/themes/app_theme.dart';
|
||
|
|
|
||
|
|
Widget customTextField({
|
||
|
|
String? title,
|
||
|
|
String? hint,
|
||
|
|
TextEditingController? controller,
|
||
|
|
int? maxLines = 1,
|
||
|
|
BuildContext? context,
|
||
|
|
}) {
|
||
|
|
return Column(
|
||
|
|
children: [
|
||
|
|
Container(
|
||
|
|
alignment: Alignment.centerLeft,
|
||
|
|
child: Text(
|
||
|
|
title!,
|
||
|
|
style: Theme.of(context!).primaryTextTheme.bodyMedium?.copyWith(
|
||
|
|
fontWeight: FontWeight.w600,
|
||
|
|
color: AppTheme.blackColor,
|
||
|
|
),
|
||
|
|
),
|
||
|
|
),
|
||
|
|
TextFormField(
|
||
|
|
controller: controller,
|
||
|
|
maxLines: maxLines,
|
||
|
|
cursorColor: AppTheme.lightPrimaryColor,
|
||
|
|
decoration: InputDecoration(
|
||
|
|
focusedBorder: OutlineInputBorder(
|
||
|
|
borderRadius: BorderRadius.circular(15.adaptedPx()),
|
||
|
|
borderSide: const BorderSide(
|
||
|
|
color: AppTheme.lightPrimaryColor,
|
||
|
|
),
|
||
|
|
),
|
||
|
|
focusColor: AppTheme.lightPrimaryColor,
|
||
|
|
border: OutlineInputBorder(
|
||
|
|
borderRadius: BorderRadius.circular(10),
|
||
|
|
),
|
||
|
|
),
|
||
|
|
),
|
||
|
|
],
|
||
|
|
);
|
||
|
|
}
|