The application takes static data from a Flask backend and visulaized it on the UI with fl_chart library.
Data Visualization -
- Radar chart
- Pie Chart
- Line Chart
Frontend: Flutter State Management: GetX Charting Library: fl_chart Backend: Flask (with static data)
flutter_task/
│
├── lib/
│ ├── main.dart # Main entry point for the Flutter app
│ ├── backend/
│ │ └── flask_backend.py # Flask backend file with static data
│ ├── controller/
│ │ └── app_controller.dart # AppController managing app state and data fetching
│ ├── data.dart # DataScreen for displaying charts
- Flutter SDK
- Python 3.x
- Required Python packages: Flask
- Physical Device or Emulator
- Clone the repository
git clone https://github.com/sanjanamali8/flutter_task
cd flutter_task- Install Flask and flask-cors
pip3 install flask
pip3 install flask-cors- Run the flask_backend.py file
- Install required flutter packages flutter pub get
- To run the app change the URL in app_controller.dart as follows -
Emulator - http://10.0.2.2:5001/get_data
Web browser - http://localhost:5001/get_data- Run the Frontend Flutter app through terminal or from IDE-
flutter run- Launch the Flutter application on your emulator or device.
- Click the Fetch Data button on the main screen.
- The app will fetch data from the Flask backend and display it on the Data Visualization screen using Radar, Pie, and Line charts.
- Use the back button to return to the main screen and fetch data again.