init method

void init(
  1. dynamic toastCall(
    1. String
    ),
  2. dynamic printLogCall(
    1. String
    ),
  3. BuildContext context,
  4. GlobalKey<NavigatorState> navigatorKey, {
  5. Map<DokitCallType, CustomCallback>? customCallMap,
})

使用初始化

Implementation

void init(
  Function(String) toastCall,
  Function(String) printLogCall,
  BuildContext context,
  GlobalKey<NavigatorState> navigatorKey, {
  Map<DokitCallType, CustomCallback>? customCallMap,
}) {
  _showMenuNotifier = ValueNotifier(true);
  _navigatorKey = navigatorKey;
  _toastCall = toastCall;
  _printLogCall = printLogCall;
  _customCallMap = customCallMap;
  _areaPadding = MediaQueryData.fromView(
    WidgetsBinding.instance.platformDispatcher.views.first,
  ).padding;
  var flutterView = WidgetsBinding.instance.platformDispatcher.views.first;
  _screenSize = Size(
    flutterView.physicalSize.width / flutterView.devicePixelRatio,
    flutterView.physicalSize.height / flutterView.devicePixelRatio,
  );
  _showEnterIcon(context);
}