flutter_circle_flags_svg 1.0.3 flutter_circle_flags_svg: ^1.0.3 copied to clipboard
Flutter Circle Flags SVG, It is a Flutter package that provides a widget to display a circle flag of a country.
import 'package:flutter/material.dart';
import 'package:flutter_circle_flags_svg/circle_flags.dart';
import 'countries.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: 'Flutter Demo',
theme: ThemeData(
brightness: Brightness.dark,
primarySwatch: Colors.blue,
),
home: Scaffold(
appBar: AppBar(
title: Text('flags'),
),
body: Container(
// child: CircleFlag(
// 'be',
// size: 25,
// ),
child: ListView(
children: [
for (var country in countries)
Padding(
padding: const EdgeInsets.all(8.0),
child: ListTile(
leading: CircleFlag(
country.countryCode,
size: 32,
),
title: Text(country.name),
),
)
],
),
),
),
);
}
}