feat: 工具类提交。
This commit is contained in:
1 parent
a2b38fa1e8
commit
557f900187
20 files changed
+2026
-3
No files matched your search
@@ -3,6 +3,7 @@ import 'package:novyronst/common/help/help_image.dart';
|
||||
import 'package:novyronst/pages/my/widgets/ny_dash_line.dart';
|
||||
import 'package:novyronst/root/lib_export.dart';
|
||||
import 'package:novyronst/tools/widgets/app_bg_page.dart';
|
||||
import 'package:novyronst/tools/widgets/extend_widget.dart';
|
||||
import 'package:novyronst/tools/widgets/novy_com_widget.dart';
|
||||
|
||||
class MyPage extends StatefulWidget {
|
||||
@@ -16,6 +17,10 @@ class MyPage extends StatefulWidget {
|
||||
|
||||
class _RootPageState extends State<MyPage> {
|
||||
|
||||
List<String> _titles = [
|
||||
'History', 'Settings', 'About', 'Privacy Policy', 'User Agreement'
|
||||
];
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppBgPage(
|
||||
@@ -26,13 +31,65 @@ class _RootPageState extends State<MyPage> {
|
||||
children: [
|
||||
SizedBox(height: AppScreen.statusBarHeight + 48),
|
||||
_buildUserInfo(),
|
||||
NyDashLine()
|
||||
const SizedBox(height: 26),
|
||||
...List.generate(_titles.length, (index) {
|
||||
return _buildSectionView(_titles[index], index, onTap: () {
|
||||
if (index == 0) {
|
||||
|
||||
} else if (index == 1) {
|
||||
|
||||
} else if (index == 2) {
|
||||
|
||||
} else if (index == 3) {
|
||||
|
||||
} else if (index == 4) {
|
||||
|
||||
}
|
||||
});
|
||||
})
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildSectionView(String title, int index, {Function()? onTap}) {
|
||||
String imgName = ConstImage.history;
|
||||
if (index == 1) {
|
||||
imgName = ConstImage.settings;
|
||||
} else if (index == 2) {
|
||||
imgName = ConstImage.about;
|
||||
} else if (index == 3) {
|
||||
imgName = ConstImage.primary;
|
||||
} else if (index == 4) {
|
||||
imgName = ConstImage.webSite;
|
||||
}
|
||||
return Container(
|
||||
height: 60,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
child: Column(
|
||||
children: [
|
||||
Expanded(child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
HelpImage.asset(imgName, width: 36, height: 36),
|
||||
const SizedBox(width: 10),
|
||||
NovyText(title,
|
||||
fontSize: 14,
|
||||
)
|
||||
],
|
||||
),
|
||||
Icon(Icons.arrow_forward_ios, size: 17, color: Colors.white)
|
||||
],
|
||||
)),
|
||||
if (index < 4) NyDashLine()
|
||||
],
|
||||
),
|
||||
).addInkWell(onTap: onTap);
|
||||
}
|
||||
|
||||
Widget _buildUserInfo() {
|
||||
return Row(
|
||||
children: [
|
||||
|
||||
Reference in new issue
Block a user