The following code works fine when I download it, the Code Analyzer doesn't have an issue with it, but the compilation fails
(The import seems to fail with a custom widget, as well.)
// Automatic FlutterFlow imports
import '/backend/backend.dart';
import '/backend/schema/structs/index.dart';
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/custom_code/actions/index.dart'; // Imports other custom actions
import '/flutter_flow/custom_functions.dart'; // Imports custom functions
import 'package:flutter/material.dart';
// Begin custom action code
// DO NOT REMOVE OR MODIFY THE CODE ABOVE!
import '../../components/bottom_sheets/create_post_sheet2/create_post_sheet2_widget.dart';
import 'package:share_handler_platform_interface/share_handler_platform_interface.dart';
Future handleShare(BuildContext context, dynamic media) async {
await showModalBottomSheet(
isScrollControlled: true,
backgroundColor: Colors.transparent,
context: context,
builder: (context) {
return Padding(
padding: MediaQuery.viewInsetsOf(context),
child: CreatePostSheet2Widget(url: (media as SharedMedia).content),
);
},
);
}