Skip to content

SelectionArea does not vibrate on Android #104551

@nilsreichardt

Description

@nilsreichardt

When I select text on my Android, for every single character my phone vibrates. I tried to show it my video. If you make the sounds really loud, you can hear the vibrations a bit.

IMG_0020.MOV

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

I used Pixel 4a with Android 12.

I also tried it on my iPhone 13 but there are no vibration when selecting text in a native iOS (but I'm also not 100% sure if I maybe disabled it - if it's possible)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listf: selectionSelectableRegion, SelectionArea, SelectionContainer, Selectable, and related APIsfound in release: 3.1Found to occur in 3.1frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer version

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions