PMU-PIbd-32-Fedorenko-G-Y/flutter_app/lib/services/album_service.dart

12 lines
589 B
Dart

import 'dart:async';
import '../models/album.dart';
import '../enums/genre.dart';
Future<List<Album>> fetchAlbums() async {
await Future.delayed(Duration(seconds: 2));
return [
Album('The Dark Side of the Moon', 'Pink Floyd', Genre.rock, 'https://upload.wikimedia.org/wikipedia/ru/1/15/The_Dark_Side_of_the_Moon.png'),
Album('Thriller', 'Michael Jackson', Genre.pop, 'https://upload.wikimedia.org/wikipedia/ru/5/59/Thriller_cover.jpg'),
Album('Back in Black', 'AC/DC', Genre.rock, 'https://www.castlerock.ru/upload/iblock/abe/kx6ghd078yfccf5vzaqc19zcv3lt96jc.jpg'),
];
}