fix: harden whole-app responsive and theme behavior
This commit is contained in:
parent
5c61a2b749
commit
472b1ac994
|
|
@ -145,7 +145,7 @@ class _RouteDetailScreenState extends ConsumerState<RouteDetailScreen> {
|
|||
child: CircularProgressIndicator(color: colors.cyberCyan),
|
||||
),
|
||||
error: (err, _) => Center(
|
||||
child: Padding(
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.all(24.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
|
|
@ -383,7 +383,9 @@ class _RouteDetailScreenState extends ConsumerState<RouteDetailScreen> {
|
|||
List<AppMapMarker> markers,
|
||||
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(
|
||||
child: Column(
|
||||
|
|
|
|||
|
|
@ -707,8 +707,8 @@ class _RoutePlannerScreenState extends ConsumerState<RoutePlannerScreen> {
|
|||
// Generous space (>= 620dp): 220dp
|
||||
// Moderate space (500–619dp): 160dp
|
||||
// Constrained space (380–499dp, e.g. IME keyboard open): 110dp
|
||||
// Severely constrained space (280–379dp, e.g. landscape): 70dp
|
||||
// Extreme constraint (< 280dp): 0dp (collapses so inputs stay visible and editable)
|
||||
// Severely constrained space (340–379dp): 60dp
|
||||
// Extreme constraint (< 340dp, e.g. 640x320 landscape): 0dp (collapses so inputs stay visible and editable)
|
||||
final double mapHeight;
|
||||
final bool showDisclaimer;
|
||||
if (snapshot.height >= 620) {
|
||||
|
|
@ -720,8 +720,8 @@ class _RoutePlannerScreenState extends ConsumerState<RoutePlannerScreen> {
|
|||
} else if (snapshot.height >= 380) {
|
||||
mapHeight = 110.0;
|
||||
showDisclaimer = false;
|
||||
} else if (snapshot.height >= 280) {
|
||||
mapHeight = 70.0;
|
||||
} else if (snapshot.height >= 340) {
|
||||
mapHeight = 60.0;
|
||||
showDisclaimer = false;
|
||||
} else {
|
||||
mapHeight = 0.0;
|
||||
|
|
|
|||
|
|
@ -413,44 +413,46 @@ class _FriendsScreenState extends ConsumerState<FriendsScreen>
|
|||
),
|
||||
data: (friends) {
|
||||
if (friends.isEmpty) {
|
||||
return Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(32.0),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.people_alt_outlined,
|
||||
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,
|
||||
return SingleChildScrollView(
|
||||
child: Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(24.0),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.people_alt_outlined,
|
||||
size: 48,
|
||||
color: Colors.white24,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 6),
|
||||
const Text(
|
||||
'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,
|
||||
const SizedBox(height: 12),
|
||||
const Text(
|
||||
'NO FRIENDS ADDED YET',
|
||||
style: TextStyle(
|
||||
color: Colors.white70,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontSize: 14,
|
||||
letterSpacing: 0.8,
|
||||
),
|
||||
),
|
||||
icon: const Icon(Icons.search),
|
||||
label: const Text('FIND RIDERS'),
|
||||
onPressed: () => _tabController.animateTo(2),
|
||||
),
|
||||
],
|
||||
const SizedBox(height: 6),
|
||||
const Text(
|
||||
'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
Loading…
Reference in New Issue