Skip to content

Add opportunity to change CupertinoTextField suffix alignment #152482

@ziqq

Description

@ziqq

Use case

CupertinoTextField(
  readOnly: true,
  padding: EdgeInsets.symmetric(
    horizontal: 16,
    vertical: 16 / 2,
  ),
  minLines: 1,
  maxLines: 50,
  placeholder: 'Placeholder',
  suffix: Padding(
    padding: EdgeInsets.only(right: 16),
    child: DecoratedBox(
      decoration: BoxDecoration(
        color: CupertinoDynamicColor.resolve(
          CupertinoColors.systemBlue,
          context,
        ),
        borderRadius: const BorderRadius.all(Radius.circular(30)),
      ),
      child: Padding(
        padding: EdgeInsets.symmetric(
          horizontal: 16 / 2,
          vertical: 10 / 2,
        ),
        child: Text(
          'NEW',
          style: Theme.of(context).textTheme.labelSmall?.copyWith(
            color: CupertinoColors.white,
            fontWeight: FontWeight.w600,
            fontSize: 12,
            height: 1,
          ),
        ),
      ),
    ),
  ),
)
image

Proposal

Change align suffix on top.

Add one property to

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterf: cupertinoflutter/packages/flutter/cupertino repositoryframeworkflutter/packages/flutter repository. See also f: labels.fyi-text-inputFor the attention of Text Input teamteam-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