Skip to content

Latest commit

 

History

History
106 lines (74 loc) · 3.95 KB

README.md

File metadata and controls

106 lines (74 loc) · 3.95 KB

TDesign Logo

License Version Downloads

English | 简体中文

Tencent TDesign UI component library of Flutter, suitable for use in mobile projects.

🎉 Features

  • Provides Flutter UI component library in TDesign design style
  • Support customizing themes according to App design style
  • Provides commonly used Icon library and supports customized replacement
  • Define color groups according to the TDesign specification, which can be viewed in TDColors to facilitate the adaptation of components to the TDesign specification.
  • The color value declaration class can add default colors and view the default display effect of color values in real time.

🔨 Usage

  • SDK dependency version
dart: ">=2.19.0 <4.0.0"
flutter: ">=3.7.0"
  • Add the dependency in pubspec.yaml
dependencies:
  tdesign_flutter: ^0.0.6
  • Import at the top of your file:
import 'package:tdesign_flutter/tdesign_flutter.dart';
  • You can configure theme styles such as colors, font sizes, font styles, corner radius, and shadows through a json file. Retrieve theme data using TDTheme.of(context) or TDTheme.defaultData(). It is recommended that components use TDTheme.of(context) unless the component does not need to follow local themes, in which case TDTheme.defaultData() can be used.

Examples of using colors, fonts, and corner radius:

TDTheme.of(context).brandNormalColor
TDTheme.defaultData().fontBodyLarge
  • TDesign's icons do not follow the theme, they are all in ttf format, usage examples:
Icon(TDIcons.activity)

TDesign component libraries

TDesign also provides component libraries for other platforms and frameworks.

Acknowledgements

TDesign Flutter depends on the following component libraries. We appreciate the authors for their open-source contributions:

Contributing

Contributing is welcome. Read guidelines for contributing before submitting your Pull Request.

Feedback

Create your Github issues or scan the QR code below to join our user groups

License

The MIT License. Please see the license file for more information.