country_io 1.0.0 copy "country_io: ^1.0.0" to clipboard
country_io: ^1.0.0 copied to clipboard

A simple country.io data fetcher-cum-parser, which stores processed data in a target file( if provided ) and returns it, written in Dart :)

example/example.dart

import 'package:country_io/country_io.dart';

main() => Generator(
        targetPath:
            '../data/data.json') // make sure this path exists i.e. file may not exists, which can be created but you need to have directory already existing, otherwise operation will fail, by returning false
    // if you're not interested in storing it in any file, simply don't pass any argument for targetPath parameter
    .generate()
    .then((result) => print(result.isNotEmpty ? 'Success' : 'Failed !!!'));
0
likes
35
pub points
0%
popularity

Publisher

verified publisheritzmeanjan.in

A simple country.io data fetcher-cum-parser, which stores processed data in a target file( if provided ) and returns it, written in Dart :)

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

More

Packages that depend on country_io