lab4
This commit is contained in:
parent
f88537985c
commit
0961683b59
@ -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,9 +75,11 @@ 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(
|
||||||
style: Theme.of(context).textTheme.bodyLarge,
|
'${isLiked ? 'Добавлено в избранное' : 'Убрано из избраных'} $title',
|
||||||
|
style: Theme.of(context).textTheme.bodyLarge,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
backgroundColor: Color(0xFF7BA05B),
|
backgroundColor: Color(0xFF7BA05B),
|
||||||
duration: const Duration(seconds: 1),
|
duration: const Duration(seconds: 1),
|
||||||
|
Loading…
Reference in New Issue
Block a user