mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 11:08:03 +08:00
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user