mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-25 12:55:53 +08:00
tweaks (#1788)
* tweak * opt: show bar * opt: crc32 * opt: appsign * opt: Get * opt: compress only if large * opt: wbi * tweak Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me> --------- Signed-off-by: My-Responsitories <107370289+My-Responsitories@users.noreply.github.com> Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
committed by
GitHub
parent
31e5692dff
commit
521ca3ad18
@@ -36,7 +36,7 @@ class MainApp extends StatefulWidget {
|
||||
|
||||
class _MainAppState extends State<MainApp>
|
||||
with RouteAware, WidgetsBindingObserver, WindowListener, TrayListener {
|
||||
final MainController _mainController = Get.put(MainController());
|
||||
final _mainController = Get.put(MainController());
|
||||
late final _setting = GStorage.setting;
|
||||
|
||||
@override
|
||||
@@ -294,7 +294,7 @@ class _MainAppState extends State<MainApp>
|
||||
.toList(),
|
||||
),
|
||||
)
|
||||
: const SizedBox.shrink()
|
||||
: null
|
||||
: null;
|
||||
return PopScope(
|
||||
canPop: false,
|
||||
@@ -305,7 +305,7 @@ class _MainAppState extends State<MainApp>
|
||||
if (_mainController.selectedIndex.value != 0) {
|
||||
_mainController
|
||||
..setIndex(0)
|
||||
..bottomBarStream?.add(true)
|
||||
..bottomBar?.value = true
|
||||
..setSearchBar();
|
||||
} else {
|
||||
onBack();
|
||||
@@ -439,28 +439,28 @@ class _MainAppState extends State<MainApp>
|
||||
],
|
||||
),
|
||||
),
|
||||
bottomNavigationBar: useBottomNav
|
||||
? _mainController.hideTabBar
|
||||
? StreamBuilder(
|
||||
stream: _mainController.bottomBarStream?.stream
|
||||
.distinct(),
|
||||
initialData: true,
|
||||
builder: (context, AsyncSnapshot snapshot) {
|
||||
return AnimatedSlide(
|
||||
curve: Curves.easeInOutCubicEmphasized,
|
||||
duration: const Duration(milliseconds: 500),
|
||||
offset: Offset(0, snapshot.data ? 0 : 1),
|
||||
child: bottomNav,
|
||||
);
|
||||
},
|
||||
)
|
||||
: bottomNav
|
||||
: null,
|
||||
bottomNavigationBar: _buildBottom(bottomNav),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget? _buildBottom(Widget? bottomNav) {
|
||||
if (bottomNav != null) {
|
||||
if (_mainController.bottomBar case final bottomBar?) {
|
||||
return Obx(
|
||||
() => AnimatedSlide(
|
||||
curve: Curves.easeInOutCubicEmphasized,
|
||||
duration: const Duration(milliseconds: 500),
|
||||
offset: Offset(0, bottomBar.value ? 0 : 1),
|
||||
child: bottomNav,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
return bottomNav;
|
||||
}
|
||||
|
||||
Widget _buildIcon({
|
||||
required NavigationBarType type,
|
||||
bool selected = false,
|
||||
|
||||
Reference in New Issue
Block a user