TDesign 适配桌面端的组件库,适合在 Flutter 3.x 技术栈项目中使用。
- 适配桌面端交互
- 基于 Flutter 3.x
- 支持暗黑模式及其他主题定制
dependencies:
flutter_tdesign_desktop_ui: ^0.1.0
void main() {
// 初始化之前如果访问二进制文件,需要先初始化
WidgetsFlutterBinding.ensureInitialized();
runApp(const ProviderScope(
child: MyApp(),
));
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return TTheme(
child: MaterialApp(
title: 'TDesign Desktop UI Demo',
locale: Locale('zh_CN'),
supportedLocales: GlobalTDesignLocalizations.delegate.supportedLocales,
localizationsDelegates: const [
GlobalTDesignLocalizations.delegate,
...GlobalMaterialLocalizations.delegates,
],
home: const MyHomePage(title: 'TDesign Desktop UI Demo Home Page'),
),
);
}
}
TDesign 遵循 MIT 协议 。