update ui

This commit is contained in:
wgh19
2024-05-14 17:30:49 +08:00
parent 36fedc6a97
commit 9ba859d668
6 changed files with 128 additions and 71 deletions

View File

@@ -1,6 +1,6 @@
import 'package:fluent_ui/fluent_ui.dart';
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
import 'package:pixes/foundation/app.dart';
import 'package:pixes/components/title_bar.dart';
import 'package:pixes/utils/translation.dart';
import '../components/illust_widget.dart';
@@ -31,28 +31,24 @@ class _FollowingArtworksPageState extends State<FollowingArtworksPage> {
}
Widget buildTab() {
return Row(
children: [
Text("Following".tl,
style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold),),
const Spacer(),
SegmentedButton(
options: [
SegmentedButtonOption("all", "All".tl),
SegmentedButtonOption("public", "Public".tl),
SegmentedButtonOption("private", "Private".tl),
],
onPressed: (key) {
if(key != restrict) {
setState(() {
restrict = key;
});
}
},
value: restrict,
)
],
).paddingHorizontal(16).paddingBottom(4);
return TitleBar(
title: "Following".tl,
action: SegmentedButton(
options: [
SegmentedButtonOption("all", "All".tl),
SegmentedButtonOption("public", "Public".tl),
SegmentedButtonOption("private", "Private".tl),
],
onPressed: (key) {
if(key != restrict) {
setState(() {
restrict = key;
});
}
},
value: restrict,
),
);
}
}