Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Some things aren't exported from the flutter_deck package #109

Open
matthew-carroll opened this issue Sep 17, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@matthew-carroll
Copy link
Collaborator

I'm trying to create a custom slide. To start this process, I copied the build() method from FlutterDeckBigFactSlide expecting to modify it to meet my needs.

However, it appears that a number of classes referenced in that build() method aren't exported from flutter_deck, preventing me from even compiling a direct copy of the code.

Here's the code that I copied:

@override
  Widget build(BuildContext context) {
    final theme = FlutterDeckBigFactSlideTheme.of(context);
    final FlutterDeckSlideConfiguration(
      footer: footerConfiguration,
      header: headerConfiguration,
    ) = context.flutterDeck.configuration;

    return FlutterDeckSlideBase(
      backgroundBuilder: backgroundBuilder,
      contentBuilder: (context) => Padding(
        padding: FlutterDeckLayout.slidePadding * 4,
        child: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              Flexible(
                child: AutoSizeText(
                  title,
                  style: theme.titleTextStyle,
                  textAlign: TextAlign.center,
                  maxLines: 1,
                ),
              ),
              if (subtitle != null) ...[
                const SizedBox(height: 16),
                Flexible(
                  child: AutoSizeText(
                    subtitle!,
                    style: theme.subtitleTextStyle,
                    textAlign: TextAlign.center,
                    maxLines: subtitleMaxLines,
                  ),
                ),
              ],
            ],
          ),
        ),
      ),
      footerBuilder: footerConfiguration.showFooter ? _buildFooter : null,
      headerBuilder: headerConfiguration.showHeader ? _buildHeader : null,
    );
  }

The artifacts that I can't seem to import include: FlutterDeckSlideBase, FlutterDeckLayout, AutoSizeText. There may be more.

I would suggest a heuristic that says "export everything, unless there's a strong reason to hide something".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant