Repository: flutter/flutter
File: packages/flutter/lib/src/material/time_picker.dart (Dart)

Code before:
                : 24,
      ),
      child: Padding(
        padding: pickerTheme.padding ?? defaultTheme.padding,
        child: LayoutBuilder(
          builder: (BuildContext context, BoxConstraints constraints) {
            final Size constrainedSize = constraints.constrain(dialogSize);
            final Size allowedSize = Size(
              constrainedSize.width < minDialogSize.width
                  ? minDialogSize.width
                  : constrainedSize.width,
              constrainedSize.height < minDialogSize.height
                  ? minDialogSize.height
                  : constrainedSize.height,
            );
            return SingleChildScrollView(
              restorationId: 'time_picker_scroll_view_horizontal',
              scrollDirection: Axis.horizontal,
              child: SingleChildScrollView(
                restorationId: 'time_picker_scroll_view_vertical',
                child: AnimatedContainer(
                  width: allowedSize.width,
                  duration: _kDialogSizeAnimationDuration,
                  curve: Curves.easeIn,
                  constraints: BoxConstraints(
                    minHeight: _kTimePickerMinInputSize.height,
                    maxHeight: allowedSize.height,
                  ),
                  child: Column(
                    mainAxisSize: MainAxisSize.min,
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: <Widget>[
                      Builder(
                        builder: (BuildContext context) {
                          final Widget child = Form(
                            key: _formKey,
                            autovalidateMode: _autovalidateMode.value,
                            child: _TimePicker(
                              time: widget.initialTime,
                              onTimeChanged: _handleTimeChanged,
                              helpText: widget.helpText,
                              cancelText: widget.cancelText,
                              confirmText: widget.confirmText,
                              errorInvalidText: widget.errorInvalidText,
                              hourLabelText: widget.hourLabelText,
                              minuteLabelText: widget.minuteLabelText,
                              restorationId: 'time_picker',
                              entryMode: _entryMode.value,
                              orientation: widget.orientation,
                              onEntryModeChanged: _handleEntryModeChanged,

Review comment (suggestion):
This should be the original value. So above we'd want:
```dart
static const Size _kTimePickerInputSize = Size(312, 252);
static const double _kTimePickerInputMinimumHeight = 216;
```

then here it would be:
```dart
constraints: BoxConstraints(
  minHeight: _kTimePickerInputMinimumHeight,
  maxHeight: allowedSize.height,
),
```
This keeps dialogs that do not need to expand to not be bigger than they were before.

Code after:
                ? 0
                : 24,
      ),
      child: Padding(
        padding: pickerTheme.padding ?? defaultTheme.padding,
        child: LayoutBuilder(
          builder: (BuildContext context, BoxConstraints constraints) {
            final Size constrainedSize = constraints.constrain(dialogSize);
            final Size allowedSize = Size(
              constrainedSize.width < minDialogSize.width
                  ? minDialogSize.width
                  : constrainedSize.width,
              constrainedSize.height < minDialogSize.height
                  ? minDialogSize.height
                  : constrainedSize.height,
            );
            return SingleChildScrollView(
              restorationId: 'time_picker_scroll_view_horizontal',
              scrollDirection: Axis.horizontal,
              child: SingleChildScrollView(
                restorationId: 'time_picker_scroll_view_vertical',
                child: AnimatedContainer(
                  width: allowedSize.width,
                  duration: _kDialogSizeAnimationDuration,
                  curve: Curves.easeIn,
                  constraints: BoxConstraints(
                    minHeight: _kTimePickerInputMinimumHeight,
                    maxHeight: allowedSize.height,
                  ),
                  child: Column(
                    mainAxisSize: MainAxisSize.min,
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: <Widget>[
                      Builder(
                        builder: (BuildContext context) {
                          final Widget child = Form(
                            key: _formKey,
                            autovalidateMode: _autovalidateMode.value,
                            child: _TimePicker(
                              time: widget.initialTime,
                              onTimeChanged: _handleTimeChanged,
                              helpText: widget.helpText,
                              cancelText: widget.cancelText,
                              confirmText: widget.confirmText,
                              errorInvalidText: widget.errorInvalidText,
                              hourLabelText: widget.hourLabelText,
                              minuteLabelText: widget.minuteLabelText,
                              restorationId: 'time_picker',
                              entryMode: _entryMode.value,
                              orientation: widget.orientation,