App bar leading icon for drawer

This commit is contained in:
2024-07-12 22:31:45 +08:00
parent 1a26880719
commit a2db9a7ae4
16 changed files with 80 additions and 7 deletions

View File

@@ -7,6 +7,7 @@ import 'package:solian/models/realm.dart';
import 'package:solian/providers/auth.dart';
import 'package:solian/router.dart';
import 'package:solian/theme.dart';
import 'package:solian/widgets/app_bar_leading.dart';
import 'package:solian/widgets/app_bar_title.dart';
import 'package:solian/widgets/attachments/attachment_publish.dart';
import 'package:solian/widgets/feed/feed_tags_field.dart';
@@ -129,6 +130,7 @@ class _ArticlePublishScreenState extends State<ArticlePublishScreen> {
color: Theme.of(context).colorScheme.surface,
child: Scaffold(
appBar: AppBar(
leading: const AppBarLeadingButton(),
title: AppBarTitle('articlePublish'.tr),
centerTitle: false,
toolbarHeight: SolianTheme.toolbarHeight(context),

View File

@@ -5,6 +5,7 @@ import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:solian/providers/content/call.dart';
import 'package:solian/theme.dart';
import 'package:solian/widgets/app_bar_leading.dart';
import 'package:solian/widgets/chat/call/call_controls.dart';
import 'package:solian/widgets/chat/call/call_participant.dart';
@@ -55,6 +56,7 @@ class _CallScreenState extends State<CallScreen> {
color: Theme.of(context).colorScheme.surface,
child: Scaffold(
appBar: AppBar(
leading: const AppBarLeadingButton(),
centerTitle: true,
toolbarHeight: SolianTheme.toolbarHeight(context),
title: RichText(

View File

@@ -17,6 +17,7 @@ import 'package:solian/providers/content/channel.dart';
import 'package:solian/router.dart';
import 'package:solian/screens/channel/channel_detail.dart';
import 'package:solian/theme.dart';
import 'package:solian/widgets/app_bar_leading.dart';
import 'package:solian/widgets/app_bar_title.dart';
import 'package:solian/widgets/chat/call/call_prejoin.dart';
import 'package:solian/widgets/chat/call/chat_call_action.dart';
@@ -192,6 +193,7 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
return Scaffold(
appBar: AppBar(
leading: const AppBarLeadingButton(),
title: AppBarTitle(title),
centerTitle: false,
titleSpacing: SolianTheme.titleSpacing(context),

View File

@@ -8,6 +8,7 @@ import 'package:solian/router.dart';
import 'package:solian/screens/account/notification.dart';
import 'package:solian/theme.dart';
import 'package:solian/widgets/account/signin_required_overlay.dart';
import 'package:solian/widgets/app_bar_leading.dart';
import 'package:solian/widgets/app_bar_title.dart';
import 'package:solian/widgets/channel/channel_list.dart';
import 'package:solian/widgets/chat/call/chat_call_indicator.dart';
@@ -43,6 +44,7 @@ class _ChatScreenState extends State<ChatScreen> {
color: Theme.of(context).colorScheme.surface,
child: Scaffold(
appBar: AppBar(
leading: const AppBarLeadingButton(),
title: AppBarTitle('chat'.tr),
centerTitle: false,
toolbarHeight: SolianTheme.toolbarHeight(context),

View File

@@ -8,6 +8,7 @@ import 'package:solian/models/post.dart';
import 'package:solian/providers/content/feed.dart';
import 'package:solian/screens/home.dart';
import 'package:solian/theme.dart';
import 'package:solian/widgets/app_bar_leading.dart';
import 'package:solian/widgets/app_bar_title.dart';
import 'package:solian/widgets/articles/article_action.dart';
import 'package:solian/widgets/articles/article_owned_list.dart';
@@ -62,6 +63,7 @@ class _DraftBoxScreenState extends State<DraftBoxScreen> {
color: Theme.of(context).colorScheme.surface,
child: Scaffold(
appBar: AppBar(
leading: const AppBarLeadingButton(),
title: AppBarTitle('draftBox'.tr),
centerTitle: false,
toolbarHeight: SolianTheme.toolbarHeight(context),

View File

@@ -10,6 +10,7 @@ import 'package:solian/screens/account/notification.dart';
import 'package:solian/theme.dart';
import 'package:solian/widgets/app_bar_title.dart';
import 'package:solian/widgets/current_state_action.dart';
import 'package:solian/widgets/app_bar_leading.dart';
import 'package:solian/widgets/feed/feed_list.dart';
class HomeScreen extends StatefulWidget {
@@ -63,6 +64,7 @@ class _HomeScreenState extends State<HomeScreen> {
centerTitle: false,
floating: true,
toolbarHeight: SolianTheme.toolbarHeight(context),
leading: const AppBarLeadingButton(),
actions: [
const BackgroundStateWidget(),
const NotificationButton(),

View File

@@ -8,6 +8,7 @@ import 'package:solian/models/realm.dart';
import 'package:solian/providers/auth.dart';
import 'package:solian/router.dart';
import 'package:solian/theme.dart';
import 'package:solian/widgets/app_bar_leading.dart';
import 'package:solian/widgets/app_bar_title.dart';
import 'package:solian/widgets/attachments/attachment_publish.dart';
import 'package:solian/widgets/posts/post_item.dart';
@@ -133,6 +134,7 @@ class _PostPublishScreenState extends State<PostPublishScreen> {
color: Theme.of(context).colorScheme.surface,
child: Scaffold(
appBar: AppBar(
leading: const AppBarLeadingButton(),
title: AppBarTitle('postPublish'.tr),
centerTitle: false,
toolbarHeight: SolianTheme.toolbarHeight(context),

View File

@@ -9,6 +9,7 @@ import 'package:solian/router.dart';
import 'package:solian/screens/account/notification.dart';
import 'package:solian/theme.dart';
import 'package:solian/widgets/account/signin_required_overlay.dart';
import 'package:solian/widgets/app_bar_leading.dart';
import 'package:solian/widgets/app_bar_title.dart';
import 'package:solian/widgets/current_state_action.dart';
import 'package:solian/widgets/sized_container.dart';
@@ -47,7 +48,6 @@ class _RealmListScreenState extends State<RealmListScreen> {
@override
void initState() {
super.initState();
getRealms();
}
@@ -59,6 +59,7 @@ class _RealmListScreenState extends State<RealmListScreen> {
color: Theme.of(context).colorScheme.surface,
child: Scaffold(
appBar: AppBar(
leading: const AppBarLeadingButton(),
title: AppBarTitle('realm'.tr),
centerTitle: false,
toolbarHeight: SolianTheme.toolbarHeight(context),

View File

@@ -6,6 +6,7 @@ import 'package:solian/models/realm.dart';
import 'package:solian/providers/auth.dart';
import 'package:solian/router.dart';
import 'package:solian/theme.dart';
import 'package:solian/widgets/app_bar_leading.dart';
import 'package:solian/widgets/app_bar_title.dart';
import 'package:uuid/uuid.dart';
@@ -98,6 +99,7 @@ class _RealmOrganizeScreenState extends State<RealmOrganizeScreen> {
color: Theme.of(context).colorScheme.surface,
child: Scaffold(
appBar: AppBar(
leading: const AppBarLeadingButton(),
title: AppBarTitle('realmOrganizing'.tr),
centerTitle: false,
toolbarHeight: SolianTheme.toolbarHeight(context),

View File

@@ -14,6 +14,7 @@ import 'package:solian/router.dart';
import 'package:solian/screens/channel/channel_organize.dart';
import 'package:solian/screens/posts/post_editor.dart';
import 'package:solian/theme.dart';
import 'package:solian/widgets/app_bar_leading.dart';
import 'package:solian/widgets/channel/channel_list.dart';
import 'package:solian/widgets/posts/post_list.dart';
@@ -90,6 +91,7 @@ class _RealmViewScreenState extends State<RealmViewScreen> {
handle:
NestedScrollView.sliverOverlapAbsorberHandleFor(context),
sliver: SliverAppBar(
leading: const AppBarLeadingButton(),
title: Text(_realm?.name ?? 'loading'.tr),
centerTitle: false,
actions: [