#
whycq
2025-03-03 6a90c5bde0facc8330ce4c7c7d89292717b7ac65
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
 
class MenuItem extends StatelessWidget {
  final VoidCallback onTap;
  final IconData icon;
  final String title;
 
  const MenuItem({
    super.key,
    required this.onTap,
    required this.icon,
    required this.title,
  });
 
  @override
  Widget build(BuildContext context) {
    return Container(
        height: 150,
        margin: EdgeInsets.all(5),
        child: Material(
          color: Colors.transparent,
          child: InkWell(
            borderRadius: BorderRadius.circular(30),
            splashColor: Colors.blue.withAlpha(30),
            highlightColor: Colors.blue.withAlpha(60),
            onTap: onTap,
            child: Container(
              margin: EdgeInsets.all(10),
              decoration: BoxDecoration(
                  borderRadius: BorderRadius.circular(30),
                  color: Colors.blue[300]),
              child: Flex(
                direction: Axis.vertical,
                children: [
                  Expanded(
                      flex: 2,
                      child: Icon(
                        icon,
                        size: 70,
                        color: Colors.white,
                      )),
                  Expanded(child: Text(title))
                ],
              ),
            ),
          ),
        )
    );
  }
}
 
// return InkWell(
// splashColor: Colors.blue.withAlpha(30),
// highlightColor: Colors.blue.withAlpha(60),
// onTap: () {
//
// },
// child: Container(
// margin: EdgeInsets.all(20),
// decoration: BoxDecoration(
// shape: BoxShape.circle,
// color: Colors.orange
// ),
// child: Flex(
// direction: Axis.vertical,
// children: [
// Icon(Icons.ac_unit),
// Text('data')
// ],
// ),
// ),
// );