lab-4
This commit is contained in:
parent
71b843976f
commit
9201d931ce
@ -11,11 +11,12 @@ class MyApp extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
title: 'Flutter Demo',
|
title: 'Flutter Demo',
|
||||||
|
debugShowCheckedModeBanner: false,
|
||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
|
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
|
||||||
useMaterial3: true,
|
useMaterial3: true,
|
||||||
),
|
),
|
||||||
home: const HomePage(title: 'The coolest hamsters on earth ^^'),
|
home: const HomePage(title: 'Leonteva_V.A._PIbd-33'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,17 +35,17 @@ class Body extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final data = [
|
final data = [
|
||||||
CardData('mouse',
|
CardData('dish',
|
||||||
descriptionText: 'hahaha',
|
descriptionText: 'delicious',
|
||||||
icon: Icons.abc,
|
icon: Icons.abc,
|
||||||
imageUrl:
|
imageUrl:
|
||||||
'https://sun9-26.userapi.com/impg/sB_tLPWPCIqxQWmlbcmlRYiw1ibFb70_QMtNwg/56qpyc_C8Go.jpg?size=736x711&quality=95&sign=8f7163b54538a2e7bad5f36a857485d4&type=album'),
|
'https://sun9-26.userapi.com/impg/sB_tLPWPCIqxQWmlbcmlRYiw1ibFb70_QMtNwg/56qpyc_C8Go.jpg?size=736x711&quality=95&sign=8f7163b54538a2e7bad5f36a857485d4&type=album'),
|
||||||
CardData('mouse2',
|
CardData('dish2',
|
||||||
descriptionText: 'ahahaha',
|
descriptionText: 'yes',
|
||||||
icon: Icons.access_alarm_outlined,
|
icon: Icons.access_alarm_outlined,
|
||||||
imageUrl:
|
imageUrl:
|
||||||
'https://sun165-1.userapi.com/impg/EVLbaLilqr8xw5tsqZLQQb6DSYrdKo7Q9sYSsw/H4FRwyMR6Ec.jpg?size=1280x960&quality=96&sign=f606e4ae3d1ccd27917cd1ffa6d91e58&type=album'),
|
'https://sun165-1.userapi.com/impg/EVLbaLilqr8xw5tsqZLQQb6DSYrdKo7Q9sYSsw/H4FRwyMR6Ec.jpg?size=1280x960&quality=96&sign=f606e4ae3d1ccd27917cd1ffa6d91e58&type=album'),
|
||||||
CardData('mouse3',
|
CardData('dish3',
|
||||||
descriptionText: 'eeee',
|
descriptionText: 'eeee',
|
||||||
icon: Icons.access_alarm_rounded,
|
icon: Icons.access_alarm_rounded,
|
||||||
imageUrl:
|
imageUrl:
|
||||||
@ -80,7 +80,7 @@ class Body extends StatelessWidget {
|
|||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
|
||||||
content: Text(
|
content: Text(
|
||||||
'Cute hamster $title ${isLiked ? 'liked!' : 'disliked :('}',
|
'O! $title ${isLiked ? 'liked!' : 'disliked :('}',
|
||||||
style: Theme.of(context).textTheme.bodyLarge,
|
style: Theme.of(context).textTheme.bodyLarge,
|
||||||
),
|
),
|
||||||
backgroundColor: Colors.orangeAccent,
|
backgroundColor: Colors.orangeAccent,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user