Skip to content

Commit

Permalink
only use dynamic load of overlay in debug mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
xdd666t committed May 22, 2024
1 parent f3a033c commit 5e72634
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions lib/src/widget/helper/smart_overlay.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'dart:async';

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/src/widget/helper/smart_overlay_entry.dart';

Expand All @@ -26,12 +27,13 @@ class SmartOverlay extends StatefulWidget {
class _SmartOverlayState extends State<SmartOverlay> {
bool visible = false;

// bool _visible = false;
// set visible(bool value) => _visible = value;
// bool get visible => _visible || !kDebugMode;

@override
void initState() {
if (!kDebugMode) {
visible = true;
return;
}

widget.controller?._setListener(
onShow: () {
setState(() {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description:
An elegant Flutter Dialog solution,
Easily implement Toast, Loading and custom Dialog,
Make the use of the dialog easier!
version: 4.9.7+3
version: 4.9.7+4
homepage: https://github.com/fluttercandies/flutter_smart_dialog
# flutter pub publish --server=https://pub.dartlang.org
# flutter build web --release --base-href="/flutter_smart_dialog/web/"
Expand Down

0 comments on commit 5e72634

Please sign in to comment.