dadata 0.3.3 copy "dadata: ^0.3.3" to clipboard
dadata: ^0.3.3 copied to clipboard

DaData.ru Suggestions API implementation (address suggestions, reverse geocoding)

example/lib/main.dart

import 'package:flutter/material.dart';

import 'suggestions_screen.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key? key}) : super(key: key);

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('DadataSuggestions Demo'),
      ),
      body: Center(
        child: Padding(
          padding: EdgeInsets.all(24),
          child: TextFormField(
            decoration: InputDecoration(
              hintText: "Paste Dadata API token and press enter",
            ),
            onFieldSubmitted: (string) {
              Navigator.of(context).push(
                PageRouteBuilder(
                  opaque: false,
                  pageBuilder: (BuildContext context, a, b) {
                    return SuggestionsScreen(token: string);
                  },
                ),
              );
            },
          ),
        ),
      ),
    );
  }
}
1
likes
0
pub points
71%
popularity

Publisher

unverified uploader

DaData.ru Suggestions API implementation (address suggestions, reverse geocoding)

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

http, json_annotation

More

Packages that depend on dadata