mirror of
https://github.com/simon-ding/polaris.git
synced 2026-06-25 18:25:05 +08:00
ui: add donate button
This commit is contained in:
BIN
ui/assets/wechat.jpg
Normal file
BIN
ui/assets/wechat.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 74 KiB |
@@ -56,7 +56,8 @@ class _MyAppState extends ConsumerState<MyApp> {
|
|||||||
return SelectionArea(
|
return SelectionArea(
|
||||||
child: MainSkeleton(
|
child: MainSkeleton(
|
||||||
body: Padding(
|
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),
|
child: child),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -222,9 +223,9 @@ class _MainSkeletonState extends State<MainSkeleton> {
|
|||||||
(BuildContext context, SearchController controller) {
|
(BuildContext context, SearchController controller) {
|
||||||
return [Text("dadada")];
|
return [Text("dadada")];
|
||||||
}),
|
}),
|
||||||
IconButton(
|
// IconButton(
|
||||||
onPressed: () => showCalendar(context),
|
// onPressed: () => showCalendar(context),
|
||||||
icon: Icon(Icons.calendar_month)),
|
// icon: Icon(Icons.calendar_month)),
|
||||||
MenuAnchor(
|
MenuAnchor(
|
||||||
menuChildren: [
|
menuChildren: [
|
||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
@@ -247,7 +248,13 @@ class _MainSkeletonState extends State<MainSkeleton> {
|
|||||||
child: const Icon(Icons.account_circle),
|
child: const Icon(Icons.account_circle),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
|
IconButton(
|
||||||
|
onPressed: () => showDonate(context),
|
||||||
|
icon: Icon(
|
||||||
|
Icons.heart_broken_rounded,
|
||||||
|
color: Colors.red,
|
||||||
|
)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
useDrawer: false,
|
useDrawer: false,
|
||||||
@@ -302,4 +309,24 @@ class _MainSkeletonState extends State<MainSkeleton> {
|
|||||||
// overridden.
|
// 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"))
|
||||||
|
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,7 +71,8 @@ flutter:
|
|||||||
uses-material-design: true
|
uses-material-design: true
|
||||||
|
|
||||||
# To add assets to your application, add an assets section, like this:
|
# To add assets to your application, add an assets section, like this:
|
||||||
# assets:
|
assets:
|
||||||
|
- assets/
|
||||||
# - images/a_dot_burr.jpeg
|
# - images/a_dot_burr.jpeg
|
||||||
# - images/a_dot_ham.jpeg
|
# - images/a_dot_ham.jpeg
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user