states_and_ut_india 1.0.1 copy "states_and_ut_india: ^1.0.1" to clipboard
states_and_ut_india: ^1.0.1 copied to clipboard

Simple Dart library to convert state names to abbreviations and vice-versa.

example/lib/main.dart

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

void main() {
  runApp(StatesAndUT());
}

// This app is a stateful, it tracks the user's current choice.
class StatesAndUT extends StatefulWidget {
  @override
  _StatesAndUTState createState() => _StatesAndUTState();
}

class _StatesAndUTState extends State<StatesAndUT> {
  @override
  Widget build(BuildContext context) {
    final TextStyle textStyle = Theme.of(context).textTheme.headline4;

    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('States and UT India'),
        ),
        body: Center(
          child: Column(
            mainAxisSize: MainAxisSize.min,
            crossAxisAlignment: CrossAxisAlignment.center,
            children: <Widget>[
              Text(INStates.getAbbreviation("Karnataka"), style: textStyle),
              Text(INStates.getName("MH"), style: textStyle),
            ],
          ),
        ),
      ),
    );
  }
}
3
likes
40
pub points
0%
popularity

Publisher

unverified uploader

Simple Dart library to convert state names to abbreviations and vice-versa.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on states_and_ut_india