showColorSelectorPage function Null safety

Future<ColorDescriptor?> showColorSelectorPage(
  1. BuildContext context
)

Implementation

Future<ColorDescriptor?> showColorSelectorPage(BuildContext context) async {
  return Navigator.of(context).push(
    MaterialPageRoute(
      builder: (context) {
        return ColorSelectorPage(
          // onTap: (value) => selectedColor = value,
          onDoubleTap: (value) => _close(context, value),
        );
      },
    ),
  );
}