Tencent / Tencent/tdesign-flutter
[IconData] The class 'IconData' can't be extended outside of its library because it's a final class.
Nobody has claimed this yet.
- Dominant language
- Dart
- Stars
- 1.2k
- Forks
- 182
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 88
Description
tdesign-flutter 版本
^0.2.7
重现链接
No response
重现步骤/代码
import 'package:flutter/material.dart';
import 'package:tdesign_flutter/tdesign_flutter.dart';
void main() {
runApp(MainPage());
}
class MainPage extends StatefulWidget {
MainPage({Key? key}) : super(key: key);
@override
_MainPageState createState() => _MainPageState();
}
class _MainPageState extends State {
List controller = [TextEditingController(), TextEditingController()];
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(centerTitle: true, title: Text('输入组件')),
body: Column(
children: [
TDInput(
leftLabel: 'Label Text',
controller: controller[0],
hintText: 'Please enter text',
onChanged: (text) {
setState(() {});
},
onClearTap: () {
controller[0].clear();
setState(() {});
},
),
const SizedBox(height: 16),
],
),
),
);
}
}
期望结果
正常 运行
实际结果
中导入后报 The class 'IconData' can't be extended outside of its library because it's a final class.
Flutter版本
No response
设备与机型信息
No response
系统版本
No response
补充说明
使用 浏览器预览
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the provided TDInput reproduction with tdesign_flutter ^0.2.7 and inspect the package declarations related to IconData. Confirm the package works with the current Flutter SDK without the final-class error, then rerun the example to verify normal startup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100