enhance layout and styling in home screen and app bar
This commit is contained in:
parent
2008d2c688
commit
21d388fa02
4 changed files with 21 additions and 7 deletions
|
|
@ -1,3 +1,5 @@
|
|||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_mobx/flutter_mobx.dart';
|
||||
|
|
@ -65,6 +67,7 @@ class _HomeState extends State<Home> {
|
|||
onTap: FocusScope.of(context).unfocus,
|
||||
child: Scaffold(
|
||||
extendBodyBehindAppBar: true,
|
||||
extendBody: true,
|
||||
appBar: FrostyAppBar(
|
||||
showBackButton: false,
|
||||
title: Observer(
|
||||
|
|
@ -103,6 +106,7 @@ class _HomeState extends State<Home> {
|
|||
),
|
||||
body: SafeArea(
|
||||
top: false,
|
||||
bottom: false,
|
||||
child: Observer(
|
||||
builder: (_) => IndexedStack(
|
||||
index: _homeStore.selectedIndex,
|
||||
|
|
@ -128,12 +132,15 @@ class _HomeState extends State<Home> {
|
|||
),
|
||||
),
|
||||
),
|
||||
bottomNavigationBar: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const Divider(),
|
||||
Observer(
|
||||
bottomNavigationBar: ClipRRect(
|
||||
child: BackdropFilter(
|
||||
filter: ImageFilter.blur(sigmaX: 16, sigmaY: 16),
|
||||
child: Observer(
|
||||
builder: (_) => NavigationBar(
|
||||
backgroundColor: Theme.of(context)
|
||||
.colorScheme
|
||||
.surface
|
||||
.withValues(alpha: 0.6),
|
||||
destinations: [
|
||||
if (_authStore.isLoggedIn)
|
||||
const NavigationDestination(
|
||||
|
|
@ -173,7 +180,7 @@ class _HomeState extends State<Home> {
|
|||
onDestinationSelected: _homeStore.handleTap,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -272,6 +272,11 @@ class _StreamsListState extends State<StreamsList>
|
|||
);
|
||||
},
|
||||
),
|
||||
SliverPadding(
|
||||
padding: EdgeInsets.only(
|
||||
bottom: MediaQuery.of(context).padding.bottom,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ class FrostyAppBar extends StatelessWidget implements PreferredSizeWidget {
|
|||
child: BackdropFilter(
|
||||
filter: ImageFilter.blur(sigmaX: 16, sigmaY: 16),
|
||||
child: AppBar(
|
||||
backgroundColor:
|
||||
Theme.of(context).colorScheme.surface.withValues(alpha: 0.6),
|
||||
leading: showBackButton
|
||||
? IconButton(
|
||||
tooltip: 'Back',
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ class SectionHeader extends StatelessWidget {
|
|||
padding: padding ??
|
||||
(isFirst
|
||||
? const EdgeInsets.fromLTRB(16, 16, 16, 8)
|
||||
: const EdgeInsets.fromLTRB(16, 48, 16, 8)),
|
||||
: const EdgeInsets.fromLTRB(16, 32, 16, 8)),
|
||||
child: Text(
|
||||
text.toUpperCase(),
|
||||
style: TextStyle(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue