Skip to content

Instantly share code, notes, and snippets.

@theindianappguy
Created May 18, 2020 12:57
Show Gist options
  • Save theindianappguy/b10f2a474a8f30859c7d6fd732e23ed2 to your computer and use it in GitHub Desktop.
Save theindianappguy/b10f2a474a8f30859c7d6fd732e23ed2 to your computer and use it in GitHub Desktop.
import 'package:wallpaper/models/categorie_model.dart';
String apiKEY = "[API_KEY]";
List<CategorieModel> getCategories() {
List<CategorieModel> categories = new List();
CategorieModel categorieModel = new CategorieModel();
//
categorieModel.imgUrl =
"https://images.pexels.com/photos/545008/pexels-photo-545008.jpeg?auto=compress&cs=tinysrgb&dpr=2&w=500";
categorieModel.categorieName = "Street Art";
categories.add(categorieModel);
categorieModel = new CategorieModel();
//
categorieModel.imgUrl =
"https://images.pexels.com/photos/704320/pexels-photo-704320.jpeg?auto=compress&cs=tinysrgb&dpr=2&w=500";
categorieModel.categorieName = "Wild Life";
categories.add(categorieModel);
categorieModel = new CategorieModel();
//
categorieModel.imgUrl =
"https://images.pexels.com/photos/34950/pexels-photo.jpg?auto=compress&cs=tinysrgb&dpr=2&w=500";
categorieModel.categorieName = "Nature";
categories.add(categorieModel);
categorieModel = new CategorieModel();
//
categorieModel.imgUrl =
"https://images.pexels.com/photos/466685/pexels-photo-466685.jpeg?auto=compress&cs=tinysrgb&dpr=2&w=500";
categorieModel.categorieName = "City";
categories.add(categorieModel);
categorieModel = new CategorieModel();
//
categorieModel.imgUrl =
"https://images.pexels.com/photos/1434819/pexels-photo-1434819.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260";
categorieModel.categorieName = "Motivation";
categories.add(categorieModel);
categorieModel = new CategorieModel();
//
categorieModel.imgUrl =
"https://images.pexels.com/photos/2116475/pexels-photo-2116475.jpeg?auto=compress&cs=tinysrgb&dpr=2&w=500";
categorieModel.categorieName = "Bikes";
categories.add(categorieModel);
categorieModel = new CategorieModel();
//
categorieModel.imgUrl =
"https://images.pexels.com/photos/1149137/pexels-photo-1149137.jpeg?auto=compress&cs=tinysrgb&dpr=2&w=500";
categorieModel.categorieName = "Cars";
categories.add(categorieModel);
categorieModel = new CategorieModel();
return categories;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment