update dependence

This commit is contained in:
quantulr
2023-02-10 00:07:41 +08:00
parent 2aa59649a8
commit bd259d8303
9 changed files with 58 additions and 58 deletions

View File

@ -19,12 +19,16 @@ class _HomePageState extends ConsumerState<HomePage> {
int selectedIndex = 0;
final tabList = [
{"path": "/", "title": "相册"},
{"path": "/profile", "title": "用户"}
{"path": "/profile", "title": "用户资料"},
{"path": "/detail", "title": "图片详情"}
];
int key = 0;
@override
Widget build(BuildContext context) {
print(
widget.content.toString(),
);
print("123");
return Scaffold(
appBar: AppBar(
leading: ["/", "/profile"].contains(GoRouterState.of(context).location)
@ -36,7 +40,10 @@ class _HomePageState extends ConsumerState<HomePage> {
},
),
title: Text(
tabList[selectedIndex]["title"] ?? "",
tabList.firstWhere((element) =>
element["path"] ==
GoRouterState.of(context).fullpath)["title"] ??
"",
style: const TextStyle(fontWeight: FontWeight.bold),
),
elevation: 10,
@ -60,6 +67,8 @@ class _HomePageState extends ConsumerState<HomePage> {
mimeType.split("/").last))
});
await dio.post("/image/upload", data: data).then((value) {
// widget.content.key = GlobalKey();
// widget.content
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: Row(
crossAxisAlignment: CrossAxisAlignment.center,