1
+ import 'dart:io' ;
2
+
1
3
import 'package:flutter/cupertino.dart' ;
2
4
import 'package:flutter/material.dart' ;
3
5
@@ -11,26 +13,44 @@ class _ListMealsState extends State<ListMeals> {
11
13
Widget build (BuildContext context) {
12
14
var mediaQuery = MediaQuery .of (context);
13
15
return Scaffold (
14
- body: Stack (
15
- children: < Widget > [
16
- _buildWidgetBackgroundCircle (mediaQuery),
17
- ],
16
+ body: Container (
17
+ width: double .infinity,
18
+ height: double .infinity,
19
+ child: Stack (
20
+ children: < Widget > [
21
+ _buildWidgetBackgroundCircle (mediaQuery),
22
+ _buildWidgetArrowBackMenu (),
23
+ ],
24
+ ),
18
25
),
19
26
);
20
27
}
21
28
22
- Positioned _buildWidgetBackgroundCircle (MediaQueryData mediaQuery) {
23
- return Positioned (
24
- top: - 100.0 ,
25
- left: - 100.0 ,
26
- child: Container (
27
- width: mediaQuery.size.height / 2.2 ,
28
- height: mediaQuery.size.height / 2.2 ,
29
- decoration: BoxDecoration (
30
- color: Color (0x3FE8364B ),
31
- shape: BoxShape .circle,
29
+ Widget _buildWidgetArrowBackMenu () {
30
+ return SafeArea (
31
+ minimum: EdgeInsets .symmetric (horizontal: 16.0 ),
32
+ child: CircleAvatar (
33
+ child: Platform .isIOS
34
+ ? Icon (Icons .arrow_back_ios, color: Colors .black)
35
+ : Icon (Icons .arrow_back, color: Colors .black),
36
+ maxRadius: 24.0 ,
37
+ backgroundColor: Colors .white,
32
38
),
33
- ),
34
- );
39
+ );
40
+ }
41
+
42
+ Widget _buildWidgetBackgroundCircle (MediaQueryData mediaQuery) {
43
+ return Positioned (
44
+ top: - 100.0 ,
45
+ left: - 100.0 ,
46
+ child: Container (
47
+ width: mediaQuery.size.height / 2.2 ,
48
+ height: mediaQuery.size.height / 2.2 ,
49
+ decoration: BoxDecoration (
50
+ color: Color (0x3FE8364B ),
51
+ shape: BoxShape .circle,
52
+ ),
53
+ ),
54
+ );
35
55
}
36
56
}
0 commit comments