Aidra Driver 1.3.5+68
Aidra Driver - Your path to green energy
Loading...
Searching...
No Matches
map_button.dart
Go to the documentation of this file.
1import 'package:flutter/material.dart';
2
3import '../../../../../../core/ui/theme/color_palette.dart';
4
5class MapButton extends StatefulWidget {
6 final IconData icon;
7 final VoidCallback onPressed;
8 final String? tooltip;
9 const MapButton({
10 super.key,
11 required this.icon,
12 required this.onPressed,
13 this.tooltip,
14 });
15
16 @override
17 State<MapButton> createState() => _MapButtonState();
18}
19
20class _MapButtonState extends State<MapButton> {
21 @override
22 Widget build(BuildContext context) {
23 return Container(
24 decoration: BoxDecoration(
26 shape: BoxShape.circle,
27 boxShadow: [
28 BoxShadow(
29 color: Colors.black.withValues(alpha: 0.2),
30 blurRadius: 4,
31 offset: const Offset(0, 2),
32 ),
33 ],
34 ),
35 child: Material(
36 color: Colors.transparent,
37 child: InkWell(
38 customBorder: const CircleBorder(),
39 onTap: widget.onPressed,
40 child: Tooltip(
41 message: widget.tooltip ?? '',
42 child: Padding(
43 padding: const EdgeInsets.all(8.0),
44 child: Icon(
45 widget.icon,
46 color: Colors.black87,
47 size: 24,
48 ),
49 ),
50 ),
51 ),
52 ),
53 );
54 }
55}
class App extends StatefulWidget build(BuildContext context)
Definition app.dart:31
static const white
override State< MapButton > createState()
final VoidCallback onPressed
final String tooltip
const MapButton({ super.key, required this.icon, required this.onPressed, this.tooltip, })
final IconData icon
final Widget child
final EdgeInsets padding
class Partner String
final Color color
Definition failures.dart:1
final String message
Definition failures.dart:0
const MapButton({ super.key, required this.icon, required this.onPressed, this.tooltip, })
final VoidCallback onTap