ahora si es la version final final ya neta enserio we
This commit is contained in:
@@ -12,6 +12,7 @@ import '../../core/theme/app_theme.dart';
|
||||
import '../../core/widgets/app_widgets.dart';
|
||||
import '../home/colonias_data.dart';
|
||||
import 'colonias_provider.dart';
|
||||
import '../../core/network/api_client.dart';
|
||||
|
||||
const Map<String, String> _cpToColonia = {
|
||||
'38000': 'Zona Centro',
|
||||
@@ -144,18 +145,7 @@ class _AddAddressPageState extends ConsumerState<AddAddressPage> {
|
||||
|
||||
setState(() => _loading = true);
|
||||
try {
|
||||
const storage = FlutterSecureStorage();
|
||||
final token = await storage.read(key: authTokenStorageKey) ?? '';
|
||||
|
||||
final dio = Dio(
|
||||
BaseOptions(
|
||||
baseUrl: const String.fromEnvironment(
|
||||
'API_BASE_URL',
|
||||
defaultValue: 'http://localhost:8000',
|
||||
),
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
),
|
||||
);
|
||||
final dio = ref.read(apiClientProvider);
|
||||
|
||||
final body = <String, dynamic>{
|
||||
'label': _labelCtrl.text.trim().isEmpty
|
||||
@@ -244,8 +234,9 @@ class _AddAddressPageState extends ConsumerState<AddAddressPage> {
|
||||
padding: const EdgeInsets.all(14),
|
||||
decoration: BoxDecoration(
|
||||
color: AppTheme.primaryLight.withValues(alpha: 0.5),
|
||||
borderRadius:
|
||||
BorderRadius.circular(AppTheme.radiusSm),
|
||||
borderRadius: BorderRadius.circular(
|
||||
AppTheme.radiusSm,
|
||||
),
|
||||
border: Border.all(color: AppTheme.primaryMid),
|
||||
),
|
||||
child: Column(
|
||||
@@ -311,8 +302,9 @@ class _AddAddressPageState extends ConsumerState<AddAddressPage> {
|
||||
Container(
|
||||
height: 220,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.circular(AppTheme.radiusMd),
|
||||
borderRadius: BorderRadius.circular(
|
||||
AppTheme.radiusMd,
|
||||
),
|
||||
border: Border.all(color: AppTheme.border),
|
||||
boxShadow: AppTheme.softShadow,
|
||||
),
|
||||
@@ -324,7 +316,8 @@ class _AddAddressPageState extends ConsumerState<AddAddressPage> {
|
||||
initialZoom: 15.0,
|
||||
cameraConstraint: bounds != null
|
||||
? CameraConstraint.containCenter(
|
||||
bounds: bounds)
|
||||
bounds: bounds,
|
||||
)
|
||||
: const CameraConstraint.unconstrained(),
|
||||
onTap: (_, latlng) => _fetchStreetName(latlng),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user