update dependence
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user