This is a simple chat application built with Flutter. The app sends user input to a server and displays the response in real-time.
- Send messages to a chat server
- Display responses from the server in real-time
- Scrollable and selectable chat messages
- Flutter installed on your machine
- An HTTP server to handle chat requests. Update the server URL in the
_sendMessagemethod to match your server's address.
-
Clone the repository:
git clone https://github.com/orestislef/chat_app.git cd chat_app -
Install dependencies:
flutter pub get
-
Run the app:
flutter run
- Enter your message in the text field.
- Press the "Send" button.
- The response from the server will be displayed in real-time.
- main.dart: The main entry point of the app.
- MyApp: The root widget, setting up the
MaterialAppand theChatScreen. - ChatScreen: A
StatefulWidgetthat manages the UI and logic for sending and receiving messages. - _sendMessage: Method for making HTTP POST requests to the server.
flutter/material.dart: Provides Material Design components.http/http.dart: Used for making HTTP requests.
This project is licensed under the MIT License.
Created by Orestis Lef.