refactor: show devtools only in debug mode

This commit is contained in:
Kingkor Roy Tirtho
2023-06-24 13:06:37 +06:00
parent 5bb89ed1fb
commit c0edb90896
@@ -18,10 +18,7 @@ class _FlQueryDevtoolsState extends State<FlQueryDevtools> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
if (kReleaseMode) { if (kDebugMode) {
return SizedBox.shrink(child: widget.child);
}
return Navigator( return Navigator(
onPopPage: (route, result) { onPopPage: (route, result) {
return true; return true;
@@ -92,4 +89,6 @@ class _FlQueryDevtoolsState extends State<FlQueryDevtools> {
], ],
); );
} }
return SizedBox.shrink(child: widget.child);
}
} }