tibetan_calendar 0.0.4 copy "tibetan_calendar: ^0.0.4" to clipboard
tibetan_calendar: ^0.0.4 copied to clipboard

outdated

Tibetan Calender package provide easy way to get tibetan date and year base on western date. For more you can refer documentaion

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:tibetan_calendar/tibetan_calendar.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(
        primarySwatch: Colors.blue,
      ),
      home: HomePage(),
    );
  }
}

class HomePage extends StatefulWidget {
  @override
  _HomePageState createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  Calendar? tibDate;
  @override
  Widget build(BuildContext context) {
    //print(TibetanCalendar.getTibetanDate(DateTime.now()));
    return Scaffold(
      body: Container(
        child: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              ElevatedButton(
                child: Text('Get Today Date'),
                onPressed: () {
                  var now = DateTime.now();
                  tibDate = TibetanCalendar.getTibetanDate(
                      DateTime(now.year, now.month, now.day));
                  setState(() {});
                },
              ),
              SizedBox(
                height: 20,
              ),
              tibDate != null
                  ? Text('${tibDate!.day}/${tibDate!.month}/${tibDate!.year}')
                  : Text('Click button')
            ],
          ),
        ),
      ),
    );
  }
}
2
likes
0
points
26
downloads

Publisher

verified publisherkharagedition.com

Weekly Downloads

Tibetan Calender package provide easy way to get tibetan date and year base on western date. For more you can refer documentaion

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, intl

More

Packages that depend on tibetan_calendar