kpostal 0.2.0 copy "kpostal: ^0.2.0" to clipboard
kpostal: ^0.2.0 copied to clipboard

outdated

Kpostal package can search for Korean postal addresses using Kakao postcode service. This package is inspired by Kopo package that is discontinued.

pub package likes

English Korean

About kpostal #

Kpostal package can search for Korean postal addresses using Kakao postcode service.
This package is inspired by Kopo package that is discontinued.

By default, it uses the Address Search page hosted on Github.
It's the easiest way to use it.

To respond to errors that arise from hosting problems, we also support hosting local server.

Support Null-Safety!

Getting Started #

Add kpostal to your pubspec.yaml file:

dependencies:
  kpostal:

Setup #

🧑🏻‍💻 Neither iOS nor Android requires any action when using default hosting.

❗ Use local server #

If you use the [useLocalServer] option to host a local server, you should make the platform specific settings required for http communication.

Android #

Add android:usesClearextTraffic="true" to

<application
        android:label="[your_app]"
        android:icon="@mipmap/ic_launcher"
        ...
        android:usesCleartextTraffic="true"
        ...
        >  
    ...
</application>

iOS #

Add NSAppTransportSecurity to info.plist file.

<plist version="1.0">
<dict>
    ...
    <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
    </dict>
    ...
</dict>
</plist>

Example #

import 'package:kpostal/kpostal.dart';

// Use callback.
TextButton(
    onPressed: () async {
        await Navigator.push(context, MaterialPageRoute(
            builder: (_) => KpostalView(
                callback: (Kpostal result) {
                    print(result.address);
                }, 
            ),
        ));
    },
    child: Text('Search!'),
),

// Not use callback.
TextButton(
    onPressed: () async {
        Kpostal result = await Navigator.push(context, MaterialPageRoute(builder: (_) => KpostalView()));
        print(result.address);
    },
    child: Text('Search!'),
),

// Use local server.
KpostalView(
    useLocalServer: true, // default is false
    localPort: 8080, // default is 8080
    callback: ...
)
66
likes
0
pub points
90%
popularity

Publisher

verified publishertykan.dev

Kpostal package can search for Korean postal addresses using Kakao postcode service. This package is inspired by Kopo package that is discontinued.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_inappwebview, webview_flutter

More

Packages that depend on kpostal