MCSI-9 About and instruction tab #27

Merged
squid merged 6 commits from MCSI-9_about_and_instruction_tab into main 2025-07-12 05:45:35 +08:00
3 changed files with 34 additions and 9 deletions
Showing only changes of commit da442594ee - Show all commits

View File

@ -134,6 +134,7 @@ class BasicConfigurationTab extends StatelessWidget {
),
),
),
const Gap(16),
Row(
children: [
Expanded(

View File

@ -83,15 +83,39 @@ class MinecraftServerInstaller extends StatelessWidget {
Widget get _body => BlocConsumer<NavigationBloc, NavigationItem>(
listener: (_, __) {},
builder: (_, state) => Padding(
padding: const EdgeInsets.all(32),
child: AnimatedSwitcher(
builder: (context, state) => AnimatedSwitcher(
duration: const Duration(milliseconds: 200),
child: SizedBox(
child: Column(
key: ValueKey('tab${state.toString()}'),
children: [
Container(
padding: const EdgeInsets.symmetric(vertical: 12),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(color: Colors.grey.shade300, width: 1),
),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
state.title,
style: Theme.of(context)
.textTheme
.titleSmall
?.copyWith(fontWeight: FontWeight.w700, color: Colors.blueGrey.shade900),
),
],
),
),
Expanded(
child: Padding(
padding: const EdgeInsets.all(32),
child: _tabContent(state),
),
),
],
),
),
);

View File

@ -168,7 +168,7 @@ class _SideNavigationBarState extends State<SideNavigationBar> {
}
}
extension _NavigationItemContent on NavigationItem {
extension NavigationItemContent on NavigationItem {
String get title {
switch (this) {
case NavigationItem.basicConfiguration: