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:geolocator/geolocator.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
import '../services/odoo_service.dart';
|
import '../services/odoo_service.dart';
|
||||||
import '../theme/app_theme.dart';
|
|
||||||
|
|
||||||
class BranchesScreen extends StatefulWidget {
|
class BranchesScreen extends StatefulWidget {
|
||||||
const BranchesScreen({super.key});
|
const BranchesScreen({super.key});
|
||||||
|
|
||||||
@ -260,10 +258,7 @@ class _BranchesScreenState extends State<BranchesScreen> {
|
|||||||
child: Icon(Icons.storefront,
|
child: Icon(Icons.storefront,
|
||||||
color: colorScheme.secondary),
|
color: colorScheme.secondary),
|
||||||
),
|
),
|
||||||
title: Row(
|
title: Text(
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: Text(
|
|
||||||
branch['name'] ?? 'Mapan Branch',
|
branch['name'] ?? 'Mapan Branch',
|
||||||
style: theme
|
style: theme
|
||||||
.textTheme
|
.textTheme
|
||||||
@ -273,35 +268,31 @@ class _BranchesScreenState extends State<BranchesScreen> {
|
|||||||
fontWeight: FontWeight.bold,
|
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)
|
const SizedBox(width: 4),
|
||||||
Container(
|
Text(
|
||||||
margin: const EdgeInsets.only(left: 8),
|
'$distanceLabel away',
|
||||||
padding: const EdgeInsets.symmetric(
|
style: theme.textTheme.bodyMedium?.copyWith(
|
||||||
horizontal: 8, vertical: 3),
|
color: colorScheme.primary,
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: colorScheme.secondaryContainer,
|
|
||||||
borderRadius: BorderRadius.circular(12),
|
|
||||||
),
|
|
||||||
child: Text(
|
|
||||||
distanceLabel,
|
|
||||||
style: theme
|
|
||||||
.textTheme
|
|
||||||
.labelLarge
|
|
||||||
?.copyWith(
|
|
||||||
color: colorScheme.onSecondaryContainer,
|
|
||||||
fontSize: 10,
|
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
subtitle: Padding(
|
const SizedBox(height: 6),
|
||||||
padding: const EdgeInsets.only(top: 8.0),
|
],
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Text(
|
Text(
|
||||||
addressParts.isEmpty
|
addressParts.isEmpty
|
||||||
? 'No address specified'
|
? 'No address specified'
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user