Migrate TextField to Material 3 (#108366)

* Update input style

* generate M3 text style

* Add test
This commit is contained in:
hangyu
2022-07-28 20:31:05 +08:00
committed by GitHub
parent 19adef6964
commit dd4154bf4d
4 changed files with 85 additions and 1 deletions

View File

@@ -0,0 +1,16 @@
// 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 'template.dart';
class TextFieldTemplate extends TokenTemplate {
const TextFieldTemplate(super.blockName, super.fileName, super.tokens);
@override
String generate() => '''
// Generated version ${tokens["version"]}
TextStyle _m3InputStyle(BuildContext context) => ${textStyle("md.comp.filled-text-field.label-text")}!;
''';
}