Skip to content

Custom Widget Compilation Fails with Unknown Error #6290

@cjmcnulty2619

Description

@cjmcnulty2619

Can we access your project?

  • I give permission for members of the FlutterFlow team to access and test my project for the sole purpose of investigating this issue.

Current Behavior

I'm consistently encountering an "Unknown error" when trying to compile even a minimal custom widget. I've tried the following:

  • Used only the FlutterFlow boilerplate with a simple Text('It works!') widget
  • Renamed the widget to unique names (e.g., MyTestBox)
  • Deleted and re-created the widget multiple times
  • Hard refreshed the browser (Cmd+Shift+R)
  • Verified I'm on the Pro plan
  • Removed all parameters and used no external imports except the default boilerplate

Could there be a bug in the widget compiler or deployment pipeline? I’ve followed the official guidance exactly, and this happens even with minimal safe code.

Please let me know how to resolve this — I need to get my main widget (BatStatsTable) working, but I can’t even get a Text('Test') widget to compile.

Expected Behavior

I expected the custom widget to compile successfully in FlutterFlow once all required parameters were properly defined in the Parameters tab and the code adhered to the expected boilerplate structure. Specifically, I expected even a minimal version of the widget (e.g., displaying static text) to compile, especially after upgrading to the Pro plan. I also expected FlutterFlow to provide a meaningful error message if there was an issue with the code, rather than a generic “Unknown error.”

Steps to Reproduce

  1. Create custom widget
  2. Name the widget "BatStatsTable"
  3. Add parameters (under parameters below)
  4. Save code (under widget code below)
  5. Compile custom widget

Parameters:
Parameter Name | Type | Description
batterStats | List | A list of Supabase rows (e.g., from stats_statcast_2025) representing each batter’s stats.
statColumns | List | The list of selected stat column keys (e.g., ["avg", "obp", "wrc_plus"]) to display dynamically as columns.
onPlayerTap | Function(String) or void Function(String) | A callback function triggered when a player row is tapped, passing the player's ID.

Widget Code (a stripped-down version):
// Automatic FlutterFlow imports
import '/flutter_flow/flutter_flow_theme.dart';
import 'package:flutter/material.dart';

// Begin custom widget code
// DO NOT REMOVE OR MODIFY THE CODE ABOVE!

class BatStatsTable extends StatefulWidget {
const BatStatsTable({
super.key,
required this.batterStats,
required this.statColumns,
required this.onPlayerTap,
});

final List batterStats; // Supabase rows
final List statColumns;
final void Function(String playerId) onPlayerTap;

@OverRide
State createState() => _BatStatsTableState();
}

class _BatStatsTableState extends State {
@OverRide
Widget build(BuildContext context) {
final theme = FlutterFlowTheme.of(context);

return SingleChildScrollView(
  scrollDirection: Axis.horizontal,
  child: DataTable(
    headingRowColor: MaterialStateProperty.all(theme.primaryBackground),
    columns: [
      const DataColumn(label: Text('Name')),
      ...widget.statColumns.map(
        (col) => DataColumn(label: Text(col.toUpperCase())),
      ),
    ],
    rows: widget.batterStats.map((row) {
      final playerId = row['player_id_scp']?.toString() ?? '';
      final name = row['name_short'] ?? 'Unknown';

      return DataRow(
        cells: [
          DataCell(Text(name)),
          ...widget.statColumns.map((col) {
            final value = row[col];
            return DataCell(Text(value?.toString() ?? '-'));
          }).toList(),
        ],
        onSelectChanged: (_) {
          if (playerId.isNotEmpty) {
            widget.onPlayerTap(playerId);
          }
        },
      );
    }).toList(),
  ),
);

}
}

Reproducible from Blank

  • The steps to reproduce above start from a blank project.

Bug Report Code (Required)

ITEeks/lvJFOj70C+rrUYe5arwMwGkQ5a7sviu5+FBQaI+PuBJkMYcmkXFtWSOqHdFVAJFCjhjszpuDKjYSeVMI6IUuuG9k/yKtpUxDjfHmnRLanEpaKZ3RPN/JmCUyn3Kuo3BZNOutoSUIQ7V6bfuuAb3qCf9qOYwx5e6fDbOY=

Visual documentation

Image

Environment

- FlutterFlow version: FlutterFlow 6.1.15
- Platform: MacOS Desktop and Web
- Browser name and version: Google Chrome Version 137.0.7151.119 (Official Build) (x86_64)
- Operating system and version affected: macOS Sequoia 15.4.1 (24E263)

Additional Information

I'm trying to build a custom BatStatsTable widget that displays dynamically generated baseball stats in a horizontally scrollable table with a frozen header. The widget depends on parameters like batterStats (a list of Supabase rows), statColumns (a list of strings), and an onPlayerTap callback.

Despite upgrading to the Pro plan and testing multiple variations — from minimal widgets to full-feature versions — every version fails to compile with an "Unknown error." I’ve confirmed the widget is valid Flutter code and compiles outside FlutterFlow. Even the boilerplate test widget with a single Text('Test') fails.

This issue has blocked me from shipping core functionality in my production app. The BatStatsTable widget is critical to the core experience, and FlutterFlow’s unknown error makes it impossible to debug or move forward with my timeline to launch the app asap.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions