flag 4.0.0-nullsafety copy "flag: ^4.0.0-nullsafety" to clipboard
flag: ^4.0.0-nullsafety copied to clipboard

outdated

A flag Flutter package. Use for showing flags. All flags came from https://www.un.org/en/member-states/index.html .

example/lib/main.dart

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

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: SafeArea(
        child: Center(
          child: Column(
            children: <Widget>[
              Flag(
                'AD',
                height: 100,
              ),
              SizedBox(
                height: 100,
              ),
              Flag(
                'AD',
                height: 10,
                width: 100,
                fit: BoxFit.fill,
              ),
            ],
          ),
        ),
      ),
    );
  }
}
145
likes
0
pub points
97%
popularity

Publisher

verified publishermaomishen.com

A flag Flutter package. Use for showing flags. All flags came from https://www.un.org/en/member-states/index.html .

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_svg

More

Packages that depend on flag