address_search_text_field 0.0.1 copy "address_search_text_field: ^0.0.1" to clipboard
address_search_text_field: ^0.0.1 copied to clipboard

discontinuedreplaced by: address_search_field
outdated

A text field that displays an address search bar that finds a location from a reference and gets nearby addresses. Selecting the desired address returns an object with the latitude, longitude, and ful [...]

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:address_search_text_field/address_search_text_field.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatelessWidget {
  final SearchAddressTextField searchAddress = SearchAddressTextField();

  @override
  Widget build(BuildContext context) {
    Size size = MediaQuery.of(context).size;
    return Scaffold(
      appBar: AppBar(),
      body: Center(
        child: Container(
          width: size.width * 0.80,
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              SearchAddressTextField.widget(
                context: context,
                country: "Ecuador",
                exceptions: [
                  "Esmeraldas, Ecuador",
                  "Esmeraldas Province, Ecuador",
                  "Ecuador"
                ],
              ),
              SizedBox(
                height: 15.0,
              ),
              FlatButton(
                child: Text("get data"),
                color: Colors.blue,
                onPressed: () {
                  AddressPoint point = searchAddress.values;
                  print(point.toString());
                }
              )
            ]
          )
        )
      )
    );
  }
}
4
likes
0
pub points
17%
popularity

Publisher

unverified uploader

A text field that displays an address search bar that finds a location from a reference and gets nearby addresses. Selecting the desired address returns an object with the latitude, longitude, and full address of the place.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, geocoder, geolocator, google_maps_flutter, location

More

Packages that depend on address_search_text_field