Need Help with UXCam Errors in FlutterFlow – All Advice Welcome!

Best Practices

Has anyone of you had success implementing UXCam?

I've taken the code directly from UXCam, but I'm getting a couple of compilation errors.

Here is there code on pub.dev: https://pub.dev/packages/flutter_uxcam

Here is my implementation using this dependencies: flutter_uxcam: ^2.5.2

// Automatic FlutterFlow imports
import '/backend/schema/structs/index.dart';
import '/backend/schema/enums/enums.dart';
import '/backend/supabase/supabase.dart';
import '/actions/actions.dart' as action_blocks;
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/custom_code/widgets/index.dart'; // Imports other custom widgets
import '/custom_code/actions/index.dart'; // Imports custom actions
import '/flutter_flow/custom_functions.dart'; // Imports custom functions
import 'package:flutter/material.dart';
// Begin custom widget code
// DO NOT REMOVE OR MODIFY THE CODE ABOVE!

import 'package:flutter_uxcam/flutter_uxcam.dart';

class UXCamWrapper extends StatefulWidget {
  const UXCamWrapper({
    super.key,
    this.width,
    this.height,
  });

  final double? width;
  final double? height;

  @override
  State<UXCamWrapper> createState() => _UXCamWrapperState();
}

class _UXCamWrapperState extends State<UXCamWrapper> {
  @override
  Widget build(BuildContext context) {
    FlutterUxcam
        .optIntoSchematicRecordings(); // Confirm that you have user permission for screen recording
    FlutterUxConfig config = FlutterUxConfig(userAppKey: "MY-KEY");
    FlutterUxcam.startWithConfiguration(config);
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

Here is my error:

3
2 replies