Skip to content

Wide DatePickerDialog "Switch to input" button has no margin from dialog side #141338

@parlough

Description

@parlough

Steps to reproduce

  1. Have a DatePickerDialog in your app that can reach its widest form, and have M3 enabled
  2. Run the app. (I tried macos, CanvasKit, and skwasm)
  3. Open the date picker if necessary
  4. Adjust screen so DatePicker can be in its widest mode
  5. Find the "Switch to input" button in the lower left corner

Expected results

The "Switch to input" button in the lower left corner should have some margin from the side of the dialog, similar to the narrower view.

Actual results

The "Switch to input" button is directly against the side of the dialog.

Code sample

Code sample
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: DatePickerDialog(
            firstDate: DateTime.utc(2010),
            lastDate: DateTime.utc(2030),
          ),
        ),
      ),
    );
  }
}

Screenshots

Screenshots

Wide date picker (with issue):

Wide date picker with Switch to input button too close to side

Narrow date picker (better):

Narrow date picker with Switch to input button with better marging

Flutter version

Version info
Flutter 3.19.0-3.0.pre.43 • channel main • https://github.com/flutter/flutter
Framework • revision f961fdf2ba (4 hours ago) • 2024-01-10 17:37:07 -0500
Engine • revision a045134c91
Tools • Dart 3.4.0 (build 3.4.0-14.0.dev) • DevTools 2.31.0

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listf: date/time pickerDate or time picker widgetsf: material designflutter/packages/flutter/material repository.found in release: 3.16Found to occur in 3.16found in release: 3.19Found to occur in 3.19frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

Type

No type

Projects

Status

Done (PR merged)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions