1import 'package:flutter/material.dart';
2import 'widget_styles.dart';
3import 'zoom_controls_config.dart';
29 required this.zoomOutPressed,
34 State<ZoomControls>
createState() => _ZoomControlsState();
37class _ZoomControlsState
extends State<ZoomControls> {
44 widget.zoomInPressed();
48 widget.zoomOutPressed();
52 Widget build(BuildContext context) {
53 final config = widget.config;
54 final width = config.buttonWidth ?? kStandardButtonWidth;
55 final height = config.zoomControlsHeight ?? kZoomControlsHeight;
56 final bgColor = config.buttonBackgroundColor ?? kButtonBackgroundColorOpaque;
57 final textColor = config.textColor ?? kBaseBlackColor;
58 final padding = config.padding ?? EdgeInsets.only(right: kStandardRightPadding + MediaQuery.of(context).padding.right);
61 alignment: Alignment.centerRight,
67 decoration: BoxDecoration(
68 borderRadius: kStandardBorderRadius,
69 boxShadow: kStandardShadows,
76 borderRadius: kTopBorderRadius,
78 borderRadius: kTopBorderRadius,
81 child: config.zoomInIcon ?? Text(
83 style: TextStyle(fontSize: kButtonFontSize, color: textColor),
92 borderRadius: kBottomBorderRadius,
94 borderRadius: kBottomBorderRadius,
97 child: config.zoomOutIcon ?? Text(
99 style: TextStyle(fontSize: kButtonFontSize, color: textColor),