country_flag_widget 0.0.5 country_flag_widget: ^0.0.5 copied to clipboard
A Flutter package to display country flags based on country names.
import 'package:flutter/material.dart';
import 'package:country_flag_widget/country_flag_widget.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Country Flag Example',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: Scaffold(
appBar: AppBar(
title: const Text('Country Flag Example'),
),
body: const Center(
child: const CountryFlagWidget(countryName: 'Pakistan'),
),
),
);
}
}