init method
void
init(
- dynamic toastCall(),
- dynamic printLogCall(),
- BuildContext context,
- 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);
}