-
Notifications
You must be signed in to change notification settings - Fork 0
/
drink_image.dart
40 lines (36 loc) · 952 Bytes
/
drink_image.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import 'package:flutter/material.dart';
class DrinkImage extends StatelessWidget {
const DrinkImage({
super.key,
required this.image,
});
final String image;
@override
Widget build(BuildContext context) {
return Stack(
children: [
Container(
height: MediaQuery.of(context).size.height * 0.4,
decoration: BoxDecoration(
image: DecorationImage(
image: NetworkImage(image),
fit: BoxFit.fill,
),
),
),
Padding(
padding: const EdgeInsets.only(top: 40, left: 5),
child: ElevatedButton(
style: ButtonStyle(
shape: MaterialStateProperty.all(const CircleBorder()),
),
onPressed: () {
Navigator.pushNamed(context, '/first_page');
},
child: const Icon(Icons.arrow_back),
),
),
],
);
}
}