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

outdated

find Korea Postal address

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

find Korea Postal address

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, webview_flutter

More

Packages that depend on kopo