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( Row(
children: [ children: [
Expanded( Expanded(

View File

@ -83,14 +83,38 @@ class MinecraftServerInstaller extends StatelessWidget {
Widget get _body => BlocConsumer<NavigationBloc, NavigationItem>( Widget get _body => BlocConsumer<NavigationBloc, NavigationItem>(
listener: (_, __) {}, listener: (_, __) {},
builder: (_, state) => Padding( builder: (context, state) => AnimatedSwitcher(
padding: const EdgeInsets.all(32), duration: const Duration(milliseconds: 200),
child: AnimatedSwitcher( child: Column(
duration: const Duration(milliseconds: 200), key: ValueKey('tab${state.toString()}'),
child: SizedBox( children: [
key: ValueKey('tab${state.toString()}'), Container(
child: _tabContent(state), 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 { String get title {
switch (this) { switch (this) {
case NavigationItem.basicConfiguration: case NavigationItem.basicConfiguration: