fix: harden whole-app responsive and theme behavior

This commit is contained in:
Developer 2026-09-05 06:49:51 -04:00
parent 5c61a2b749
commit 472b1ac994
4 changed files with 1214 additions and 42 deletions

View File

@ -145,7 +145,7 @@ class _RouteDetailScreenState extends ConsumerState<RouteDetailScreen> {
child: CircularProgressIndicator(color: colors.cyberCyan), child: CircularProgressIndicator(color: colors.cyberCyan),
), ),
error: (err, _) => Center( error: (err, _) => Center(
child: Padding( child: SingleChildScrollView(
padding: const EdgeInsets.all(24.0), padding: const EdgeInsets.all(24.0),
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
@ -383,7 +383,9 @@ class _RouteDetailScreenState extends ConsumerState<RouteDetailScreen> {
List<AppMapMarker> markers, List<AppMapMarker> markers,
List<AppPolyline> polylines, List<AppPolyline> polylines,
) { ) {
final double mapHeight = snapshot.height < 450 ? 140 : 220; final double mapHeight = snapshot.height < 360
? 96
: (snapshot.height < 450 ? 140 : 220);
return SingleChildScrollView( return SingleChildScrollView(
child: Column( child: Column(

View File

@ -707,8 +707,8 @@ class _RoutePlannerScreenState extends ConsumerState<RoutePlannerScreen> {
// Generous space (>= 620dp): 220dp // Generous space (>= 620dp): 220dp
// Moderate space (500–619dp): 160dp // Moderate space (500–619dp): 160dp
// Constrained space (380–499dp, e.g. IME keyboard open): 110dp // Constrained space (380–499dp, e.g. IME keyboard open): 110dp
// Severely constrained space (280–379dp, e.g. landscape): 70dp // Severely constrained space (340–379dp): 60dp
// Extreme constraint (< 280dp): 0dp (collapses so inputs stay visible and editable) // Extreme constraint (< 340dp, e.g. 640x320 landscape): 0dp (collapses so inputs stay visible and editable)
final double mapHeight; final double mapHeight;
final bool showDisclaimer; final bool showDisclaimer;
if (snapshot.height >= 620) { if (snapshot.height >= 620) {
@ -720,8 +720,8 @@ class _RoutePlannerScreenState extends ConsumerState<RoutePlannerScreen> {
} else if (snapshot.height >= 380) { } else if (snapshot.height >= 380) {
mapHeight = 110.0; mapHeight = 110.0;
showDisclaimer = false; showDisclaimer = false;
} else if (snapshot.height >= 280) { } else if (snapshot.height >= 340) {
mapHeight = 70.0; mapHeight = 60.0;
showDisclaimer = false; showDisclaimer = false;
} else { } else {
mapHeight = 0.0; mapHeight = 0.0;

View File

@ -413,44 +413,46 @@ class _FriendsScreenState extends ConsumerState<FriendsScreen>
), ),
data: (friends) { data: (friends) {
if (friends.isEmpty) { if (friends.isEmpty) {
return Center( return SingleChildScrollView(
child: Padding( child: Center(
padding: const EdgeInsets.all(32.0), child: Padding(
child: Column( padding: const EdgeInsets.all(24.0),
mainAxisAlignment: MainAxisAlignment.center, child: Column(
children: [ mainAxisAlignment: MainAxisAlignment.center,
const Icon( children: [
Icons.people_alt_outlined, const Icon(
size: 48, Icons.people_alt_outlined,
color: Colors.white24, size: 48,
), color: Colors.white24,
const SizedBox(height: 12),
const Text(
'NO FRIENDS ADDED YET',
style: TextStyle(
color: Colors.white70,
fontWeight: FontWeight.w800,
fontSize: 14,
letterSpacing: 0.8,
), ),
), const SizedBox(height: 12),
const SizedBox(height: 6), const Text(
const Text( 'NO FRIENDS ADDED YET',
'Switch to "Find Riders" to search for riding buddies by @handle.', style: TextStyle(
textAlign: TextAlign.center, color: Colors.white70,
style: TextStyle(color: Colors.white38, fontSize: 12), fontWeight: FontWeight.w800,
), fontSize: 14,
const SizedBox(height: 16), letterSpacing: 0.8,
ElevatedButton.icon( ),
style: ElevatedButton.styleFrom(
backgroundColor: colors.cyberCyan,
foregroundColor: Colors.black,
), ),
icon: const Icon(Icons.search), const SizedBox(height: 6),
label: const Text('FIND RIDERS'), const Text(
onPressed: () => _tabController.animateTo(2), 'Switch to "Find Riders" to search for riding buddies by @handle.',
), textAlign: TextAlign.center,
], style: TextStyle(color: Colors.white38, fontSize: 12),
),
const SizedBox(height: 16),
ElevatedButton.icon(
style: ElevatedButton.styleFrom(
backgroundColor: colors.cyberCyan,
foregroundColor: Colors.black,
),
icon: const Icon(Icons.search),
label: const Text('FIND RIDERS'),
onPressed: () => _tabController.animateTo(2),
),
],
),
), ),
), ),
); );

File diff suppressed because it is too large Load Diff