Widget _buildMessageInput()

in example/lib/pages/live/live_page.dart [236:278]


  Widget _buildMessageInput() {
    return SafeArea(
      child: Padding(
        padding: const EdgeInsets.all(8.0),
        child: Row(
          children: [
            /// 礼物入口按钮
            IconButton(
              icon: const Icon(Icons.card_giftcard, color: Colors.pink),
              onPressed: _showGiftOptions,
            ),

            /// 输入框
            Expanded(
              child: SizedBox(
                height: 48,
                child: TextField(
                  controller: _messageController,
                  style: const TextStyle(color: Colors.black),
                  decoration: InputDecoration(
                    hintText: "输入弹幕...",
                    hintStyle: const TextStyle(color: Colors.grey),
                    filled: true,
                    fillColor: Colors.white,
                    border: OutlineInputBorder(
                      borderRadius: BorderRadius.circular(20),
                      borderSide: BorderSide.none,
                    ),
                  ),
                ),
              ),
            ),

            /// 发送按钮
            IconButton(
              icon: const Icon(Icons.send, color: Colors.blue),
              onPressed: _sendMessage,
            ),
          ],
        ),
      ),
    );
  }