beforePickImage method

dynamic beforePickImage()

Implementation

beforePickImage() {
  if (kIsWeb) {
    pickImage(ImageSource.gallery);
    return;
  }

  showModalBottomSheet<void>(
    context: context,
    builder: (context) {
      return Container(
        height: 300,
        child: Column(
          children: [
            ListTile(
              title: Text(S.of(context).gallery),
              onTap: () => pickImage(ImageSource.gallery, context: context),
            ),
            ListTile(
              title: Text(S.of(context).camera),
              onTap: () => pickImage(ImageSource.camera, context: context),
            )
          ],
        ),
      );
    },
  );
}