build method

  1. @override
Widget build(
  1. BuildContext context
)
override

Builds the overlay container with a header and the main content.

Implementation

@override
Widget build(BuildContext context) {
  final themeBloc = FastThemeBloc.instance;
  final brightness = themeBloc.currentState.brightness;
  final overlayStyle = brightness == Brightness.dark
      ? SystemUiOverlayStyle.light
      : SystemUiOverlayStyle.dark;

  return Scaffold(
    body: AnnotatedRegion<SystemUiOverlayStyle>(
      value: overlayStyle,
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.stretch,
        children: <Widget>[
          if (titleText != null) _buildHeader(context),
          Expanded(child: child),
        ],
      ),
    ),
  );
}