Code Monkey home page Code Monkey logo

Comments (5)

lohanidamodar avatar lohanidamodar commented on May 27, 2024

@tamu73 There must be some conflicts in your code for this to arise, can you please provide a minimum reproducible code as I am not able to reproduce it on my own. Provide the code where this is occuring.

Also try to install this package on a fresh new project and see if the errors occurs.

from clean_nepali_calendar.

tamu73 avatar tamu73 commented on May 27, 2024

This is my main.dart

import 'package:ToyonathCalendar/screens/nepali-calendar-try.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

void main() {
  SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
    statusBarColor: Color(0xff388A9D), // status bar color
  ));
  runApp(MaterialApp(
    debugShowCheckedModeBanner: false,
    home: Main(),
  ));
}

class Main extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return NepCal();
  }
}

And This is where your package is called

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

class NepCal extends StatelessWidget {
  final NepaliCalendarController _nepaliCalendarController = NepaliCalendarController();
  @override
  Widget build(BuildContext context){
    final NepaliDateTime first =NepaliDateTime(2075,5);
    final NepaliDateTime last = NepaliDateTime(2077,3);
    return Scaffold(
      appBar: AppBar(
        title: Text('Clean Nepali Calendar'),
      ),
      body: SingleChildScrollView(
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: <Widget>[
            CleanNepaliCalendar(
              controller: _nepaliCalendarController,
              onHeaderLongPressed: (date) {
                print("header long pressed $date");
              },
              onHeaderTapped: (date) {
                print("header tapped $date");
              },
              calendarStyle: CalendarStyle(
                selectedColor: Colors.deepOrange,
                dayStyle: TextStyle(fontWeight: FontWeight.bold),
                todayStyle: TextStyle(
                  fontSize: 20.0,
                ),
                todayColor: Colors.orange.shade400,
                highlightSelected: true,
                renderDaysOfWeek: true,
                highlightToday: true,
              ),
              headerStyle: HeaderStyle(
                centerHeaderTitle: false,
                titleTextStyle: TextStyle(fontWeight: FontWeight.bold, color: Colors.deepOrange,fontSize: 20.0),
              ),
              initialDate: NepaliDateTime.now(),
              firstDate: first,
              lastDate: last,
              language: Language.nepali,
              onDaySelected: (day){
                print(day.toString());
              },
            ),
          ],
        ),
      ),
    );
  }
}

from clean_nepali_calendar.

tamu73 avatar tamu73 commented on May 27, 2024

Making a new project is also not solving the problem.

Same error.

from clean_nepali_calendar.

lohanidamodar avatar lohanidamodar commented on May 27, 2024

@tamu73 Thanks for the info. I will test and let you know

from clean_nepali_calendar.

lohanidamodar avatar lohanidamodar commented on May 27, 2024

@tamu73 Thanks for the info, dependent package was causing the issue, Thanks to you I have updated and published the new version. Please use v1.1.2. Do clean flutter clean after the package update if it doesn't work. If it still causes problem, feel free to reopen the issue.

from clean_nepali_calendar.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.