toggleFullScreen method
void
toggleFullScreen()
Implementation
void toggleFullScreen() {
if (widget.isFullScreen) {
Navigator.of(context).pop();
} else {
Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => Scaffold(
body: SafeArea(
child: CartesianCanvas(
items: widget.items,
widgetItems: widget.widgetItems,
theme: widget.theme,
controller: widget.controller,
showControls: widget.showControls,
showLegend: widget.showLegend,
title: widget.title,
initialScale: currentScale / 60.0,
initialShowGrid: isGridVisible,
enableFreehandDrawing: isDrawingModeActive,
freehandColor: widget.freehandColor,
freehandWidth: widget.freehandWidth,
isFullScreen: true,
onFreehandStroke: widget.onFreehandStroke,
onTap: widget.onTap,
onLongPress: widget.onLongPress,
),
),
),
),
);
}
}