<commit_before>import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_widgets/src/visibility_detector/visibility_detector.dart';

void main() {
  final visibilityDetectorKey = UniqueKey();

  // Disable VisibilityDetector timers.
  VisibilityDetectorController.instance.updateInterval = Duration.zero;

  testWidgets(
    'VisibilityDetector does not affect the positioning of text selection '
    'handles',
    (WidgetTester tester) async {
      final expectedSelectionHandles = await _setUpSelectionHandles(
        tester,
        null,
      );

      final actualSelectionHandles = await _setUpSelectionHandles(
        tester,
        (textField) => VisibilityDetector(
              key: visibilityDetectorKey,
              onVisibilityChanged: (visibilityInfo) {},
              child: textField,
            ),
      );<commit_msg>Update Dart formatting in flutter_widgets to dartfmt 1.2.8 rules<commit_after>import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_widgets/src/visibility_detector/visibility_detector.dart';

void main() {
  final visibilityDetectorKey = UniqueKey();

  // Disable VisibilityDetector timers.
  VisibilityDetectorController.instance.updateInterval = Duration.zero;

  testWidgets(
    'VisibilityDetector does not affect the positioning of text selection '
    'handles',
    (WidgetTester tester) async {
      final expectedSelectionHandles = await _setUpSelectionHandles(
        tester,
        null,
      );

      final actualSelectionHandles = await _setUpSelectionHandles(
        tester,
        (textField) => VisibilityDetector(
          key: visibilityDetectorKey,
          onVisibilityChanged: (visibilityInfo) {},
          child: textField,
        ),
      );
{'fraction_non_alphanumeric': 0.0879560219890055, 'fraction_numerical': 0.0014992503748125937, 'mean_word_length': 3.6666666666666665, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2758959', 'n_tokens_mistral': 582, 'n_tokens_neox': 552, 'n_words': 114}