feat: add speech_to_text, optimize navigation transitions, improve bottom nav rebuild performance, and fix home screen padding.
This commit is contained in:
@@ -9,6 +9,9 @@ PODS:
|
|||||||
- GoogleUtilities/Environment (~> 8.0)
|
- GoogleUtilities/Environment (~> 8.0)
|
||||||
- GoogleUtilities/UserDefaults (~> 8.0)
|
- GoogleUtilities/UserDefaults (~> 8.0)
|
||||||
- PromisesObjC (~> 2.4)
|
- PromisesObjC (~> 2.4)
|
||||||
|
- CwlCatchException (2.2.1):
|
||||||
|
- CwlCatchExceptionSupport (~> 2.2.1)
|
||||||
|
- CwlCatchExceptionSupport (2.2.1)
|
||||||
- emoji_picker_flutter (0.0.1):
|
- emoji_picker_flutter (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- FBAEMKit (18.0.2):
|
- FBAEMKit (18.0.2):
|
||||||
@@ -121,6 +124,10 @@ PODS:
|
|||||||
- shared_preferences_foundation (0.0.1):
|
- shared_preferences_foundation (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
|
- speech_to_text (7.2.0):
|
||||||
|
- CwlCatchException
|
||||||
|
- Flutter
|
||||||
|
- FlutterMacOS
|
||||||
- sqflite_darwin (0.0.4):
|
- sqflite_darwin (0.0.4):
|
||||||
- Flutter
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
@@ -143,6 +150,7 @@ DEPENDENCIES:
|
|||||||
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
|
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
|
||||||
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
|
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
|
||||||
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
|
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
|
||||||
|
- speech_to_text (from `.symlinks/plugins/speech_to_text/darwin`)
|
||||||
- sqflite_darwin (from `.symlinks/plugins/sqflite_darwin/darwin`)
|
- sqflite_darwin (from `.symlinks/plugins/sqflite_darwin/darwin`)
|
||||||
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
|
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
|
||||||
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/darwin`)
|
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/darwin`)
|
||||||
@@ -151,6 +159,8 @@ SPEC REPOS:
|
|||||||
trunk:
|
trunk:
|
||||||
- AppAuth
|
- AppAuth
|
||||||
- AppCheckCore
|
- AppCheckCore
|
||||||
|
- CwlCatchException
|
||||||
|
- CwlCatchExceptionSupport
|
||||||
- FBAEMKit
|
- FBAEMKit
|
||||||
- FBSDKCoreKit
|
- FBSDKCoreKit
|
||||||
- FBSDKCoreKit_Basics
|
- FBSDKCoreKit_Basics
|
||||||
@@ -193,6 +203,8 @@ EXTERNAL SOURCES:
|
|||||||
:path: ".symlinks/plugins/path_provider_foundation/darwin"
|
:path: ".symlinks/plugins/path_provider_foundation/darwin"
|
||||||
shared_preferences_foundation:
|
shared_preferences_foundation:
|
||||||
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
|
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
|
||||||
|
speech_to_text:
|
||||||
|
:path: ".symlinks/plugins/speech_to_text/darwin"
|
||||||
sqflite_darwin:
|
sqflite_darwin:
|
||||||
:path: ".symlinks/plugins/sqflite_darwin/darwin"
|
:path: ".symlinks/plugins/sqflite_darwin/darwin"
|
||||||
url_launcher_ios:
|
url_launcher_ios:
|
||||||
@@ -203,6 +215,8 @@ EXTERNAL SOURCES:
|
|||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
AppAuth: d4f13a8fe0baf391b2108511793e4b479691fb73
|
AppAuth: d4f13a8fe0baf391b2108511793e4b479691fb73
|
||||||
AppCheckCore: cc8fd0a3a230ddd401f326489c99990b013f0c4f
|
AppCheckCore: cc8fd0a3a230ddd401f326489c99990b013f0c4f
|
||||||
|
CwlCatchException: 7acc161b299a6de7f0a46a6ed741eae2c8b4d75a
|
||||||
|
CwlCatchExceptionSupport: 54ccab8d8c78907b57f99717fb19d4cc3bce02dc
|
||||||
emoji_picker_flutter: 8e50ec5caac456a23a78637e02c6293ea0ac8771
|
emoji_picker_flutter: 8e50ec5caac456a23a78637e02c6293ea0ac8771
|
||||||
FBAEMKit: 56a4f5a9607957b547b6458b17a98c5bb2736367
|
FBAEMKit: 56a4f5a9607957b547b6458b17a98c5bb2736367
|
||||||
FBSDKCoreKit: 54f1240567e16862ab71c53c33dc347db5c524c5
|
FBSDKCoreKit: 54f1240567e16862ab71c53c33dc347db5c524c5
|
||||||
@@ -231,6 +245,7 @@ SPEC CHECKSUMS:
|
|||||||
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
|
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
|
||||||
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
|
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
|
||||||
shared_preferences_foundation: 5086985c1d43c5ba4d5e69a4e8083a389e2909e6
|
shared_preferences_foundation: 5086985c1d43c5ba4d5e69a4e8083a389e2909e6
|
||||||
|
speech_to_text: 87bf9298952e8d9073be1b6aade6d5758db5170c
|
||||||
sqflite_darwin: 5a7236e3b501866c1c9befc6771dfd73ffb8702d
|
sqflite_darwin: 5a7236e3b501866c1c9befc6771dfd73ffb8702d
|
||||||
url_launcher_ios: bb13df5870e8c4234ca12609d04010a21be43dfa
|
url_launcher_ios: bb13df5870e8c4234ca12609d04010a21be43dfa
|
||||||
webview_flutter_wkwebview: 29eb20d43355b48fe7d07113835b9128f84e3af4
|
webview_flutter_wkwebview: 29eb20d43355b48fe7d07113835b9128f84e3af4
|
||||||
|
|||||||
@@ -82,8 +82,11 @@ class AppBottomNavBar extends ConsumerWidget {
|
|||||||
Builder(builder: (context) {
|
Builder(builder: (context) {
|
||||||
final authState = ref.watch(authProvider);
|
final authState = ref.watch(authProvider);
|
||||||
final isAuth = authState.status == AuthStatus.authenticated;
|
final isAuth = authState.status == AuthStatus.authenticated;
|
||||||
|
// Only watch the unreadCount field — not the entire messaging
|
||||||
|
// state. This prevents the nav bar from rebuilding on every
|
||||||
|
// typing event, new message, or status change.
|
||||||
final msgUnread = isAuth
|
final msgUnread = isAuth
|
||||||
? ref.watch(messagingProvider).unreadCount
|
? ref.watch(messagingProvider.select((s) => s.unreadCount))
|
||||||
: 0;
|
: 0;
|
||||||
return _NavItem(
|
return _NavItem(
|
||||||
svgPath: 'assets/icons/nav_messages_icon.svg',
|
svgPath: 'assets/icons/nav_messages_icon.svg',
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ class HomeScreen extends ConsumerWidget {
|
|||||||
];
|
];
|
||||||
return ListView.builder(
|
return ListView.builder(
|
||||||
controller: scrollController,
|
controller: scrollController,
|
||||||
|
padding: EdgeInsets.zero,
|
||||||
itemCount: sections.length,
|
itemCount: sections.length,
|
||||||
itemBuilder: (_, i) => sections[i],
|
itemBuilder: (_, i) => sections[i],
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -298,26 +298,52 @@ class _HomeRouteWrapper extends ConsumerWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Slide from right transition for push-style navigation.
|
/// Slide from right transition for push-style navigation.
|
||||||
|
/// The entering page slides in from the right while the exiting page
|
||||||
|
/// slides slightly left + fades, giving a native iOS-like depth effect.
|
||||||
Widget _slideTransition(
|
Widget _slideTransition(
|
||||||
BuildContext context,
|
BuildContext context,
|
||||||
Animation<double> animation,
|
Animation<double> animation,
|
||||||
Animation<double> secondaryAnimation,
|
Animation<double> secondaryAnimation,
|
||||||
Widget child,
|
Widget child,
|
||||||
) {
|
) {
|
||||||
|
// Entering page: slide in from right
|
||||||
|
final slideIn = Tween<Offset>(
|
||||||
|
begin: const Offset(1, 0),
|
||||||
|
end: Offset.zero,
|
||||||
|
).animate(CurvedAnimation(
|
||||||
|
parent: animation,
|
||||||
|
curve: Curves.easeOutCubic,
|
||||||
|
));
|
||||||
|
|
||||||
|
// Exiting page: slide slightly left + dim
|
||||||
|
final slideOut = Tween<Offset>(
|
||||||
|
begin: Offset.zero,
|
||||||
|
end: const Offset(-0.25, 0),
|
||||||
|
).animate(CurvedAnimation(
|
||||||
|
parent: secondaryAnimation,
|
||||||
|
curve: Curves.easeOutCubic,
|
||||||
|
));
|
||||||
|
|
||||||
|
final fadeOut = Tween<double>(begin: 1.0, end: 0.9).animate(
|
||||||
|
CurvedAnimation(parent: secondaryAnimation, curve: Curves.easeOut),
|
||||||
|
);
|
||||||
|
|
||||||
return SlideTransition(
|
return SlideTransition(
|
||||||
position: Tween<Offset>(
|
position: slideOut,
|
||||||
begin: const Offset(1, 0),
|
child: FadeTransition(
|
||||||
end: Offset.zero,
|
opacity: fadeOut,
|
||||||
).animate(CurvedAnimation(parent: animation, curve: Curves.easeOut)),
|
child: SlideTransition(
|
||||||
child: Container(
|
position: slideIn,
|
||||||
color: Colors.white,
|
child: DecoratedBox(
|
||||||
child: child,
|
decoration: const BoxDecoration(color: Colors.white),
|
||||||
|
child: child,
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Smooth fade transition for tab-to-tab navigation.
|
/// Smooth crossfade transition for tab-to-tab navigation.
|
||||||
/// Uses a white container behind to prevent content overlap during transition.
|
|
||||||
Widget _fadeTransition(
|
Widget _fadeTransition(
|
||||||
BuildContext context,
|
BuildContext context,
|
||||||
Animation<double> animation,
|
Animation<double> animation,
|
||||||
@@ -325,9 +351,9 @@ Widget _fadeTransition(
|
|||||||
Widget child,
|
Widget child,
|
||||||
) {
|
) {
|
||||||
return FadeTransition(
|
return FadeTransition(
|
||||||
opacity: CurveTween(curve: Curves.easeIn).animate(animation),
|
opacity: CurvedAnimation(parent: animation, curve: Curves.easeInOut),
|
||||||
child: Container(
|
child: DecoratedBox(
|
||||||
color: Colors.white,
|
decoration: const BoxDecoration(color: Colors.white),
|
||||||
child: child,
|
child: child,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user