This commit is contained in:
panazoid 2024-11-14 02:18:07 +04:00
parent f88537985c
commit 0961683b59

View File

@ -38,17 +38,14 @@ class Body extends StatelessWidget {
final data = [ final data = [
CardData('Arc Warden', CardData('Arc Warden',
discriptionText: 'Ловкость', discriptionText: 'Ловкость',
icon: Icons.account_circle,
imageUrl: 'https://yt3.googleusercontent.com/VnqOJt9iHkwXonTzNfenydf4hTD2ilYcmiZv-RP8-3eifX16A64eZyV4z43LBL4EhPWAhTN2lJE=s900-c-k-c0x00ffffff-no-rj', imageUrl: 'https://yt3.googleusercontent.com/VnqOJt9iHkwXonTzNfenydf4hTD2ilYcmiZv-RP8-3eifX16A64eZyV4z43LBL4EhPWAhTN2lJE=s900-c-k-c0x00ffffff-no-rj',
), ),
CardData('Void Spirit', CardData('Void Spirit',
discriptionText: 'Универсальный', discriptionText: 'Универсальный',
icon: Icons.account_circle,
imageUrl: 'https://cdna.artstation.com/p/assets/covers/images/024/245/520/large/maxime-lebled-voidspirit.jpg?1581789586', imageUrl: 'https://cdna.artstation.com/p/assets/covers/images/024/245/520/large/maxime-lebled-voidspirit.jpg?1581789586',
), ),
CardData('Invoker', CardData('Invoker',
discriptionText: 'Универсальный', discriptionText: 'Универсальный',
icon: Icons.account_circle,
imageUrl: 'https://steamuserimages-a.akamaihd.net/ugc/1010400569445271177/6D5FF0CF2C48F8351C9AAC98363DEC31386678AB/?imw=5000&imh=5000&ima=fit&impolicy=Letterbox&imcolor=%23000000&letterbox=false', imageUrl: 'https://steamuserimages-a.akamaihd.net/ugc/1010400569445271177/6D5FF0CF2C48F8351C9AAC98363DEC31386678AB/?imw=5000&imh=5000&ima=fit&impolicy=Letterbox&imcolor=%23000000&letterbox=false',
), ),
]; ];
@ -78,10 +75,12 @@ class Body extends StatelessWidget {
void _showSnackBar(BuildContext context, String title, bool isLiked) { void _showSnackBar(BuildContext context, String title, bool isLiked) {
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
ScaffoldMessenger.of(context).showSnackBar(SnackBar( ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: Text( content: Center(
'Вы ${isLiked ? 'добавили в избранное' : 'убрали из избраных'} $title', child: Text(
'${isLiked ? 'Добавлено в избранное' : 'Убрано из избраных'} $title',
style: Theme.of(context).textTheme.bodyLarge, style: Theme.of(context).textTheme.bodyLarge,
), ),
),
backgroundColor: Color(0xFF7BA05B), backgroundColor: Color(0xFF7BA05B),
duration: const Duration(seconds: 1), duration: const Duration(seconds: 1),
)); ));