buildHelpSection method Null safety

  1. @protected
Widget buildHelpSection(
  1. BuildContext context,
  2. TranslationEntry helpText,
  3. {bool minify = false}
)

Implementation

@protected
Widget buildHelpSection(
  BuildContext context,
  TranslationEntry helpText, {
  bool minify = false,
}) {
  var theme = Theme.of(context);
  var translator = Translator.of(context);
  return Padding(
    padding: minify == true
        ? EdgeInsets.zero
        : EdgeInsets.fromLTRB(
            16.0,
            16.0,
            16.0,
            0.0,
          ),
    child: Material(
      borderRadius: minify == true ? null : BorderRadius.circular(16.0),
      elevation: minify == true ? 0.0 : 2.0,
      child: Container(
        padding: EdgeInsets.all(16.0),
        width: double.infinity,
        child: Row(
          children: <Widget>[
            Icon(
              Icons.help,
              color: theme.textTheme.bodyText2!.color,
            ),
            SizedBox(
              width: 8.0,
            ),
            Expanded(
              child: Text(
                translator.translate(helpText),
              ),
            ),
          ],
        ),
      ),
    ),
  );
}