mobile_skt/lib/screens/new_task/components/description_input.dart

39 lines
1.3 KiB
Dart
Raw Normal View History

2024-03-19 11:09:07 +08:00
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:sk_base_mobile/constants/bg_color.dart';
import 'package:sk_base_mobile/screens/new_task/components/text_input.dart';
import 'package:sk_base_mobile/screens/new_task/new_task_controller.dart';
class DescriptionInput extends StatelessWidget {
final controller = Get.put(NewTaskController());
DescriptionInput({super.key});
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: defaultPadding / 2,
),
Padding(
padding: const EdgeInsets.symmetric(vertical: 10),
child: Text(
'Description',
style:
TextStyle(color: Colors.black, fontWeight: FontWeight.bold),
),
),
Obx(() => TextInputField(
controller: controller.description.value,
hint: 'Description (Optional)',
focus: controller.descriptionFocus.value,
onTap: () => controller.setDescriptionFocus(),
))
],
),
);
}
}