MCSI-9 feat: enhance UI layout in BasicConfigurationTab and MinecraftServerInstaller, update extension naming in SideNavigationBar
This commit is contained in:
parent
ee14df5ae0
commit
da442594ee
@ -134,6 +134,7 @@ class BasicConfigurationTab extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
const Gap(16),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
|
@ -83,14 +83,38 @@ class MinecraftServerInstaller extends StatelessWidget {
|
||||
|
||||
Widget get _body => BlocConsumer<NavigationBloc, NavigationItem>(
|
||||
listener: (_, __) {},
|
||||
builder: (_, state) => Padding(
|
||||
padding: const EdgeInsets.all(32),
|
||||
child: AnimatedSwitcher(
|
||||
duration: const Duration(milliseconds: 200),
|
||||
child: SizedBox(
|
||||
key: ValueKey('tab${state.toString()}'),
|
||||
child: _tabContent(state),
|
||||
),
|
||||
builder: (context, state) => AnimatedSwitcher(
|
||||
duration: const Duration(milliseconds: 200),
|
||||
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),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user