Skip to content

Commit a11d779

Browse files
committed
update comments
1 parent 584331f commit a11d779

File tree

5 files changed

+40
-20
lines changed

5 files changed

+40
-20
lines changed

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
3+
4+
run:
5+
fvm flutter run

lib/config/router_manger.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ class RouterManger {
7878
return CupertinoPageRoute(builder: (_) => ArticleCategoryTabPage(tree, index));
7979
case RouteName.favouriteList:
8080
return CupertinoPageRoute(builder: (_) => FavouriteListPage());
81+
82+
///
83+
/// setting page:
84+
///
8185
case RouteName.setting:
8286
return CupertinoPageRoute(builder: (_) => SettingPage());
8387
case RouteName.coinRecordList:

lib/main.dart

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,16 @@ main() async {
3535
class App extends StatelessWidget {
3636
@override
3737
Widget build(BuildContext context) {
38+
///
39+
///
40+
///
41+
///
3842
return OKToast(
43+
44+
///
45+
///
46+
/// todo: 使用 [MultiProvider]
47+
///
3948
child: MultiProvider(
4049
//
4150
// todo: 注意
@@ -49,11 +58,12 @@ class App extends StatelessWidget {
4958
return RefreshConfiguration(
5059
hideFooterWhenNotFull: true, //列表数据不满一页,不触发加载更多
5160

52-
//
53-
//
54-
//
61+
///
62+
/// todo: app
63+
///
5564
child: MaterialApp(
5665
debugShowCheckedModeBanner: false,
66+
/// todo: 主题配置
5767
theme: themeModel.themeData(),
5868
darkTheme: themeModel.themeData(platformDarkMode: true),
5969
locale: localeModel.locale,

lib/ui/page/setting_page.dart

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,16 @@ import 'package:provider/provider.dart';
1010
import 'package:fun_android/view_model/theme_model.dart';
1111
import 'package:url_launcher/url_launcher.dart';
1212

13+
///
14+
///
15+
///
1316
class SettingPage extends StatelessWidget {
1417
@override
1518
Widget build(BuildContext context) {
1619
var iconColor = Theme.of(context).accentColor;
1720
return Scaffold(
21+
///
22+
///
1823
appBar: AppBar(
1924
title: Text(S.of(context).setting),
2025
),
@@ -28,6 +33,11 @@ class SettingPage extends StatelessWidget {
2833
),
2934
Material(
3035
color: Theme.of(context).cardColor,
36+
37+
///
38+
///
39+
///
40+
///
3141
child: ProviderWidget<UseWebViewPluginModel>(
3242
model: UseWebViewPluginModel(),
3343
builder: (context, model, child) => ListTile(
@@ -57,9 +67,7 @@ class SettingPage extends StatelessWidget {
5767
children: <Widget>[
5868
Text(S.of(context).settingFont),
5969
Text(
60-
ThemeModel.fontName(
61-
Provider.of<ThemeModel>(context,listen: false).fontIndex,
62-
context),
70+
ThemeModel.fontName(Provider.of<ThemeModel>(context, listen: false).fontIndex, context),
6371
style: Theme.of(context).textTheme.caption,
6472
)
6573
],
@@ -73,7 +81,7 @@ class SettingPage extends StatelessWidget {
7381
shrinkWrap: true,
7482
itemCount: ThemeModel.fontValueList.length,
7583
itemBuilder: (context, index) {
76-
var model = Provider.of<ThemeModel>(context,listen: false);
84+
var model = Provider.of<ThemeModel>(context, listen: false);
7785
return RadioListTile(
7886
value: index,
7987
onChanged: (index) {
@@ -100,9 +108,7 @@ class SettingPage extends StatelessWidget {
100108
style: TextStyle(),
101109
),
102110
Text(
103-
LocaleModel.localeName(
104-
Provider.of<LocaleModel>(context).localeIndex,
105-
context),
111+
LocaleModel.localeName(Provider.of<LocaleModel>(context).localeIndex, context),
106112
style: Theme.of(context).textTheme.caption,
107113
)
108114
],
@@ -137,9 +143,7 @@ class SettingPage extends StatelessWidget {
137143
child: ListTile(
138144
title: Text(S.of(context).rate),
139145
onTap: () async {
140-
LaunchReview.launch(
141-
androidAppId: "cn.phoenixsky.funandroid",
142-
iOSAppId: "1477299503");
146+
LaunchReview.launch(androidAppId: "cn.phoenixsky.funandroid", iOSAppId: "1477299503");
143147
},
144148
leading: Icon(
145149
Icons.star,
@@ -156,16 +160,13 @@ class SettingPage extends StatelessWidget {
156160
child: ListTile(
157161
title: Text(S.of(context).feedback),
158162
onTap: () async {
159-
var url =
160-
'mailto:moran.fc@gmail.com?subject=FunAndroid%20Feedback&body=feedback';
163+
var url = 'mailto:moran.fc@gmail.com?subject=FunAndroid%20Feedback&body=feedback';
161164
if (await canLaunch(url)) {
162165
await launch(url);
163166
} else {
164167
showToast(S.of(context).githubIssue);
165168
await Future.delayed(Duration(seconds: 1));
166-
launch(
167-
'https://github.com/phoenixsky/fun_android_flutter',
168-
forceSafariVC: false);
169+
launch('https://github.com/phoenixsky/fun_android_flutter', forceSafariVC: false);
169170
}
170171
},
171172
leading: Icon(

lib/ui/page/tab/tab_navigator.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import 'structure_page.dart';
99
import 'user_page.dart';
1010
import 'wechat_account_page.dart';
1111

12-
// todo: tab 页面列表
12+
/// todo: tab 页面列表
1313
List<Widget> pages = <Widget>[
14-
// 首页
14+
/// 首页
1515
HomePage(),
1616
// 项目页
1717
ProjectPage(),

0 commit comments

Comments
 (0)