A flutter project showing an image gallery in a staggered view. (Image source - Pixabay API)
- Responsive Layout - Automatically adjust number of columns based on screen width
- Shimmer Loading - Shows a beautiful shimmer loading animation
- Cached images - The network images are cached so it doesn't load the same image repeatedly
- Shows no. of likes and views
- Flutter installed on your machine.
- A Pixabay API key. You can get one by signing up at Pixabay.
-
Clone the repository:
git clone https://github.com/yourusername/pixabay_clon.git cd pixabay_clone
-
Get the dependencies
flutter pub get
-
Create a
.env
file in root directory and add Pixabay API Key
To run the app on your local machine, use the following command:
flutter run --dart-define=PIXABAY_API_KEY=your_api_key_here
To build the project for the web, use the following command:
flutter build web --release --dart-define=PIXABAY_API_KEY=your_api_key_here
This project is set up to deploy the web build to GitHub Pages. The deployment is handled by a GitHub Actions workflow defined in .github/workflows/publish_gh_pages.yml
.
- Ensure you have the
PIXABAY_API_KEY
andGITHUB_TOKEN
secrets set up in your GitHub repository settings. - Push your changes to the
master
branch. - The GitHub Actions workflow will automatically build and deploy the web version of the app to GitHub Pages.
You can view the live demo of the project here.
This project is licensed under the MIT License - see the LICENSE file for details.