mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-08-14 23:20:25 +02:00
feat(ui): frosted translucent bottom navbar
This commit is contained in:
+24
-14
@@ -1,5 +1,6 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
import 'dart:ui' show ImageFilter;
|
||||||
import 'package:device_info_plus/device_info_plus.dart';
|
import 'package:device_info_plus/device_info_plus.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
@@ -549,6 +550,7 @@ class _MainShellState extends ConsumerState<MainShell>
|
|||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
|
extendBody: true,
|
||||||
body: AnimatedBuilder(
|
body: AnimatedBuilder(
|
||||||
animation: _tabJumpTransitionController,
|
animation: _tabJumpTransitionController,
|
||||||
child: PageView.builder(
|
child: PageView.builder(
|
||||||
@@ -571,24 +573,32 @@ class _MainShellState extends ConsumerState<MainShell>
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
bottomNavigationBar: DecoratedBox(
|
bottomNavigationBar: ClipRect(
|
||||||
position: DecorationPosition.foreground,
|
child: BackdropFilter(
|
||||||
decoration: BoxDecoration(
|
filter: ImageFilter.blur(sigmaX: 18, sigmaY: 18),
|
||||||
border: Border(
|
child: DecoratedBox(
|
||||||
top: BorderSide(
|
position: DecorationPosition.foreground,
|
||||||
color: Theme.of(
|
decoration: BoxDecoration(
|
||||||
|
border: Border(
|
||||||
|
top: BorderSide(
|
||||||
|
color: Theme.of(
|
||||||
|
context,
|
||||||
|
).colorScheme.outlineVariant.withValues(alpha: 0.5),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: NavigationBar(
|
||||||
|
selectedIndex: _currentIndex.clamp(0, maxIndex),
|
||||||
|
onDestinationSelected: _onNavTap,
|
||||||
|
animationDuration: const Duration(milliseconds: 500),
|
||||||
|
elevation: 0,
|
||||||
|
backgroundColor: settingsGroupColor(
|
||||||
context,
|
context,
|
||||||
).colorScheme.outlineVariant.withValues(alpha: 0.5),
|
).withValues(alpha: 0.72),
|
||||||
|
destinations: destinations,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: NavigationBar(
|
|
||||||
selectedIndex: _currentIndex.clamp(0, maxIndex),
|
|
||||||
onDestinationSelected: _onNavTap,
|
|
||||||
animationDuration: const Duration(milliseconds: 500),
|
|
||||||
backgroundColor: settingsGroupColor(context),
|
|
||||||
destinations: destinations,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user