Repository: flutter
Issue: Enums do not get obfuscated
Labels: platform-android,tool,dependency: dart,a: build,has reproducible steps,P2,found in release: 2.5,found in release: 2.6,team-android,triaged-android

I would have expected enums to be obfuscated, but it seems they are not -- they appear when inspecting the compiled app's libapp.so, and at runtime via the enum's `toString()` method. Either this is a bug, or perhaps the documentation around obfuscation could be improved to mention this.

## Steps to Reproduce on Android

1. Build the code below using `flutter build apk --obfuscate --split-debug-info=debug_info`
2. Run the app: `flutter run --use-application-binary=build/app/outputs/flutter-apk/app-release.apk`
3. View results of the enum's `toString()` method (or inspect the binary)

**Expected results:** Both the enum name and the class name to be obfuscated.

**Actual results:** Only the class name is obfuscated.

![screenshot](https://user-images.githubusercontent.com/66305960/144908721-24dc7698-7701-45c1-b126-1127addbfac2.jpg)

<details>
<summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';

enum MyEnum { one, two }

class MyClass {}

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  final myEnum = MyEnum.two;
  final myClass = MyClass();
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              Text(
                "myEnum.toString(): ${myEnum.toString()}",
                style: Theme.of(context).textTheme.headline4,
              ),
              const SizedBox(height: 16.0),
              Text(
                "myClass.toString(): ${myClass.toString()}",
                style: Theme.of(context).textTheme.headline4,
              ),
            ],
          ),
        ),
      ),
    );
  }
}
```

</details>

<details>
<summary>flutter doctor -v</summary>

```
[✓] Flutter (Channel stable, 2.5.3, on Ubuntu 21.10 5.13.0-22-generic, locale en_US.UTF-8)
    • Flutter version 2.5.3 at /home/me/dogl/code/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 18116933e7 (7 weeks ago), 2021-10-15 10:46:35 -0700
    • Engine revision d3ea636dc5
    • Dart version 2.14.4

[!] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /home/me/Android/Sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /snap/android-studio/115/android-studio/jre/bi
n/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • Ubuntu clang version 13.0.0-2
    • cmake version 3.18.4
    • ninja version 1.10.1
    • pkg-config version 0.29.2

[✓] Android Studio (version 2020.3)
    • Android Studio at /snap/android-studio/115/android-studio
    • 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-7249189)

[✓] VS Code
    • VS Code at /snap/code/current
    • Flutter extension version 3.29.0

[✓] Connected device (3 available)
    • SM G955F (mobile) • -- • android-arm64  • Android 9 (API 28)
    • Linux (desktop)   • linux              • linux-x64      • Ubuntu 21.10 --
    • Chrome (web)      • chrome             • web-javascript • Google Chrome --

! Doctor found issues in 1 category.
```

</details>