Repository: flutter
Issue: Creating custom design system similar to material by reusing the flutter/material as part of a package
Labels: framework,f: material design,team-design,triaged-design

Hi,

We are trying get very specific customization possibility than what material design provides by default. One approach of course is to create a design similar to flutter material. But creating entire design system from scratch is cumbersome. So we are trying to reuse flutter material and then customize it with minimal changes.

## Steps to Reproduce

<!-- Please include full steps to reproduce so that we can reproduce the problem. -->

1. Copied material folder from flutter. https://github.com/flutter/flutter/tree/master/packages/flutter/lib/src/ to a test package.
2. Copied material.dart to src of test package and commented "export 'widgets.dart';"

![image](https://user-images.githubusercontent.com/17777813/138650909-8efc6ca8-4b33-4275-805c-a49adc985771.png)

3. Created a new widget TestInputField and imported both local material.dart and flutter/widgets.
```
import 'package:flutter/widgets.dart';
import '../../material.dart';
```
4. Added a demo app and included a new widget TestInputField in it.
5. Execute `flutter run` on demo (https://github.com/msbasanth/test_widgets)
6. Getting error "`No material widget found textfield widgets require a material widget ancestor`". We tried wrapping with Scaffold/Material no help. At the same time if we switch to `package:flutter/material` instead of locally copied one it works fine.

![image](https://user-images.githubusercontent.com/17777813/138651418-b408ebd8-f772-4726-bf49-292b53167cca.png)

3. ... <!-- for example "Tap on X and see a crash" -->

**Expected results:** <!-- what did you want to see? -->
It is good if we could customize flutter/material by keeping a copy of material locally.

**Actual results:** <!-- what did you see? -->
Using Material layer locally creates issues, and it always expects base widgets from `package:flutter/material`.

**Code sample**
https://github.com/msbasanth/test_widgets

<!-- Finally, paste the output of running `flutter doctor -v` here. -->

**flutter doctor -v**
```
[√] Flutter (Channel stable, 2.5.3, on Microsoft Windows [Version 10.0.18363.1801], locale en-US)
    • Flutter version 2.5.3 at C:\Users\IC013086\Documents\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 18116933e7 (10 days 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 C:\Users\IC013086\AppData\Local\Android\sdk
    X cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    X Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 2020.3)
    • Android Studio at C:\Program Files\Android\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, 64-bit edition (version 1.52.1)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 3.20.0

[√] Connected device (3 available)
    • sdk gphone x86 (mobile) • emulator-5554 • android-x86    • Android 11 (API 30) (emulator)
    • Chrome (web)            • chrome        • web-javascript • Google Chrome 95.0.4638.54
    • Edge (web)              • edge          • web-javascript • Microsoft Edge 95.0.1020.30
```

How best we ca reuse the flutter/material for creating a new design system with out a custom design from scratch.