feat: setting page and setting product page
This commit is contained in:
@@ -1,45 +1,69 @@
|
||||
import 'package:enaklo_pos/core/extensions/build_context_ext.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../core/components/search_input.dart';
|
||||
import '../../../core/constants/colors.dart';
|
||||
|
||||
|
||||
|
||||
class SettingsTitle extends StatelessWidget {
|
||||
final String title;
|
||||
final String? subtitle;
|
||||
final TextEditingController? controller;
|
||||
final Function(String value)? onChanged;
|
||||
final List<Widget>? actionWidget;
|
||||
|
||||
const SettingsTitle(
|
||||
this.title, {
|
||||
super.key,
|
||||
this.controller,
|
||||
this.onChanged,
|
||||
this.actionWidget,
|
||||
this.subtitle,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
title,
|
||||
style: const TextStyle(
|
||||
color: AppColors.primary,
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.w600,
|
||||
return Container(
|
||||
height: context.deviceHeight * 0.1,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 12.0),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.white,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
title,
|
||||
style: TextStyle(
|
||||
color: AppColors.black,
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
if (subtitle != null)
|
||||
Text(
|
||||
subtitle ?? '',
|
||||
style: TextStyle(
|
||||
color: AppColors.grey,
|
||||
fontSize: 14,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
if (controller != null)
|
||||
SizedBox(
|
||||
width: 300.0,
|
||||
child: SearchInput(
|
||||
controller: controller!,
|
||||
onChanged: onChanged,
|
||||
hintText: 'Search for food, coffe, etc..',
|
||||
if (controller != null)
|
||||
SizedBox(
|
||||
width: 300.0,
|
||||
child: SearchInput(
|
||||
controller: controller!,
|
||||
onChanged: onChanged,
|
||||
hintText: 'Search for food, coffe, etc..',
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
if (actionWidget != null) ...actionWidget!,
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user