mirror of
https://github.com/theindianappguy/FlutterNewsApp.git
synced 2025-08-06 19:43:52 +08:00
52 lines
2.2 KiB
Dart
52 lines
2.2 KiB
Dart
import 'package:news_app_api/models/categorie_model.dart';
|
|
|
|
List<CategorieModel> getCategories(){
|
|
|
|
List<CategorieModel> myCategories = List<CategorieModel>();
|
|
CategorieModel categorieModel;
|
|
|
|
//1
|
|
categorieModel = new CategorieModel();
|
|
categorieModel.categorieName = "Business";
|
|
categorieModel.imageAssetUrl = "https://images.unsplash.com/photo-1507679799987-c73779587ccf?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1502&q=80";
|
|
myCategories.add(categorieModel);
|
|
|
|
//2
|
|
categorieModel = new CategorieModel();
|
|
categorieModel.categorieName = "Entertainment";
|
|
categorieModel.imageAssetUrl = "https://images.unsplash.com/photo-1522869635100-9f4c5e86aa37?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1500&q=80";
|
|
myCategories.add(categorieModel);
|
|
|
|
//3
|
|
categorieModel = new CategorieModel();
|
|
categorieModel.categorieName = "General";
|
|
categorieModel.imageAssetUrl = "https://images.unsplash.com/photo-1495020689067-958852a7765e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=800&q=60";
|
|
myCategories.add(categorieModel);
|
|
|
|
//4
|
|
categorieModel = new CategorieModel();
|
|
categorieModel.categorieName = "Health";
|
|
categorieModel.imageAssetUrl = "https://images.unsplash.com/photo-1494390248081-4e521a5940db?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1595&q=80";
|
|
myCategories.add(categorieModel);
|
|
|
|
//5
|
|
categorieModel = new CategorieModel();
|
|
categorieModel.categorieName = "Science";
|
|
categorieModel.imageAssetUrl = "https://images.unsplash.com/photo-1554475901-4538ddfbccc2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1504&q=80";
|
|
myCategories.add(categorieModel);
|
|
|
|
//5
|
|
categorieModel = new CategorieModel();
|
|
categorieModel.categorieName = "Sports";
|
|
categorieModel.imageAssetUrl = "https://images.unsplash.com/photo-1495563923587-bdc4282494d0?ixlib=rb-1.2.1&auto=format&fit=crop&w=1500&q=80";
|
|
myCategories.add(categorieModel);
|
|
|
|
//5
|
|
categorieModel = new CategorieModel();
|
|
categorieModel.categorieName = "Technology";
|
|
categorieModel.imageAssetUrl = "https://images.unsplash.com/photo-1519389950473-47ba0277781c?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1500&q=80";
|
|
myCategories.add(categorieModel);
|
|
|
|
return myCategories;
|
|
|
|
} |