countries_flag 0.0.1 copy "countries_flag: ^0.0.1" to clipboard
countries_flag: ^0.0.1 copied to clipboard

250+ flags to use in you dream project, with just a single line of code.

example/lib/main.dart

import 'package:countries_flag/countries_flag.dart';
import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flags',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        primarySwatch: Colors.green,
      ),
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Flags'),
          centerTitle: true,
        ),
        body: Padding(
          padding: const EdgeInsets.all(10.0),
          child: Column(
            mainAxisAlignment: MainAxisAlignment.start,
            crossAxisAlignment: CrossAxisAlignment.center,
            children: [
              SizedBox(
                height: 150,
                child: Row(
                  mainAxisAlignment: MainAxisAlignment.start,
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: [
                    Expanded(
                      child: Flag(Flags.pakistan, height: 150),
                    ),
                    const SizedBox(width: 10),
                    Expanded(
                      child: Flag(Flags.indonesia, height: 150),
                    ),
                    const SizedBox(width: 10),
                    Expanded(
                      child: Flag(Flags.india, height: 150),
                    ),
                  ],
                ),
              ),
              Expanded(
                child: Flag(Flags.pakistan, height: 150),
              ),
              const SizedBox(width: 10),
              Expanded(
                child: Flag(Flags.indonesia, height: 150),
              ),
              const SizedBox(width: 10),
              Expanded(
                child: Flag(Flags.india, height: 150),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
20
likes
140
pub points
84%
popularity

Publisher

verified publisherby3kdeveloper.blogspot.com

250+ flags to use in you dream project, with just a single line of code.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_svg

More

Packages that depend on countries_flag