refactor: show devtools only in debug mode
This commit is contained in:
@@ -18,10 +18,7 @@ class _FlQueryDevtoolsState extends State<FlQueryDevtools> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (kReleaseMode) {
|
||||
return SizedBox.shrink(child: widget.child);
|
||||
}
|
||||
|
||||
if (kDebugMode) {
|
||||
return Navigator(
|
||||
onPopPage: (route, result) {
|
||||
return true;
|
||||
@@ -92,4 +89,6 @@ class _FlQueryDevtoolsState extends State<FlQueryDevtools> {
|
||||
],
|
||||
);
|
||||
}
|
||||
return SizedBox.shrink(child: widget.child);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user