Skip to content

CupertinoFormSection.insetGrouped divider margin issue #119895

Open
@jwseph

Description

@jwseph

Steps to Reproduce

  1. Use a CupertinoFormSection.insetGrouped with at least two CupertinoFormRow children

Expected result:
Since CupertinoFormSection's dividers' leading margins cannot be customized (unlike CupertinoListSection), its dividers' leading margins should align with the text.

Actual result:
The dividers' leading margins correctly align with the text for the base CupertinoFormSection, but they do not align for CupertinoFormSection.insetGrouped. Tested in Android and DartPad

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

void main() => runApp(const TestApp());

class TestApp extends StatelessWidget {
  const TestApp({super.key});

  @override
  Widget build(BuildContext context) {
    return CupertinoApp(
      theme: const CupertinoThemeData(
        brightness: Brightness.light,
      ),
      home: Container(
        color: CupertinoColors.systemGroupedBackground.color,
        child: SafeArea(
          child: Column(
            children: [
              CupertinoFormSection(
                header: const Text('CupertinoFormSection (not .insetGrouped, working)'),
                children: [
                  for (int i = 0; i < 4; i++) CupertinoTextFormFieldRow(
                    prefix: const Padding(
                      padding: EdgeInsets.only(right: 16),
                      child: Text('Prefix'),
                    ),
                    placeholder: 'Placeholder',
                  ),
                ],
              ),
              const SizedBox(height: 24),
              CupertinoFormSection.insetGrouped(
                header: const Text('CupertinoFormSection.insetGrouped, not working'),
                children: [
                  for (int i = 0; i < 4; i++) CupertinoTextFormFieldRow(
                    prefix: const Padding(
                      padding: EdgeInsets.only(right: 16),
                      child: Text('Prefix'),
                    ),
                    placeholder: 'Placeholder',
                  ),
                ],
              ),
            ],
          ),
        ),
      ),
    );
  }
}
Image

screenshot

Logs
[√] Flutter (Channel stable, 3.7.0, on Microsoft Windows [Version 10.0.19045.2486], locale en-US)
    • Flutter version 3.7.0 on channel stable at C:\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision b06b8b2710 (10 days ago), 2023-01-23 16:55:55 -0800
    • Engine revision b24591ed32
    • Dart version 2.19.0
    • DevTools version 2.20.1

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at C:\Users\Jet_g\AppData\Local\Android\sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Build Tools 2019 16.11.2)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
    • Visual Studio Build Tools 2019 version 16.11.31624.102
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2021.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)

[√] VS Code, 64-bit edition (version 1.73.1)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 3.58.0

[√] Connected device (4 available)
    • SM A136U1 (mobile) • R5CT12A42CV • android-arm    • Android 12 (API 31)
    • Windows (desktop)  • windows     • windows-x64    • Microsoft Windows [Version 10.0.19045.2486]
    • Chrome (web)       • chrome      • web-javascript • Google Chrome 108.0.5359.125
    • Edge (web)         • edge        • web-javascript • Microsoft Edge 109.0.1518.61

[√] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listf: cupertinoflutter/packages/flutter/cupertino repositoryfound in release: 3.7Found to occur in 3.7found in release: 3.8Found to occur in 3.8frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions