refactor(ui): Replace default AppBar with FloatingAppBar components

This commit is contained in:
cogwheel0
2025-12-15 20:23:24 +05:30
parent 7619040e27
commit 8fa69fc165
2 changed files with 18 additions and 21 deletions

View File

@@ -478,25 +478,19 @@ class _SsoAuthPageState extends ConsumerState<SsoAuthPage> {
return ErrorBoundary(
child: Scaffold(
backgroundColor: context.conduitTheme.surfaceBackground,
appBar: AppBar(
backgroundColor: context.conduitTheme.surfaceBackground,
elevation: 0,
leading: ConduitIconButton(
icon: Platform.isIOS ? CupertinoIcons.back : Icons.arrow_back,
onPressed: () => context.pop(),
tooltip: l10n?.back ?? 'Back',
extendBodyBehindAppBar: true,
appBar: FloatingAppBar(
leading: FloatingAppBarBackButton(
onTap: () => context.pop(),
),
title: Text(
l10n?.sso ?? 'SSO',
style: context.conduitTheme.headingMedium,
),
centerTitle: true,
title: FloatingAppBarTitle(text: l10n?.sso ?? 'SSO'),
actions: [
if (_controller != null)
ConduitIconButton(
icon: Platform.isIOS ? CupertinoIcons.refresh : Icons.refresh,
onPressed: _refresh,
tooltip: l10n?.retry ?? 'Retry',
FloatingAppBarAction(
child: FloatingAppBarIconButton(
icon: Platform.isIOS ? CupertinoIcons.refresh : Icons.refresh,
onTap: _refresh,
),
),
],
),

View File

@@ -1,4 +1,5 @@
import 'dart:async';
import 'dart:io' show Platform;
import 'dart:math' as math;
import 'package:flutter/material.dart';
@@ -8,6 +9,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
import '../../../core/providers/app_providers.dart';
import '../../../core/utils/markdown_to_text.dart';
import '../../../l10n/app_localizations.dart';
import '../../../shared/widgets/conduit_components.dart';
import '../providers/chat_providers.dart';
import '../services/voice_call_service.dart';
@@ -155,16 +157,17 @@ class _VoiceCallPageState extends ConsumerState<VoiceCallPage>
return Scaffold(
backgroundColor: backgroundColor,
appBar: AppBar(
title: Text(l10n.voiceCallTitle),
leading: IconButton(
icon: const Icon(CupertinoIcons.xmark),
onPressed: () async {
extendBodyBehindAppBar: true,
appBar: FloatingAppBar(
leading: FloatingAppBarIconButton(
icon: Platform.isIOS ? CupertinoIcons.xmark : Icons.close,
onTap: () async {
await _service?.stopCall();
if (!context.mounted) return;
Navigator.of(context).pop();
},
),
title: FloatingAppBarTitle(text: l10n.voiceCallTitle),
),
body: SafeArea(
child: Column(