style: display branch distance prominently under the title with brand color and near_me icon for improved readability
This commit is contained in:
parent
370099930d
commit
561e69e0f0
@ -3,8 +3,6 @@ import 'package:flutter/material.dart';
|
||||
import 'package:geolocator/geolocator.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
import '../services/odoo_service.dart';
|
||||
import '../theme/app_theme.dart';
|
||||
|
||||
class BranchesScreen extends StatefulWidget {
|
||||
const BranchesScreen({super.key});
|
||||
|
||||
@ -260,10 +258,7 @@ class _BranchesScreenState extends State<BranchesScreen> {
|
||||
child: Icon(Icons.storefront,
|
||||
color: colorScheme.secondary),
|
||||
),
|
||||
title: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
title: Text(
|
||||
branch['name'] ?? 'Mapan Branch',
|
||||
style: theme
|
||||
.textTheme
|
||||
@ -273,35 +268,31 @@ class _BranchesScreenState extends State<BranchesScreen> {
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
subtitle: Padding(
|
||||
padding: const EdgeInsets.only(top: 6.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (distanceLabel.isNotEmpty) ...[
|
||||
Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.near_me_rounded,
|
||||
size: 14,
|
||||
color: colorScheme.primary,
|
||||
),
|
||||
if (distanceLabel.isNotEmpty)
|
||||
Container(
|
||||
margin: const EdgeInsets.only(left: 8),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 8, vertical: 3),
|
||||
decoration: BoxDecoration(
|
||||
color: colorScheme.secondaryContainer,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
child: Text(
|
||||
distanceLabel,
|
||||
style: theme
|
||||
.textTheme
|
||||
.labelLarge
|
||||
?.copyWith(
|
||||
color: colorScheme.onSecondaryContainer,
|
||||
fontSize: 10,
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
'$distanceLabel away',
|
||||
style: theme.textTheme.bodyMedium?.copyWith(
|
||||
color: colorScheme.primary,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
subtitle: Padding(
|
||||
padding: const EdgeInsets.only(top: 8.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const SizedBox(height: 6),
|
||||
],
|
||||
Text(
|
||||
addressParts.isEmpty
|
||||
? 'No address specified'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user