diff --git a/android/app/src/main/res/mipmap-anydpi-v26/ic_launch.xml b/android/app/src/main/res/mipmap-anydpi-v26/ic_launch.xml
new file mode 100644
index 0000000..55aebf9
--- /dev/null
+++ b/android/app/src/main/res/mipmap-anydpi-v26/ic_launch.xml
@@ -0,0 +1,3 @@
+
+
+
diff --git a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 0000000..55aebf9
--- /dev/null
+++ b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,3 @@
+
+
+
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launch.png b/android/app/src/main/res/mipmap-hdpi/ic_launch.png
new file mode 100644
index 0000000..2b0ce7a
Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launch.png differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launch.png b/android/app/src/main/res/mipmap-mdpi/ic_launch.png
new file mode 100644
index 0000000..ab7e632
Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launch.png differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launch.png b/android/app/src/main/res/mipmap-xhdpi/ic_launch.png
new file mode 100644
index 0000000..5bba9c2
Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launch.png differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launch.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launch.png
new file mode 100644
index 0000000..407c2ba
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launch.png differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launch.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launch.png
new file mode 100644
index 0000000..8a9bfe8
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launch.png differ
diff --git a/assets/icon.jpeg b/assets/icon.jpeg
new file mode 100644
index 0000000..9d844b4
Binary files /dev/null and b/assets/icon.jpeg differ
diff --git a/assets/icon.jpg b/assets/icon.jpg
new file mode 100644
index 0000000..f8923c5
Binary files /dev/null and b/assets/icon.jpg differ
diff --git a/assets/svg/ru.svg b/assets/svg/ru.svg
new file mode 100644
index 0000000..52ca896
--- /dev/null
+++ b/assets/svg/ru.svg
@@ -0,0 +1,45 @@
+
+
+
diff --git a/assets/svg/uk.svg b/assets/svg/uk.svg
new file mode 100644
index 0000000..cc90264
--- /dev/null
+++ b/assets/svg/uk.svg
@@ -0,0 +1,45 @@
+
+
+
diff --git a/l10n.yaml b/l10n.yaml
new file mode 100644
index 0000000..d26d702
--- /dev/null
+++ b/l10n.yaml
@@ -0,0 +1,6 @@
+arb-dir: l10n
+template-arb-file: app_ru.arb
+output-localization-file: app_locale.dart
+output-dir: lib/components/locale/l10n
+output-class: AppLocale
+synthetic-package: false
\ No newline at end of file
diff --git a/l10n/app_en.arb b/l10n/app_en.arb
new file mode 100644
index 0000000..163cefe
--- /dev/null
+++ b/l10n/app_en.arb
@@ -0,0 +1,8 @@
+{
+ "@@locale": "en",
+
+ "search": "Search",
+ "liked": "liked!",
+ "disliked": "unliked"
+
+}
diff --git a/l10n/app_ru.arb b/l10n/app_ru.arb
new file mode 100644
index 0000000..27bca94
--- /dev/null
+++ b/l10n/app_ru.arb
@@ -0,0 +1,7 @@
+{
+ "@@locale": "ru",
+
+ "search": "Поиск",
+ "liked": "понравился!",
+ "disliked": "разонравился"
+}
diff --git a/lib/card_data.dart b/lib/card_data.dart
index 801dd5c..7b7a60d 100644
--- a/lib/card_data.dart
+++ b/lib/card_data.dart
@@ -22,5 +22,4 @@ class CardData {
required this.summary,
this.imageUrl,
});
-
-}
\ No newline at end of file
+}
diff --git a/lib/components/extension/context_x.dart b/lib/components/extension/context_x.dart
new file mode 100644
index 0000000..fb0db87
--- /dev/null
+++ b/lib/components/extension/context_x.dart
@@ -0,0 +1,6 @@
+import 'package:flutter/widgets.dart';
+import 'package:pmd_labs/components/locale/l10n/app_locale.dart';
+
+extension LocalContextX on BuildContext {
+ AppLocale get locale => AppLocale.of(this)!;
+}
diff --git a/lib/components/locale/l10n/app_locale.dart b/lib/components/locale/l10n/app_locale.dart
new file mode 100644
index 0000000..1c601cd
--- /dev/null
+++ b/lib/components/locale/l10n/app_locale.dart
@@ -0,0 +1,147 @@
+import 'dart:async';
+
+import 'package:flutter/foundation.dart';
+import 'package:flutter/widgets.dart';
+import 'package:flutter_localizations/flutter_localizations.dart';
+import 'package:intl/intl.dart' as intl;
+
+import 'app_locale_en.dart';
+import 'app_locale_ru.dart';
+
+// ignore_for_file: type=lint
+
+/// Callers can lookup localized strings with an instance of AppLocale
+/// returned by `AppLocale.of(context)`.
+///
+/// Applications need to include `AppLocale.delegate()` in their app's
+/// `localizationDelegates` list, and the locales they support in the app's
+/// `supportedLocales` list. For example:
+///
+/// ```dart
+/// import 'l10n/app_locale.dart';
+///
+/// return MaterialApp(
+/// localizationsDelegates: AppLocale.localizationsDelegates,
+/// supportedLocales: AppLocale.supportedLocales,
+/// home: MyApplicationHome(),
+/// );
+/// ```
+///
+/// ## Update pubspec.yaml
+///
+/// Please make sure to update your pubspec.yaml to include the following
+/// packages:
+///
+/// ```yaml
+/// dependencies:
+/// # Internationalization support.
+/// flutter_localizations:
+/// sdk: flutter
+/// intl: any # Use the pinned version from flutter_localizations
+///
+/// # Rest of dependencies
+/// ```
+///
+/// ## iOS Applications
+///
+/// iOS applications define key application metadata, including supported
+/// locales, in an Info.plist file that is built into the application bundle.
+/// To configure the locales supported by your app, you’ll need to edit this
+/// file.
+///
+/// First, open your project’s ios/Runner.xcworkspace Xcode workspace file.
+/// Then, in the Project Navigator, open the Info.plist file under the Runner
+/// project’s Runner folder.
+///
+/// Next, select the Information Property List item, select Add Item from the
+/// Editor menu, then select Localizations from the pop-up menu.
+///
+/// Select and expand the newly-created Localizations item then, for each
+/// locale your application supports, add a new item and select the locale
+/// you wish to add from the pop-up menu in the Value field. This list should
+/// be consistent with the languages listed in the AppLocale.supportedLocales
+/// property.
+abstract class AppLocale {
+ AppLocale(String locale) : localeName = intl.Intl.canonicalizedLocale(locale.toString());
+
+ final String localeName;
+
+ static AppLocale? of(BuildContext context) {
+ return Localizations.of(context, AppLocale);
+ }
+
+ static const LocalizationsDelegate delegate = _AppLocaleDelegate();
+
+ /// A list of this localizations delegate along with the default localizations
+ /// delegates.
+ ///
+ /// Returns a list of localizations delegates containing this delegate along with
+ /// GlobalMaterialLocalizations.delegate, GlobalCupertinoLocalizations.delegate,
+ /// and GlobalWidgetsLocalizations.delegate.
+ ///
+ /// Additional delegates can be added by appending to this list in
+ /// MaterialApp. This list does not have to be used at all if a custom list
+ /// of delegates is preferred or required.
+ static const List> localizationsDelegates = >[
+ delegate,
+ GlobalMaterialLocalizations.delegate,
+ GlobalCupertinoLocalizations.delegate,
+ GlobalWidgetsLocalizations.delegate,
+ ];
+
+ /// A list of this localizations delegate's supported locales.
+ static const List supportedLocales = [
+ Locale('en'),
+ Locale('ru')
+ ];
+
+ /// No description provided for @search.
+ ///
+ /// In ru, this message translates to:
+ /// **'Поиск'**
+ String get search;
+
+ /// No description provided for @liked.
+ ///
+ /// In ru, this message translates to:
+ /// **'понравился!'**
+ String get liked;
+
+ /// No description provided for @disliked.
+ ///
+ /// In ru, this message translates to:
+ /// **'разонравился'**
+ String get disliked;
+}
+
+class _AppLocaleDelegate extends LocalizationsDelegate {
+ const _AppLocaleDelegate();
+
+ @override
+ Future load(Locale locale) {
+ return SynchronousFuture(lookupAppLocale(locale));
+ }
+
+ @override
+ bool isSupported(Locale locale) => ['en', 'ru'].contains(locale.languageCode);
+
+ @override
+ bool shouldReload(_AppLocaleDelegate old) => false;
+}
+
+AppLocale lookupAppLocale(Locale locale) {
+
+
+ // Lookup logic when only language code is specified.
+ switch (locale.languageCode) {
+ case 'en': return AppLocaleEn();
+ case 'ru': return AppLocaleRu();
+ }
+
+ throw FlutterError(
+ 'AppLocale.delegate failed to load unsupported locale "$locale". This is likely '
+ 'an issue with the localizations generation tool. Please file an issue '
+ 'on GitHub with a reproducible sample app and the gen-l10n configuration '
+ 'that was used.'
+ );
+}
diff --git a/lib/components/locale/l10n/app_locale_en.dart b/lib/components/locale/l10n/app_locale_en.dart
new file mode 100644
index 0000000..362a0d2
--- /dev/null
+++ b/lib/components/locale/l10n/app_locale_en.dart
@@ -0,0 +1,17 @@
+import 'app_locale.dart';
+
+// ignore_for_file: type=lint
+
+/// The translations for English (`en`).
+class AppLocaleEn extends AppLocale {
+ AppLocaleEn([String locale = 'en']) : super(locale);
+
+ @override
+ String get search => 'Search';
+
+ @override
+ String get liked => 'liked!';
+
+ @override
+ String get disliked => 'unliked';
+}
diff --git a/lib/components/locale/l10n/app_locale_ru.dart b/lib/components/locale/l10n/app_locale_ru.dart
new file mode 100644
index 0000000..e1485c0
--- /dev/null
+++ b/lib/components/locale/l10n/app_locale_ru.dart
@@ -0,0 +1,17 @@
+import 'app_locale.dart';
+
+// ignore_for_file: type=lint
+
+/// The translations for Russian (`ru`).
+class AppLocaleRu extends AppLocale {
+ AppLocaleRu([String locale = 'ru']) : super(locale);
+
+ @override
+ String get search => 'Поиск';
+
+ @override
+ String get liked => 'понравился!';
+
+ @override
+ String get disliked => 'разонравился';
+}
diff --git a/lib/components/resources.g.dart b/lib/components/resources.g.dart
new file mode 100644
index 0000000..9645894
--- /dev/null
+++ b/lib/components/resources.g.dart
@@ -0,0 +1,10 @@
+/// Generate by [asset_generator](https://github.com/fluttercandies/flutter_asset_generator) library.
+/// PLEASE DO NOT EDIT MANUALLY.
+// ignore_for_file: constant_identifier_names
+class R {
+ const R._();
+
+ static const String ASSETS_SVG_RU_SVG = 'assets/svg/ru.svg';
+
+ static const String ASSETS_SVG_UK_SVG = 'assets/svg/uk.svg';
+}
diff --git a/lib/components/utils/debounce.dart b/lib/components/utils/debounce.dart
index 806846d..743725b 100644
--- a/lib/components/utils/debounce.dart
+++ b/lib/components/utils/debounce.dart
@@ -13,10 +13,10 @@ class Debounce {
static Timer? _timer;
static void run(
- VoidCallback action, {
- Duration delay = const Duration(milliseconds: 5000),
- }) {
+ VoidCallback action, {
+ Duration delay = const Duration(milliseconds: 5000),
+ }) {
_timer?.cancel();
_timer = Timer(delay, action);
}
-}
\ No newline at end of file
+}
diff --git a/lib/components/utils/error_callback.dart b/lib/components/utils/error_callback.dart
index 5e3110f..9419c43 100644
--- a/lib/components/utils/error_callback.dart
+++ b/lib/components/utils/error_callback.dart
@@ -1 +1 @@
-typedef OnErrorCallback = void Function(String? error)?;
\ No newline at end of file
+typedef OnErrorCallback = void Function(String? error)?;
diff --git a/lib/data/dto/album_dto.dart b/lib/data/dto/album_dto.dart
index 9ed0ecd..a0cb009 100644
--- a/lib/data/dto/album_dto.dart
+++ b/lib/data/dto/album_dto.dart
@@ -17,9 +17,8 @@ class AlbumDto {
data: (json['data'] as List?)
?.map((e) => AlbumDataDto.fromJson(e as Map))
.toList(),
- pagination: json['pagination'] != null
- ? AlbumPaginationDto.fromJson(json['pagination'])
- : null,
+ pagination:
+ json['pagination'] != null ? AlbumPaginationDto.fromJson(json['pagination']) : null,
);
}
}
@@ -86,9 +85,7 @@ class AlbumDataDto {
tracks: (json['tracks'] as List?)?.map((e) => e as String).toList(),
summary: json['summary'],
url: json['url'],
- images: json['images'] != null
- ? AlbumDataImagesDto.fromJson(json['images'])
- : null,
+ images: json['images'] != null ? AlbumDataImagesDto.fromJson(json['images']) : null,
);
}
}
@@ -105,9 +102,7 @@ class AlbumDataImagesDto {
// Метод для конструирования экземпляра
static AlbumDataImagesDto fromJson(Map json) {
return AlbumDataImagesDto(
- jpg: json['jpg'] != null
- ? AlbumDataImagesJPGDto.fromJson(json['jpg'])
- : null,
+ jpg: json['jpg'] != null ? AlbumDataImagesJPGDto.fromJson(json['jpg']) : null,
);
}
}
@@ -127,4 +122,4 @@ class AlbumDataImagesJPGDto {
image_url: json['image_url'],
);
}
-}
\ No newline at end of file
+}
diff --git a/lib/data/mapper/album_mapper.dart b/lib/data/mapper/album_mapper.dart
index 8f9bc82..3b02f96 100644
--- a/lib/data/mapper/album_mapper.dart
+++ b/lib/data/mapper/album_mapper.dart
@@ -7,11 +7,15 @@ import 'package:uuid/uuid.dart';
import '../../home_page/home_page.dart';
+String generateAlbumId(String name, String artist, String url) {
+ // Простой способ создания уникального идентификатора
+ return '$name|$artist|$url';
+}
+
extension AlbumDataDtoMapper on AlbumDataDto {
List fetchAlbums(List albumsData) {
const String defaultImageUrl = "https://i.ibb.co/VwCkRD4/image.jpg";
List albums = [];
- final Uuid uuid = Uuid();
for (var album in albumsData) {
// Ищем изображение с самым большим размером
@@ -20,22 +24,22 @@ extension AlbumDataDtoMapper on AlbumDataDto {
// Ищем наиболее подходящее изображение
List images = album['image'] as List;
var largestImage = images.firstWhere(
- (image) => image['size'] == 'mega',
+ (image) => image['size'] == 'mega',
orElse: () => images.firstWhere(
- (image) => image['size'] == 'extralarge',
+ (image) => image['size'] == 'extralarge',
orElse: () => images.firstWhere(
- (image) => image['size'] == 'large',
+ (image) => image['size'] == 'large',
orElse: () => null, // запасной вариант
),
),
);
- if(largestImage['#text'] != "")
+ if (largestImage['#text'] != "")
albumImage = largestImage['#text'] as String?;
else
albumImage = defaultImageUrl;
if (album['name'] != "(null)" && album['artist'] != "(null)") {
- final id = uuid.v4();
+ final id = generateAlbumId(album['name'], album['artist'], album['url']);
albums.add(AlbumDataDto(
id: id,
title: album['name'] as String?,
@@ -61,23 +65,20 @@ extension AlbumDataDtoMapper on AlbumDataDto {
List genres = [];
// Находим год в тегах
- year = (data['album']?['tags']?['tag'] as List)
- .firstWhere(
+ year = (data['album']?['tags']?['tag'] as List).firstWhere(
(tag) => tag['name'].contains(RegExp(r'^\d{4}$')),
- orElse: () => null,
- )?['name'] ?? "_";
+ orElse: () => null,
+ )?['name'] ??
+ "_";
// Получаем список жанров
- genres = List.from(
- (data['album']?['tags']?['tag'] as List? ?? [])
- .map((tag) => tag['name'] as String)
- );
+ genres = List.from((data['album']?['tags']?['tag'] as List? ?? [])
+ .map((tag) => tag['name'] as String));
// Заполняем список треков
List tracks = List.from(
(data['album']?['tracks']?['track'] as List? ?? [])
- .map((track) => track['name'] as String)
- );
+ .map((track) => track['name'] as String));
// Обновляем информацию в нашем DTO альбома
album.year = year;
@@ -85,8 +86,7 @@ extension AlbumDataDtoMapper on AlbumDataDto {
album.tracks = tracks;
// Обновляем дополнительную информацию, если необходимо
- album.summary =
- data['album']?['wiki']?['summary'] ?? "missing"; // или аналогичное поле
+ album.summary = data['album']?['wiki']?['summary'] ?? "missing"; // или аналогичное поле
}
return album; // возвращаем заполненное DTO
@@ -120,9 +120,7 @@ extension AlbumDtoMapper on AlbumDto {
HomeData toDomain() {
return HomeData(
data: data?.map((e) => e.toDomain()).toList(),
- nextPage: (pagination?.hasNextPage ?? false)
- ? ((pagination?.currentPage ?? 0) + 1)
- : null,
+ nextPage: (pagination?.hasNextPage ?? false) ? ((pagination?.currentPage ?? 0) + 1) : null,
);
}
-}
\ No newline at end of file
+}
diff --git a/lib/data/repositories/album_repository.dart b/lib/data/repositories/album_repository.dart
index 01a7cbf..6a957c3 100644
--- a/lib/data/repositories/album_repository.dart
+++ b/lib/data/repositories/album_repository.dart
@@ -21,8 +21,7 @@ class AlbumRepository extends ApiInterface {
// Метод для загрузки списка альбомов по названию с учетом пагинации
@override
Future?> loadData({String? albumName, int page = 1, int pageSize = 5}) async {
- if (albumName == null || albumName == "")
- albumName = 'a';
+ if (albumName == null || albumName == "") albumName = 'a';
final String url =
'https://ws.audioscrobbler.com/2.0/?method=album.search&album=$albumName&api_key=$apiKey&format=json&limit=$pageSize&page=$page';
@@ -31,8 +30,7 @@ class AlbumRepository extends ApiInterface {
if (response.statusCode == 200) {
final List albumsData =
- AlbumDataDto().fetchAlbums(
- response.data['results']['albummatches']['album']);
+ AlbumDataDto().fetchAlbums(response.data['results']['albummatches']['album']);
return albumsData.map((album) => album.toDomain()).toList();
} else {
@@ -60,4 +58,4 @@ class AlbumRepository extends ApiInterface {
throw Exception('Error during fetching album info: $e');
}
}
-}
\ No newline at end of file
+}
diff --git a/lib/details_page/detail_page.dart b/lib/details_page/detail_page.dart
index 9bccc21..405dc21 100644
--- a/lib/details_page/detail_page.dart
+++ b/lib/details_page/detail_page.dart
@@ -54,11 +54,7 @@ class _DetailsPageState extends State {
backgroundColor: const Color(0xFF231a24),
title: Text(
widget.data.title,
- style: Theme
- .of(context)
- .textTheme
- .headlineLarge
- ?.copyWith(color: Colors.orange),
+ style: Theme.of(context).textTheme.headlineLarge?.copyWith(color: Colors.orange),
),
),
body: Container(
@@ -69,13 +65,12 @@ class _DetailsPageState extends State {
if (snapshot.connectionState == ConnectionState.waiting) {
return const Center(child: CircularProgressIndicator());
} else if (snapshot.hasError) {
- return Center(child: Text('Error: ${snapshot.error}', style: Theme
- .of(context)
- .textTheme
- .bodyLarge));
+ return Center(
+ child: Text('Error: ${snapshot.error}',
+ style: Theme.of(context).textTheme.bodyLarge));
} else if (!snapshot.hasData || snapshot.data == null) {
- return const Center(child: Text(
- 'No data available', style: TextStyle(color: Colors.white)));
+ return const Center(
+ child: Text('No data available', style: TextStyle(color: Colors.white)));
} else {
AlbumDataDto albumDetails = snapshot.data!;
@@ -86,9 +81,9 @@ class _DetailsPageState extends State {
Padding(
padding: const EdgeInsets.only(bottom: 16.0),
child: ClipRRect(
- borderRadius: const BorderRadius.all(Radius.circular(
- 20)),
- child: Image.network( widget.data.imageUrl ?? '',
+ borderRadius: const BorderRadius.all(Radius.circular(20)),
+ child: Image.network(
+ widget.data.imageUrl ?? '',
height: 300,
width: double.infinity,
fit: BoxFit.cover,
@@ -113,10 +108,7 @@ class _DetailsPageState extends State {
Widget _buildInfoBlock(AlbumDataDto albumDetails) {
return Container(
- width: MediaQuery
- .of(context)
- .size
- .width,
+ width: MediaQuery.of(context).size.width,
margin: const EdgeInsets.only(top: 16, left: 5, right: 5),
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
@@ -128,11 +120,7 @@ class _DetailsPageState extends State {
children: [
Text(
widget.data.title,
- style: Theme
- .of(context)
- .textTheme
- .headlineLarge
- ?.copyWith(color: Colors.orange),
+ style: Theme.of(context).textTheme.headlineLarge?.copyWith(color: Colors.orange),
),
Text(
'Artist:',
@@ -169,10 +157,7 @@ class _DetailsPageState extends State {
Widget _buildTracksBlock(AlbumDataDto albumDetails) {
return Container(
- width: MediaQuery
- .of(context)
- .size
- .width,
+ width: MediaQuery.of(context).size.width,
margin: const EdgeInsets.only(top: 16, left: 5, right: 5),
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
@@ -185,15 +170,10 @@ class _DetailsPageState extends State {
children: [
Text(
'Tracks:',
- style: Theme
- .of(context)
- .textTheme
- .headlineSmall
- ?.copyWith(color: Colors.orange),
+ style: Theme.of(context).textTheme.headlineSmall?.copyWith(color: Colors.orange),
),
SizedBox(height: 8.0),
- ...albumDetails.tracks!.map((track) =>
- Padding(
+ ...albumDetails.tracks!.map((track) => Padding(
padding: const EdgeInsets.only(bottom: 4.0),
child: Row(
children: [
@@ -205,11 +185,7 @@ class _DetailsPageState extends State {
// Отступ между иконкой и текстом
Text(
track,
- style: Theme
- .of(context)
- .textTheme
- .bodyMedium
- ?.copyWith(color: Colors.white),
+ style: Theme.of(context).textTheme.bodyMedium?.copyWith(color: Colors.white),
),
],
),
@@ -221,10 +197,7 @@ class _DetailsPageState extends State {
Widget _buildSummaryBlock(AlbumDataDto albumDetails) {
return Container(
- width: MediaQuery
- .of(context)
- .size
- .width,
+ width: MediaQuery.of(context).size.width,
margin: const EdgeInsets.only(top: 16, left: 5, right: 5),
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
@@ -237,23 +210,15 @@ class _DetailsPageState extends State {
children: [
Text(
'Summary:',
- style: Theme
- .of(context)
- .textTheme
- .headlineSmall
- ?.copyWith(color: Colors.orange),
+ style: Theme.of(context).textTheme.headlineSmall?.copyWith(color: Colors.orange),
),
SizedBox(height: 8.0), // Отступ между заголовком и текстом
Text(
'${albumDetails.summary}',
- style: Theme
- .of(context)
- .textTheme
- .bodyMedium
- ?.copyWith(color: Colors.white),
+ style: Theme.of(context).textTheme.bodyMedium?.copyWith(color: Colors.white),
),
],
),
);
}
-}
\ No newline at end of file
+}
diff --git a/lib/home_page/bloc/events.dart b/lib/home_page/bloc/events.dart
index 5bedbf8..73d7080 100644
--- a/lib/home_page/bloc/events.dart
+++ b/lib/home_page/bloc/events.dart
@@ -15,4 +15,4 @@ class HomeLoadDataEvent extends HomeEvent {
@override
List