import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../index.dart';

/// 消息输入框
class MessagesInputArea extends GetView<GroupChatController> {
  const MessagesInputArea({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      color: Colors.white,
      padding: EdgeInsets.symmetric(horizontal: 10, vertical: 5),
      width: Get.width,
      height: 50,
      child: TextField(
        focusNode: controller.focusNode,
        decoration: InputDecoration(
          contentPadding: EdgeInsets.symmetric(horizontal: 5),
          border: OutlineInputBorder(
            borderRadius: BorderRadius.circular(5),
          ),
          hintText: '请输入消息',
          hintStyle: TextStyle(
            fontSize: 14,
          ),
          suffixIcon: IconButton(
            onPressed: () {
              // controller.sendMessage();
            },
            icon: Icon(Icons.send),
          ),
        ),
      ),
    );
  }
}
