kopo 0.1.3 copy "kopo: ^0.1.3" to clipboard
kopo: ^0.1.3 copied to clipboard

Kopo package can search for Korean postal addresses using the following postal code search services. If necessary, you can use the English address by clicking the View English button.

example/lib/main.dart

import 'dart:convert';

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:kopo/kopo.dart';

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

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

class RootPage extends StatefulWidget {
  @override
  _RootPageState createState() => _RootPageState();
}

class _RootPageState extends State<RootPage> {
  String addressJSON = '';

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Kopo Demo'),
      ),
      body: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        crossAxisAlignment: CrossAxisAlignment.center,
        children: <Widget>[
          FlatButton(
            child: Text('find Korea Postal address'),
            onPressed: () async {
              KopoModel model = await Navigator.push(
                context,
                CupertinoPageRoute(
                  builder: (context) => Kopo(),
                ),
              );
              print(model.toJson());
              setState(() {
                addressJSON =
                    '${model.address} ${model.buildingName}${model.apartment == 'Y' ? '아파트' : ''} ${model.zonecode} ';
              });
            },
          ),
          Text('$addressJSON'),
        ],
      ),
    );
  }
}
16
likes
25
pub points
45%
popularity

Publisher

unverified uploader

Kopo package can search for Korean postal addresses using the following postal code search services. If necessary, you can use the English address by clicking the View English button.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter, webview_flutter

More

Packages that depend on kopo