Thanks to visit codestin.com
Credit goes to github.com

Skip to content

SelectionArea does not show a magnifying glass when selecting text #104555

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nilsreichardt opened this issue May 24, 2022 · 5 comments
Closed

SelectionArea does not show a magnifying glass when selecting text #104555

nilsreichardt opened this issue May 24, 2022 · 5 comments
Assignees
Labels
f: selection SelectableRegion, SelectionArea, SelectionContainer, Selectable, and related APIs framework flutter/packages/flutter repository. See also f: labels. P1 High-priority issues at the top of the work list platform-android Android applications specifically platform-ios iOS applications specifically

Comments

@nilsreichardt
Copy link
Contributor

When I select text on my Android, Android shows a magnifying glass when selecting text. Flutter does't do it.

IMG_0020.MOV

I would expect the behavior for the SelectionArea in my Flutter App.

I used Pixel 4a with Android 12.

iOS has a similar feature:

RPReplay_Final1653432012.MP4
My app
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// This example shows how to make a screen selectable..

import 'package:flutter/material.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      // You need to add the "SelectionArea" to make the text selectable.
      home: SelectionArea(
        child: Scaffold(
          body: Padding(
            padding: const EdgeInsets.all(16),
            child: Center(
              child: Column(
                mainAxisSize: MainAxisSize.min,
                children: <Widget>[
                  Text(
                    'Fast',
                    style: Theme.of(context).textTheme.titleLarge,
                  ),
                  const Text(
                    'Flutter code compiles to ARM or Intel machine code as well as JavaScript, for fast performance on any device.',
                  ),
                  ElevatedButton(
                    onPressed: () {},
                    child: const Text('Try it in DartPad'),
                  )
                ],
              ),
            ),
          ),
        ),
      ),
    );
  }
}

cc: @chunhtai

Extracted this issue from #104551 (comment).

@chunhtai chunhtai added platform-android Android applications specifically framework flutter/packages/flutter repository. See also f: labels. f: selection SelectableRegion, SelectionArea, SelectionContainer, Selectable, and related APIs labels May 24, 2022
@nilsreichardt
Copy link
Contributor Author

Shouldn't get this also the platform-ios label?

@chunhtai chunhtai added the platform-ios iOS applications specifically label May 24, 2022
@markusaksli-nc
Copy link
Contributor

Should this be separate from #17617?

@nilsreichardt
Copy link
Contributor Author

When I'm seeing this correct is #17617 only for TextField.

@justinmc
Copy link
Contributor

CC @antholeole who will be working on this feature.

So we have 3 issues for the magnifying glass, which I think is ok:

This one for SelectionArea.
#9507 for text fields on iOS.
#17617 for text fields on Android.

@goderbauer goderbauer added the P1 High-priority issues at the top of the work list label May 25, 2022
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
f: selection SelectableRegion, SelectionArea, SelectionContainer, Selectable, and related APIs framework flutter/packages/flutter repository. See also f: labels. P1 High-priority issues at the top of the work list platform-android Android applications specifically platform-ios iOS applications specifically
Projects
None yet
Development

No branches or pull requests

6 participants