This Flutter application fetches data from a sample API and displays it in a list. Users can fetch the data by clicking a Floating Action Button. The app also checks for Internet connectivity and shows an alert dialog if no connection is available.
- Fetch data from API
- Show data in a list view
- Internet connectivity check
- Alert dialog for no Internet connection
- Flutter SDK
- Dart
http
connectivity
- Clone this repository:
git clone https://github.com/your-github-username/flutter_api_fetcher.git
- Install all dependencies by running:
flutter pub get
Execute the following command to run the app:
flutter run
- Open the app.
- Click the Floating Action Button at the bottom right corner.
- If you're connected to the Internet, the app will fetch and display data from the API.
- If you're not connected to the Internet, an alert dialog will pop up.
If you want to contribute to this project, you're always welcome! See Contributing Guidelines.
This project is licensed under the MIT License - see the LICENSE.md file for details.
- The data is fetched from JSONPlaceholder, a free online REST API that you can use whenever you need some fake data.