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

Null Check on a null Value NeumorphicAppBar #249

Closed
rennylangat opened this issue Dec 9, 2021 · 3 comments
Closed

Null Check on a null Value NeumorphicAppBar #249

rennylangat opened this issue Dec 9, 2021 · 3 comments

Comments

@rennylangat
Copy link

  • Upon following this error? I discovered it is thrown by checking if theme has been set Line 238
    centerMiddle: widget._getEffectiveCenterTitle(theme, nTheme!.current!), middleSpacing: widget.titleSpacing,

  • By default an AppBar should just return a sort of container with blue background and a leading icon of Arrow Back.

@jabirmayar
Copy link

any update on this?

@abhith
Copy link

abhith commented Mar 26, 2022

I was able to get around this issue by wrapping the page content in a NeumorphicTheme widget as in the example below,

class _FirstThemeWidgetPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return NeumorphicTheme(
      themeMode: ThemeMode.light,
      theme: NeumorphicThemeData(
        lightSource: LightSource.topLeft,
        accentColor: NeumorphicColors.accent,
        appBarTheme: NeumorphicAppBarThemeData(
          buttonStyle: NeumorphicStyle(boxShape: NeumorphicBoxShape.circle()),
          textStyle: TextStyle(color: Colors.black54),
          iconTheme: IconThemeData(color: Colors.black54, size: 30),
        ),
        depth: 4,
        intensity: 0.9,
      ),
      child: AppBarPageUsingTheme(),
    );
  }
}

@rennylangat
Copy link
Author

@abhith Thanks for the work around. Probably create a PR for the same?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants