Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-07-23 16:47:11 +08:00
parent 148e0872b4
commit 418a1e8d39
821 changed files with 29467 additions and 25520 deletions

View File

@@ -26,32 +26,31 @@ class _DynamicsPageState extends State<DynamicsPage>
bool get wantKeepAlive => true;
Widget _createDynamicBtn(ThemeData theme, [bool isRight = true]) => Center(
child: Container(
width: 34,
height: 34,
margin:
EdgeInsets.only(left: !isRight ? 16 : 0, right: isRight ? 16 : 0),
child: IconButton(
tooltip: '发布动态',
style: ButtonStyle(
padding: WidgetStateProperty.all(EdgeInsets.zero),
backgroundColor: WidgetStateProperty.resolveWith((states) {
return theme.colorScheme.secondaryContainer;
}),
),
onPressed: () {
if (_dynamicsController.accountService.isLogin.value) {
CreateDynPanel.onCreateDyn(context);
}
},
icon: Icon(
Icons.add,
size: 18,
color: theme.colorScheme.onSecondaryContainer,
),
),
child: Container(
width: 34,
height: 34,
margin: EdgeInsets.only(left: !isRight ? 16 : 0, right: isRight ? 16 : 0),
child: IconButton(
tooltip: '发布动态',
style: ButtonStyle(
padding: WidgetStateProperty.all(EdgeInsets.zero),
backgroundColor: WidgetStateProperty.resolveWith((states) {
return theme.colorScheme.secondaryContainer;
}),
),
);
onPressed: () {
if (_dynamicsController.accountService.isLogin.value) {
CreateDynPanel.onCreateDyn(context);
}
},
icon: Icon(
Icons.add,
size: 18,
color: theme.colorScheme.onSecondaryContainer,
),
),
),
);
@override
void initState() {
@@ -132,9 +131,10 @@ class _DynamicsPageState extends State<DynamicsPage>
unselectedLabelColor: theme.colorScheme.onSurface,
labelStyle:
TabBarTheme.of(context).labelStyle?.copyWith(fontSize: 13) ??
const TextStyle(fontSize: 13),
tabs:
DynamicsTabType.values.map((e) => Tab(text: e.label)).toList(),
const TextStyle(fontSize: 13),
tabs: DynamicsTabType.values
.map((e) => Tab(text: e.label))
.toList(),
onTap: (index) {
if (!_dynamicsController.tabController.indexIsChanging) {
_dynamicsController.animateToTop();