Skip to content

Commit

Permalink
Minor issue fix
Browse files Browse the repository at this point in the history
  • Loading branch information
himanshusharma89 committed Sep 17, 2022
1 parent ef405cb commit 6735ee2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 22 deletions.
7 changes: 1 addition & 6 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="tech.himanshusharma.relicbazaar">
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:name="${applicationName}"
android:label="retro_shopping"
android:icon="@mipmap/ic_launcher">
<meta-data
Expand Down
26 changes: 13 additions & 13 deletions lib/views/profile/settings/manage_address.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_geocoder/geocoder.dart';
import 'package:flutter_geocoder/model.dart';
import 'package:geocoding/geocoding.dart';
import 'package:geolocator/geolocator.dart';
import 'package:relic_bazaar/helpers/constants.dart';
import 'package:relic_bazaar/model/address_model.dart';
Expand Down Expand Up @@ -28,14 +27,14 @@ class _ManageAddressState extends State<ManageAddress> {

Future<void> getLocation() async {
final Position position = await Geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.high);
final Coordinates coordinates =
Coordinates(position.latitude, position.longitude);
final List<Address> addresses =
await Geocoder.local.findAddressesFromCoordinates(coordinates);
final Address first = addresses.first;
debugPrint('$addresses : ${first.addressLine}');
final Placemark coordinates =
(await placemarkFromCoordinates(position.latitude, position.longitude)) as Placemark;
// final List<Placemark> addresses =
// await placemarkFromCoordinates(coordinates);
// final Address first = addresses.first;
debugPrint('addresses : ${coordinates.name}');
setState(() {
loc.text = first.addressLine!;
loc.text = coordinates.name!;
});
debugPrint(loc.text);
}
Expand Down Expand Up @@ -225,12 +224,13 @@ class _ManageAddressState extends State<ManageAddress> {
physics: const BouncingScrollPhysics(),
type: StepperType.horizontal,
currentStep: currStep,
controlsBuilder: (BuildContext context,
{VoidCallback? onStepContinue, VoidCallback? onStepCancel}) {
controlsBuilder: (BuildContext context, ControlsDetails controlsDetails) {

// {VoidCallback? onStepContinue, VoidCallback? onStepCancel}
return Row(
children: <Widget>[
TextButton(
onPressed: onStepContinue,
onPressed: controlsDetails.onStepContinue,
child: const Text(
'CONTINUE',
style: TextStyle(color: Colors.white),
Expand All @@ -240,7 +240,7 @@ class _ManageAddressState extends State<ManageAddress> {
width: 10,
),
TextButton(
onPressed: onStepCancel,
onPressed: controlsDetails.onStepCancel,
child: const Text(
'CANCEL',
style: TextStyle(color: Colors.white),
Expand Down
6 changes: 3 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1

environment:
sdk: '>=2.12.0 <3.0.0'
sdk: '>=2.17.0 <3.0.0'

dependencies:
flutter:
Expand All @@ -20,10 +20,10 @@ dependencies:
razorpay_flutter: ^1.2.7
google_mobile_ads: ^0.13.4
geolocator: ^7.6.2
flutter_geocoder: ^0.2.2-nullsafety
geocoding: ^2.0.5
flutter_svg: ^0.22.0
provider:
advance_pdf_viewer: any
advance_pdf_viewer: ^2.0.1
firebase_auth: ^3.1.1
google_sign_in: ^5.1.1
webview_flutter: ^2.1.0
Expand Down

0 comments on commit 6735ee2

Please sign in to comment.