Compare commits

...

2 Commits

Author SHA1 Message Date
Simon Ding
bc50dd888a ui: change icon 2024-10-27 21:26:53 +08:00
Simon Ding
0305c0709d ui: add donate button 2024-10-27 21:19:02 +08:00
3 changed files with 34 additions and 6 deletions

BIN
ui/assets/wechat.jpg Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

View File

@@ -56,7 +56,8 @@ class _MyAppState extends ConsumerState<MyApp> {
return SelectionArea(
child: MainSkeleton(
body: Padding(
padding: EdgeInsets.only(left: padding, right: padding, top: 5, bottom: 5),
padding: EdgeInsets.only(
left: padding, right: padding, top: 5, bottom: 5),
child: child),
),
);
@@ -222,9 +223,9 @@ class _MainSkeletonState extends State<MainSkeleton> {
(BuildContext context, SearchController controller) {
return [Text("dadada")];
}),
IconButton(
onPressed: () => showCalendar(context),
icon: Icon(Icons.calendar_month)),
// IconButton(
// onPressed: () => showCalendar(context),
// icon: Icon(Icons.calendar_month)),
MenuAnchor(
menuChildren: [
MenuItemButton(
@@ -247,7 +248,13 @@ class _MainSkeletonState extends State<MainSkeleton> {
child: const Icon(Icons.account_circle),
);
},
)
),
IconButton(
onPressed: () => showDonate(context),
icon: Icon(
Icons.favorite_rounded,
color: Colors.red,
)),
],
),
useDrawer: false,
@@ -302,4 +309,24 @@ class _MainSkeletonState extends State<MainSkeleton> {
// overridden.
);
}
showDonate(BuildContext context) {
return showDialog<void>(
context: context,
barrierDismissible: true,
builder: (BuildContext context) {
return AlertDialog(
title: Text("项目开发不易,给开发者加个鸡腿:"),
content: SizedBox(
width: 350,
height: 400,
child:
Ink.image(
fit: BoxFit.fitWidth, image: AssetImage("assets/wechat.jpg"))
),
);
},
);
}
}

View File

@@ -71,7 +71,8 @@ flutter:
uses-material-design: true
# To add assets to your application, add an assets section, like this:
# assets:
assets:
- assets/
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg