A client app that allows you to view GitHub users.
These instructions will help you set up and run the Flutter project on your local machine.
Before starting, ensure you have met the following requirements:
- Flutter SDK (version 3.0.0 or higher)
- Dart SDK (included with Flutter)
- An IDE or text editor with Flutter and Dart plugins (e.g., Android Studio, VS Code)
-
Clone the repository:
git clone https://github.com/jpmehedi/github_users_app.git
-
Navigate to the project directory:
cd github_users_app
-
Install the dependencies:
flutter pub get
Before running the app, please explore lib/utilities/api_endpoint.dart
and update the following line with your GitHub personal access token:
const String githubToken = "YOUR_GITHUB_PERSONAL_ACCESS_TOKEN";
Note: Make sure to keep your personal access token secure and never commit it to a public repository.
-
Ensure a device is connected or an emulator is running:
-
Check the connected devices with:
flutter devices
-
-
Run the application:
flutter run
To build the app for production (release mode), use the following command:
-
For Android:
flutter build apk --release
-
For iOS:
flutter build ios --release
For more build options and detailed instructions, refer to the Flutter build documentation.
Here’s an overview of the folder structure in the project:
your-repo-name/
├── lib/ # Main source code folder
│ ├── main.dart # Entry point of the application
│ ├── model/ # Data models
│ ├── view/ # UI screens
│ ├── controller/ # Business logic and API services
│ ├── utilities/ # Global, Keys, Api Endpint, etc.
│ ├── router/ #Router setting.
│ └── theme/ # Theme services
├── test/ # Unit and widget tests
├── assets/ # Assets such as images, fonts, etc.
└── pubspec.yaml # Project configuration file
If you encounter issues while running the project, consider the following steps:
- Check Flutter and Dart Versions: Ensure you are using compatible versions of Flutter and Dart.
- Update Flutter: Run
flutter upgrade
to update to the latest version. - Clear Cache: Try running
flutter clean
followed byflutter pub get
. - Check Connected Devices: Ensure a device is connected and recognized by Flutter.
For more troubleshooting tips, refer to the Flutter documentation.