feduke-nukem / flutter_easy_dialogs

Easy dialogs library for Flutter
https://pub.dev/packages/flutter_easy_dialogs
MIT License
13 stars 0 forks source link

馃[BUG] error #18

Closed AllLuckly closed 1 year ago

AllLuckly commented 1 year ago

my class is StatefulWidget 路路路 static EasyDialogsController get controller => _key.currentState!.controller; 路路路

路路路 ======== Exception caught by gesture =============================================================== The following _TypeError was thrown while handling a gesture: Null check operator used on a null value

When the exception was thrown, this was the stack:

0 FlutterEasyDialogs.controller (package:flutter_easy_dialogs/src/flutter_easy_dialogs.dart:22:67)

1 FlutterEasyDialogs.show (package:flutter_easy_dialogs/src/flutter_easy_dialogs.dart:26:7)

2 EasyDialogsX.show (package:flutter_easy_dialogs/src/core/easy_dialogs_controller.dart:548:62)

路路路

feduke-nukem commented 1 year ago

my class is StatefulWidget 路路路 static EasyDialogsController get controller => _key.currentState!.controller; 路路路

路路路 ======== Exception caught by gesture =============================================================== The following _TypeError was thrown while handling a gesture: Null check operator used on a null value

When the exception was thrown, this was the stack: #0 FlutterEasyDialogs.controller (package:flutter_easy_dialogs/src/flutter_easy_dialogs.dart:22:67) #1 FlutterEasyDialogs.show (package:flutter_easy_dialogs/src/flutter_easy_dialogs.dart:26:7) #2 EasyDialogsX.show (package:flutter_easy_dialogs/src/core/easy_dialogs_controller.dart:548:62) 路路路

Hello, @AllLuckly

Did you wrap your material application with FlutterEasyDialogs.builder()? Like so:

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      builder: FlutterEasyDialogs.builder(),
    );
  }
}
feduke-nukem commented 1 year ago

@AllLuckly Does the problem persist? I will close the issue otherwise

feduke-nukem commented 1 year ago

@AllLuckly, I am closing this issue for now as there has been no activity. Feel free to reopen the issue if the problem arises again.