Native Edit menu should be used [ IOS ]

Use case

On IOS, the edit menu when highlighting text does not behave as it’s native counter-part. Is there a reason Flutter does not use the native Edit menu?

Environment

Flutter doctor

[✓] Flutter (Channel dev, 2.5.0-5.0.pre, on Mac OS X 10.15.7
    19H1323 darwin-x64, locale en-HU)
    • Flutter version 2.5.0-5.0.pre at
      /Users/adeola/Documents/flutter
    • Upstream repository
      https://github.com/flutter/flutter.git
    • Framework revision 0f465e5b2a (6 days ago), 2021-08-04
      18:59:50 -0400
    • Engine revision a0d89b1a54
    • Dart version 2.14.0 (build 2.14.0-377.0.dev)

[!] Android toolchain - develop for Android devices (Android
SDK version 31.0.0)
• Android SDK at /Users/adeola/Library/Android/sdk
✗ cmdline-tools component is missing
Run path/to/sdkmanager --install "cmdline-tools;latest"
See https://developer.android.com/studio/command-line
for more details.
✗ Android license status unknown.
Run flutter doctor --android-licenses to accept the
SDK licenses.
See
https://flutter.dev/docs/get-started/install/macos#and
roid-setup for more details.

[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
• CocoaPods version 1.10.2

[✓] Android Studio (version 2020.3)
• Android Studio at /Applications/Android
Studio.app/Contents
• 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.10+0-b96-7281165)

[✓] VS Code (version 1.59.0)
• VS Code at /Applications/Visual Studio
Code.app/Contents
• Flutter extension version 3.25.0

[✓] Connected device (1 available)
• iPhone Adeola’s (mobile) • 00008101-001858581410001E
• ios • iOS 14.7.1 18G82

Reproducible code

Flutter create issue
cd issue
Copy this into main.dart

import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({
    Key? key,
  }) : super(key: key);

  @override
  State createState() => _MyHomePageState();
}

class _MyHomePageState extends State {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [TextFormField()],
        ),
      ),
    );
  }
}

into main.dart
flutter run

Type in a string into the TextFormField double tap or long press on it. Compare and contrast the differences between the Edit menu of the issue app and the Edit menu of the Safari app.

1 thought on “Native Edit menu should be used [ IOS ]

  1. @adeolaex See also #41507, which shows some nuances we’re not getting right with the color. +1 to filing new bugs, we definitely want to match this as perfectly as possible and would be happy to tweak anything specific to make it better.

Comments are closed.