Repository: flutter/flutter
File: dev/integration_tests/widget_preview_scaffold/lib/src/controls.dart (Dart)

Code before:
// 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.

import 'package:flutter/material.dart';

import 'theme/theme.dart';
import 'widget_preview_scaffold_controller.dart';

/// Provides controls to change the zoom level of a [WidgetPreview].
class ZoomControls extends StatelessWidget {
  /// Provides controls to change the zoom level of a [WidgetPreview].
  const ZoomControls({
    super.key,
    required TransformationController transformationController,
  }) : _transformationController = transformationController;

  final TransformationController _transformationController;

  @override
  Widget build(BuildContext context) {
    const iconColor = Colors.black;
    return _ControlDecorator(
      child: Row(
        mainAxisSize: MainAxisSize.min,
        children: [
          IconButton(
            tooltip: 'Zoom in',
            onPressed: _zoomIn,
            icon: Icon(Icons.zoom_in_sharp),
            color: iconColor,
          ),
          IconButton(
            tooltip: 'Zoom out',
            onPressed: _zoomOut,
            icon: Icon(Icons.zoom_out),
            color: iconColor,
          ),
          IconButton(
            tooltip: 'Reset zoom',
            onPressed: _reset,
            icon: Icon(Icons.zoom_out_map),

Review comment (suggestion):
Style nit, but I'd put the comment outside of the parameter list so it's clearer that it applies to the initializer:

```dart
const ZoomControls({
    super.key,
    required TransformationController transformationController,
  }) : // ignore: prefer_initializing_formals
       _transformationController = transformationController;
```

Likewise elsewhere, but it's up to you.

Code after:
// 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.

import 'package:flutter/material.dart';

import 'theme/theme.dart';
import 'widget_preview_scaffold_controller.dart';

/// Provides controls to change the zoom level of a [WidgetPreview].
class ZoomControls extends StatelessWidget {
  /// Provides controls to change the zoom level of a [WidgetPreview].
  const ZoomControls({
    super.key,
    required TransformationController transformationController,
    // ignore: prefer_initializing_formals
  }) : _transformationController = transformationController;

  final TransformationController _transformationController;

  @override
  Widget build(BuildContext context) {
    const iconColor = Colors.black;
    return _ControlDecorator(
      child: Row(
        mainAxisSize: MainAxisSize.min,
        children: [
          IconButton(
            tooltip: 'Zoom in',
            onPressed: _zoomIn,
            icon: Icon(Icons.zoom_in_sharp),
            color: iconColor,
          ),
          IconButton(
            tooltip: 'Zoom out',
            onPressed: _zoomOut,
            icon: Icon(Icons.zoom_out),
            color: iconColor,
          ),
          IconButton(
            tooltip: 'Reset zoom',
            onPressed: _reset,