svg_flag 1.1.0 copy "svg_flag: ^1.1.0" to clipboard
svg_flag: ^1.1.0 copied to clipboard

outdated

An error-free flutter package contains SVG Flags of Countries around the world.

example/lib/main.dart

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

void main() {
  runApp(const MaterialApp(home: MyApp()));
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
            title: const Text("Countries Flag"),
            centerTitle: true,
            elevation: 0),
        body: ListView.builder(
            physics: const BouncingScrollPhysics(),
            padding: const EdgeInsets.only(bottom: 20.0),
            itemCount: FlagData.values.length,
            shrinkWrap: true,
            itemBuilder: (_, index) => Center(
                    child: Column(children: [
                  Container(
                      decoration: BoxDecoration(boxShadow: [
                        BoxShadow(
                            offset: const Offset(1, 1),
                            blurRadius: 1,
                            color: Colors.black.withOpacity(0.25))
                      ]),
                      margin: const EdgeInsets.fromLTRB(20, 20, 20, 5.0),
                      child: SvgFlag(FlagData.values[index],
                          width: 30, height: 15)),
                  Text('${index + 1}. ${FlagData.values[index].source}'
                      .replaceAll(RegExp(r'packages.*/|.svg'), "")
                      .toUpperCase())
                ]))));
  }
}
15
likes
0
points
1.53k
downloads

Publisher

verified publisherinidia.app

Weekly Downloads

An error-free flutter package contains SVG Flags of Countries around the world.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_svg

More

Packages that depend on svg_flag