ente/lib/ui/map/map_button.dart

34 lines
774 B
Dart
Raw Normal View History

import "package:flutter/material.dart";
2023-06-10 12:55:38 +00:00
import "package:photos/theme/ente_theme.dart";
class MapButton extends StatelessWidget {
final String heroTag;
final IconData icon;
final VoidCallback onPressed;
const MapButton({
super.key,
required this.icon,
required this.onPressed,
required this.heroTag,
});
@override
Widget build(BuildContext context) {
2023-06-10 12:55:38 +00:00
final colorScheme = getEnteColorScheme(context);
return FloatingActionButton(
2023-06-10 12:55:38 +00:00
elevation: 2,
heroTag: heroTag,
2023-06-10 12:55:38 +00:00
highlightElevation: 3,
2023-06-22 06:05:39 +00:00
backgroundColor: colorScheme.backgroundElevated,
mini: true,
onPressed: onPressed,
2023-06-10 12:55:38 +00:00
splashColor: Colors.transparent,
child: Icon(
icon,
color: colorScheme.textBase,
),
);
}
}