Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
94481ec7bd |
@@ -334,6 +334,7 @@
|
|||||||
"walletCreate": "Create a Wallet",
|
"walletCreate": "Create a Wallet",
|
||||||
"settingsServerUrl": "Server URL",
|
"settingsServerUrl": "Server URL",
|
||||||
"settingsApplied": "The settings has been applied.",
|
"settingsApplied": "The settings has been applied.",
|
||||||
|
"settingsCustomFontsHelper": "Use comma to seprate.",
|
||||||
"notifications": "Notifications",
|
"notifications": "Notifications",
|
||||||
"posts": "Posts",
|
"posts": "Posts",
|
||||||
"settingsBackgroundImage": "Background Image",
|
"settingsBackgroundImage": "Background Image",
|
||||||
|
@@ -300,6 +300,7 @@
|
|||||||
"walletCreate": "创建钱包",
|
"walletCreate": "创建钱包",
|
||||||
"settingsServerUrl": "服务器 URL",
|
"settingsServerUrl": "服务器 URL",
|
||||||
"settingsApplied": "设置已应用。",
|
"settingsApplied": "设置已应用。",
|
||||||
|
"settingsCustomFontsHelper": "用逗号分隔。",
|
||||||
"notifications": "通知",
|
"notifications": "通知",
|
||||||
"posts": "帖子",
|
"posts": "帖子",
|
||||||
"settingsBackgroundImage": "背景图片",
|
"settingsBackgroundImage": "背景图片",
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
|
import 'package:animations/animations.dart';
|
||||||
import 'package:firebase_analytics/firebase_analytics.dart';
|
import 'package:firebase_analytics/firebase_analytics.dart';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
@@ -56,6 +56,20 @@ final rootNavigatorKey = GlobalKey<NavigatorState>();
|
|||||||
final _shellNavigatorKey = GlobalKey<NavigatorState>();
|
final _shellNavigatorKey = GlobalKey<NavigatorState>();
|
||||||
final _tabsShellKey = GlobalKey<NavigatorState>();
|
final _tabsShellKey = GlobalKey<NavigatorState>();
|
||||||
|
|
||||||
|
Widget _tabPagesTransitionBuilder(
|
||||||
|
BuildContext context,
|
||||||
|
Animation<double> animation,
|
||||||
|
Animation<double> secondaryAnimation,
|
||||||
|
Widget child,
|
||||||
|
) {
|
||||||
|
return FadeThroughTransition(
|
||||||
|
animation: animation,
|
||||||
|
secondaryAnimation: secondaryAnimation,
|
||||||
|
fillColor: Theme.of(context).colorScheme.surface,
|
||||||
|
child: child,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// Provider for the router
|
// Provider for the router
|
||||||
final routerProvider = Provider<GoRouter>((ref) {
|
final routerProvider = Provider<GoRouter>((ref) {
|
||||||
return GoRouter(
|
return GoRouter(
|
||||||
@@ -339,7 +353,12 @@ final routerProvider = Provider<GoRouter>((ref) {
|
|||||||
GoRoute(
|
GoRoute(
|
||||||
name: 'explore',
|
name: 'explore',
|
||||||
path: '/',
|
path: '/',
|
||||||
builder: (context, state) => const ExploreScreen(),
|
pageBuilder:
|
||||||
|
(context, state) => CustomTransitionPage(
|
||||||
|
key: const ValueKey('explore'),
|
||||||
|
child: const ExploreScreen(),
|
||||||
|
transitionsBuilder: _tabPagesTransitionBuilder,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
GoRoute(
|
GoRoute(
|
||||||
name: 'postSearch',
|
name: 'postSearch',
|
||||||
@@ -389,8 +408,12 @@ final routerProvider = Provider<GoRouter>((ref) {
|
|||||||
|
|
||||||
// Chat tab
|
// Chat tab
|
||||||
ShellRoute(
|
ShellRoute(
|
||||||
builder:
|
pageBuilder:
|
||||||
(context, state, child) => ChatShellScreen(child: child),
|
(context, state, child) => CustomTransitionPage(
|
||||||
|
key: const ValueKey('chat'),
|
||||||
|
child: child,
|
||||||
|
transitionsBuilder: _tabPagesTransitionBuilder,
|
||||||
|
),
|
||||||
routes: [
|
routes: [
|
||||||
GoRoute(
|
GoRoute(
|
||||||
name: 'chatList',
|
name: 'chatList',
|
||||||
@@ -433,7 +456,12 @@ final routerProvider = Provider<GoRouter>((ref) {
|
|||||||
GoRoute(
|
GoRoute(
|
||||||
name: 'realmList',
|
name: 'realmList',
|
||||||
path: '/realms',
|
path: '/realms',
|
||||||
builder: (context, state) => const RealmListScreen(),
|
pageBuilder:
|
||||||
|
(context, state) => CustomTransitionPage(
|
||||||
|
key: const ValueKey('realms'),
|
||||||
|
child: const RealmListScreen(),
|
||||||
|
transitionsBuilder: _tabPagesTransitionBuilder,
|
||||||
|
),
|
||||||
routes: [
|
routes: [
|
||||||
GoRoute(
|
GoRoute(
|
||||||
name: 'realmNew',
|
name: 'realmNew',
|
||||||
@@ -461,8 +489,12 @@ final routerProvider = Provider<GoRouter>((ref) {
|
|||||||
|
|
||||||
// Account tab
|
// Account tab
|
||||||
ShellRoute(
|
ShellRoute(
|
||||||
builder:
|
pageBuilder:
|
||||||
(context, state, child) => AccountShellScreen(child: child),
|
(context, state, child) => CustomTransitionPage(
|
||||||
|
key: const ValueKey('account'),
|
||||||
|
child: child,
|
||||||
|
transitionsBuilder: _tabPagesTransitionBuilder,
|
||||||
|
),
|
||||||
routes: [
|
routes: [
|
||||||
GoRoute(
|
GoRoute(
|
||||||
name: 'account',
|
name: 'account',
|
||||||
|
Reference in New Issue
Block a user