如何使命名方法参数需要 Flutter?

How to make a named method parameter required Flutter?

void checkIfAllValsAreIn(
    { Map<> map,
    bool isBool,
    Function() callback}) async {...}

如何使调用时需要这些命名参数中的任何一个?

制作它们@required

import 'package:meta/meta.dart';
void checkIfAllValsAreIn(
    { @required Map<> map,
    @required bool isBool,
    @required Function() callback}) async {...}

尝试在正文中添加:

assert(isBool != null);