Code Monkey home page Code Monkey logo

flutter-widgets's Introduction

Syncfusion Flutter Widgets

Syncfusion Flutter widgets libraries include high-quality UI widgets and file-format packages to help you create rich, high-quality applications for iOS, Android, and web from a single code base. Please find the supported platforms for our Flutter widgets.

Disclaimer: This is a commercial package. To use our packages, you need to have either the Syncfusion Commercial License or Syncfusion Community license. For more details, please check the LICENSE file.

Table of contents

Repository structure

This repository holds the source code of all the Syncfusion Flutter widgets and libraries. Source code of the widget, a working example, read me, changelog, etc., files are available in the packages directory.

Also, you can view the samples code from this repository.

Packages

Package/Plugin Available widgets/libraries Pub Points Popularity Likes
syncfusion_flutter_charts
  • SfCartesianChart
  • SfCircularChart
  • SfPyramidChart
  • SfFunnelChart
pub package pub points popularity likes
syncfusion_flutter_calendar
  • SfCalendar
pub package pub points popularity likes
syncfusion_flutter_datagrid
  • SfDataGrid
pub package pub points popularity likes
syncfusion_flutter_pdfviewer
  • SfPdfViewer
pub package pub points popularity likes
syncfusion_flutter_pdf
  • PDF library
pub package pub points popularity likes
syncfusion_flutter_xlsio
  • XlsIO library
pub package pub points popularity likes
syncfusion_flutter_datepicker
  • SfDateRangePicker
pub package pub points popularity likes
syncfusion_flutter_maps
  • SfMaps
pub package pub points popularity likes
syncfusion_flutter_gauges
  • SfRadialGauge
pub package pub points popularity likes
syncfusion_flutter_sliders
  • SfSlider
  • SfRangeSlider
  • SfRangeSelector
pub package pub points popularity likes
syncfusion_flutter_signaturepad
  • SfSignaturePad
pub package pub points popularity likes
syncfusion_flutter_barcodes
  • SfBarcodeGenerator
pub package pub points popularity likes
syncfusion_officechart
  • Office chart library
pub package pub points popularity likes
syncfusion_officecore This package is a dependecy package for Office chart library. pub package pub points popularity likes
syncfusion_flutter_core This package is a dependecy package for all the Syncfusion Flutter widgets and libraries. pub package pub points popularity likes
syncfusion_localizations This package contains localized text for 77 cultures for all the applicable Syncfusion Flutter Widgets. pub package pub points popularity likes

How to use

Referring packages source in your application

All the packages available in the packages folder can be referred in your application by following the below steps.

Step 1

Clone the flutter-widgets repository into your machine.

Step 2

Refer the required package in your application's pubspec.yaml file by mentioning its local path. For example, here we have referred the charts package.

syncfusion_flutter_charts:
    path: D:/flutter-widgets/packages/syncfusion_flutter_charts

Step 3

Run the following command to get the required packages.

$ flutter pub get

Step 4

Run your application either using F5 or Run > Start Debugging.

Running the available example

All the packages available in the packages folder has an example and it can be run by following the below steps.

Step 1

Clone the flutter-widgets repository into your machine.

Step 2

Open the example folder available in packages in an IDE. The below path is for reference.

..\flutter-widgets\packages\syncfusion_flutter_charts\example

Step 3

Run the following command to get the required packages.

$ flutter pub get

Note: In the example, packages are referred from the local folder which is available in this repository. If you wish, you can also refer the packages from pub.

Step 4

Run your application either using F5 or Run > Start Debugging.

Get the demo application

Explore the full capabilities of our Flutter widgets on your device by installing our sample browser applications from the below app stores, and view samples code in GitHub.

Useful links

Take a look at the following to learn more about Syncfusion Flutter widgets:

Support and feedback

About Syncfusion

Founded in 2001 and headquartered in Research Triangle Park, N.C., Syncfusion has more than 20,000 customers and more than 1 million users, including large financial institutions, Fortune 500 companies, and global IT consultancies.

Today we provide 1,000+ controls and frameworks for web (ASP.NET Core, ASP.NET MVC, ASP.NET WebForms, JavaScript, Angular, React, Vue, and Blazor, mobile (Xamarin, Flutter, UWP, and JavaScript), and desktop development (WinForms, WPF, and UWP). We provide ready-to deploy enterprise software for dashboards, reports, data integration, and big data processing. Many customers have saved millions in licensing fees by deploying our software.

flutter-widgets's People

Contributors

dharanidharandharmasivam avatar jayavigneshwarang avatar lavanyagowtham2021 avatar lokeshpalani avatar marismathan avatar pavithranandhiniramachandran avatar preethikaselvam avatar rokesh-karthikeyan avatar sasikumar3595 avatar sfhariharasudhan avatar sriramkiransenthilkumar avatar vijayakumarmariappan avatar vijays-git avatar yuvaraj-gajaraj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flutter-widgets's Issues

Setting View property of SfCalendar dynamically doesn't work correctly

Was working in 18.2.59 but now in 18.3.38 it's not working. I reverted back to 18.2.59 and it works like before. I have a Floating Action Button that calls a function that that sets the state of and toggles a variable between CalendarView.day and Calendar.workWeek. I've confirmed that the variable changes state but the UI doesn't update. In 18.2.59 it did as I expected and once the state is updated the UI updates as well. Did something change? Am I missing something? Thanks in advance!

[√] Flutter (Channel stable, 1.22.1-0.0.pre.2, on Microsoft Windows [Version 10.0.18362.1082], locale en-US)
• Flutter version 1.22.1-0.0.pre.2 at C:\Users<username>\Documents\flutter
• Framework revision 46098c6e5f (3 days ago), 2020-10-06 18:02:43 -0700
• Engine revision 5babba6c4d
• Dart version 2.10.0

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at C:\Users<username>\Documents\android
• Platform android-30, build-tools 30.0.2
• ANDROID_SDK_ROOT = C:\Users<username>\Documents\android
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.

[!] Android Studio (version 4.0)
• Android Studio at C:\Program Files\Android\Android Studio
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] VS Code (version 1.49.3)
• VS Code at C:\Users<username>\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.15.0

[√] Connected device (1 available)
• sdk gphone x86 (mobile) • emulator-5554 • android-x86 • Android 11 (API 30) (emulator)

! Doctor found issues in 1 category.

[syncfusion_flutter_charts] [Feature Request] Need the possibility to hide only one edge label

In the current implementation it is only possible to hide or keep both edge labels

/// Placement of edge labels in the axis.
enum EdgeLabelPlacement {
  /// - EdgeLabelPlacement.none, places the edge labels in its own position.
  none,

  /// - EdgeLabelPlacement.hides, hide the edge labels.
  hide,

  /// - EdgeLabelPlacement.shift, shift the edge labels inside the plot area bounds.
  shift
}

I need to hide only the left most EdgeLabel, would work the same for the right one e.g.

/// Placement of edge labels in the axis.
enum EdgeLabelPlacement {
  /// - EdgeLabelPlacement.none, places the edge labels in its own position.
  none,

  /// - EdgeLabelPlacement.hides, hide the edge labels.
  hide,
  /// - EdgeLabelPlacement.hides, hide the left-most edge labels.
  hideLeft,
  /// - EdgeLabelPlacement.hides, hide the right-most edge labels.
  hideRight,
  /// - EdgeLabelPlacement.shift, shift the edge labels inside the plot area bounds.
  shift
}

Wrong display 24 date in iPhone 6

Hello, thank you for great widgets, but I found issue in iPhone 6 with iOS 12.4.5, date 24 positioned horizontally(see screenshot)
code:

Widget _calendarWidget(BuildContext context) { return Center( child: Container( child: SfDateRangePicker( monthViewSettings: DateRangePickerMonthViewSettings( firstDayOfWeek: 1, ), onSelectionChanged: _onSelectionChanged, selectionMode: DateRangePickerSelectionMode.range, minDate: DateTime.now(), showNavigationArrow: false, allowViewNavigation: true, navigationDirection: DateRangePickerNavigationDirection.horizontal, selectionShape: DateRangePickerSelectionShape.circle, headerHeight: 60, rangeSelectionColor: Colors.red.withOpacity(0.5), endRangeSelectionColor: Colors.red, startRangeSelectionColor: Colors.red, ), ),); }
How can I fix it ?
IMG_38391BAD1977-1

Flutter Grid 18.3.4.4-Beta version

development/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_datagrid-18.3.44-beta/lib/src/sfdatagrid.dart:1136:32: Error: No named parameter with the name 'nullOk'.
MediaQuery.of(context, nullOk: true)?.textScaleFactor ?? 1.0;

SfCartesianChart (Multiple LineSeries display errors when refresh the widget)

  • flutter version any
  • syncfusion_flutter_charts : ^18.3.44
    1. It's normal to run the app the first time
    image

**2.when refresh the widget or perform hot reload , it will display errors(end to end),The data is obtained by network request **
image

code
`class EchartsWidget extends StatefulWidget{

@OverRide
State createState() {
return EchartsWidgetState();
}

}

class EchartsWidgetState extends State{
RefreshController _refreshController =
RefreshController(initialRefresh: false);

void _onRefresh() async {
// monitor network fetch
await Future.delayed(Duration(milliseconds: 1000));
if (mounted)
setState(() {
});
// if failed,use refreshFailed()
_refreshController.refreshCompleted();
}

List resultDataList = [];
List todayDataListOld = [];
List yesterdayDataListOld = [];
var unit;
List todayDataList = List();
List yesterdayDataList = List();

timestampToDateechart(timestamp) {
var date = DateTime.fromMillisecondsSinceEpoch(timestamp);
return date.toString().substring(0, 16);
}

getEchartData(List resultDataList) {

  ResultData data1 = resultDataList[0];
  ResultData data2 = resultDataList[1];
  if (data1.name == "今日") {
    todayDataListOld = data1.data;
    yesterdayDataListOld = data2.data;
  } else {
    todayDataListOld = data2.data;
    yesterdayDataListOld = data1.data;
  }


  for (int i = 0; i < todayDataListOld.length; i++) {
    String timestamp = timestampToDateechart(todayDataListOld[i].date-(24 * 60 * 60 * 1000));
    print("今日" + timestamp);
    var time = DateTime.parse(timestamp);
    var value = double.parse(todayDataListOld[i].value);
    todayDataList.add(new EchartsData(time, value));
  }

  for (int i = 0; i < yesterdayDataListOld.length; i++) {
    String timestamp = timestampToDateechart(yesterdayDataListOld[i].date);
    var time = DateTime.parse(timestamp);
    print("昨日" + timestamp);
    var value = double.parse(yesterdayDataListOld[i].value) ;
    yesterdayDataList.add(new EchartsData(time, value));
  }

}

@OverRide
Widget build(BuildContext context) {
return SmartRefresher(
enablePullDown: true,
header: MaterialClassicHeader(),
controller: _refreshController,
onRefresh: _onRefresh,
child: Container(
child: FutureBuilder(
future: WholeFactoryService().getEchartsData(),
builder: (BuildContext context, AsyncSnapshot snapshot){
if(snapshot.connectionState == ConnectionState.done){
resultDataList = snapshot.data;
getEchartData(resultDataList);
return Container(
width: 300,
height: 300,
child: SfCartesianChart(
title: ChartTitle(
text: '发电负荷(MW)',
alignment: ChartAlignment.near
),
legend: Legend(
isVisible:true,
position: LegendPosition.auto,
),
backgroundColor: Color(0xff2775c7),
// Initialize category axis
primaryXAxis: DateTimeAxis(
//isVisible: true,
dateFormat: DateFormat.Hm(),

                  ),
                  primaryYAxis: NumericAxis(
                    axisLine: AxisLine(width: 0),
                  ),

                  series: <LineSeries<EchartsData, DateTime>>[
                    LineSeries<EchartsData, DateTime>(
                        color: Color(0xff05fcff),
                        // Bind data source
                        dataSource: todayDataList,
                        xValueMapper: (EchartsData data, _) => data.time,
                        yValueMapper: (EchartsData data, _) => data.value,
                        legendItemText: "今日",

                    ),
                    LineSeries<EchartsData, DateTime>(

                        color: Color(0xfff5a92f),
                        // Bind data source
                        dataSource: yesterdayDataList,
                        xValueMapper: (EchartsData data, _) => data.time,
                        yValueMapper: (EchartsData data, _) => data.value,
                        legendItemText: "昨日",
                        isVisible: true,

                    ),
                  ]
              ),
            );

          }else{
            return Container();
          }
        },
      ),
    ),
);

}
}

class EchartsData {
EchartsData(this.time, this.value);

DateTime time;
num value;
}`

Functionalities

Hello. First of all thanks for this package .

This package is support search text and highlight text ?

[syncfusion_flutter_pdfviewer] Cannot successfully read some PDF from network

════════════ Exception caught by widgets library ═════════════════
type '_PdfNull' is not a subtype of type '_PdfDictionary' in type cast
The relevant error-causing widget was:
SfPdfViewer file:///Users/claireliu/Desktop/meet_taipei_flutter/lib/page/intro/pdf_viewer_page.dart:15:23
═════════════════════════════════════════════════════

        SfPdfViewer.network(
            "https://osensetech.blob.core.windows.net/meettaipei/IC-07_poster.pdf",
            canShowScrollHead: false,
            canShowScrollStatus: false,
            canShowPaginationDialog: false,
            enableDoubleTapZooming: false,
            onDocumentLoadFailed: (detail) {
              print(detail.error);
            },
          );

Please provide me an option or code for disable scrolling on fixed screen data

Hey,
Please see in the below linked vide, I have set fixed screen data but its screen only data cell, kindly advice me how to stop this scrolling its impact on my whole Screen where i have set multiple widget of scrolling.

Just like we were did in ListView physics = NeverScrollableScrollPhysics() for disable scrolling,
Please provide me an option or code for disable scrolling on fixed screen data
sample

Does SplineAreaSeries support multiple colours

We have a SplineAreaSeries chart and we would like to support two different colours on the graph, blue for data points above zero and red and data points below zero. Does SplineAreaSeries support multiple colours?

Compiling error

I'm getting the following error when compiling

Compiler message:
../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/syncfusion_flutter_sliders-18.3.40-beta/lib/src/slider.dart:1232:7: Error: The non-abstract class '_RenderSliderElement' is missing implementations for these members:
RenderObjectElement.insertChildRenderObject
RenderObjectElement.moveChildRenderObject
RenderObjectElement.removeChildRenderObject

I want to add rows dynamically from database(in PDF Web)

im using syncfusion_flutter_pdf: ^18.3.35-beta
plz help me to fix this... I want to add DataRows from my getBIlls.bill list. Help me to fix this...

my code

DataTable dataTable = DataTable(
                          columns: const <DataColumn>[
                            DataColumn(label: Text('Series From')),
                            DataColumn(label: Text('Series To')),
                            DataColumn(label: Text('No From')),
                            DataColumn(label: Text('No To')),
                            DataColumn(label: Text('QTY')),
                            DataColumn(label: Text('Price')),
                          ],
                          rows: getBill.bill.map(
                            (value) => DataRow(cells: <DataCell>[
                              DataCell(Text(value.series_from.toString())),
                              DataCell(Text(value.series_to.toString())),
                              DataCell(Text(value.no_from.toString())),
                              DataCell(Text(value.no_to.toString())),
                              DataCell(Text(value.qty.toString())),
                              DataCell(Text(value.mrp.toString())),
                            ]),
                          ));
                      DataTable invoiceDetails = dataTable;

getting error

Error: Expected a value of type 'List<DataRow>', but got one of type 'MappedListIterable<Bill, DataRow>'
    at Object.throw_ [as throw] (http://localhost:62775/dart_sdk.js:4328:11)
    at Object.castError (http://localhost:62775/dart_sdk.js:4299:15)
    at Object.cast [as as] (http://localhost:62775/dart_sdk.js:4615:17)
    at dart.LegacyType.new.as (http://localhost:62775/dart_sdk.js:6159:60)
    at GenerateBill.ShowBill.new.<anonymous> (http://localhost:62775/packages/lotto_pos/GenerateBill.dart.lib.js:3060:121)
    at Generator.next (<anonymous>)
    at runBody (http://localhost:62775/dart_sdk.js:37613:34)
    at Object._async [as async] (http://localhost:62775/dart_sdk.js:37644:7)
    at ink_well._InkResponseStateWidget.new.<anonymous> (http://localhost:62775/packages/lotto_pos/GenerateBill.dart.lib.js:3032:7173)
    at ink_well._InkResponseState.new.[_handleTap] (http://localhost:62775/packages/flutter/src/material/icon_button.dart.lib.js:47433:21)
    at http://localhost:62775/packages/flutter/src/material/icon_button.dart.lib.js:47535:668
    at tap.TapGestureRecognizer.new.invokeCallback (http://localhost:62775/packages/flutter/src/gestures/recognizer.dart.lib.js:189:18)
    at tap.TapGestureRecognizer.new.handleTapUp (http://localhost:62775/packages/flutter/src/gestures/tap.dart.lib.js:395:40)
    at tap.TapGestureRecognizer.new.[_checkUp] (http://localhost:62775/packages/flutter/src/gestures/tap.dart.lib.js:201:12)
    at tap.TapGestureRecognizer.new.handlePrimaryPointer (http://localhost:62775/packages/flutter/src/gestures/tap.dart.lib.js:148:23)
    at tap.TapGestureRecognizer.new.handleEvent (http://localhost:62775/packages/flutter/src/gestures/recognizer.dart.lib.js:448:16)
    at pointer_router.PointerRouter.new.[_dispatch] (http://localhost:62775/packages/flutter/src/gestures/pointer_router.dart.lib.js:74:9)
    at http://localhost:62775/packages/flutter/src/gestures/pointer_router.dart.lib.js:109:26
    at LinkedMap.new.forEach (http://localhost:62775/dart_sdk.js:24743:11)
    at pointer_router.PointerRouter.new.[_dispatchEventToRoutes] (http://localhost:62775/packages/flutter/src/gestures/pointer_router.dart.lib.js:106:29)
    at pointer_router.PointerRouter.new.route (http://localhost:62775/packages/flutter/src/gestures/pointer_router.dart.lib.js:98:37)
    at binding$5.WidgetsFlutterBinding.new.handleEvent (http://localhost:62775/packages/flutter/src/gestures/binding.dart.lib.js:303:26)
    at binding$5.WidgetsFlutterBinding.new.dispatchEvent (http://localhost:62775/packages/flutter/src/gestures/binding.dart.lib.js:286:24)
    at binding$5.WidgetsFlutterBinding.new.dispatchEvent (http://localhost:62775/packages/flutter/src/rendering/layer.dart.lib.js:5949:13)
    at binding$5.WidgetsFlutterBinding.new.[_handlePointerEvent] (http://localhost:62775/packages/flutter/src/gestures/binding.dart.lib.js:257:14)
    at binding$5.WidgetsFlutterBinding.new.[_flushPointerEventQueue] (http://localhost:62775/packages/flutter/src/gestures/binding.dart.lib.js:229:35)
    at binding$5.WidgetsFlutterBinding.new.[_handlePointerDataPacket] (http://localhost:62775/packages/flutter/src/gestures/binding.dart.lib.js:213:65)
    at Object._invoke1 (http://localhost:62775/dart_sdk.js:175453:7)
    at _engine.EngineWindow.new.invokeOnPointerDataPacket (http://localhost:62775/dart_sdk.js:171307:15)
    at _engine.PointerBinding.__.[_onPointerData] (http://localhost:62775/dart_sdk.js:158211:24)
    at http://localhost:62775/dart_sdk.js:158598:26
    at http://localhost:62775/dart_sdk.js:158557:16
    at http://localhost:62775/dart_sdk.js:158310:11

the pdf containe chinese can't be printed

Hello,I using the code like
#3
you give me.
It can generate chinese in pdf but I can't be printed.
this is open in pdf
image
this is prview before print
image
It can only print the symbol ","

pdf image

i realize when try to place an image it crashes when i take out the code it works fine. is there something i am missing?

PdfImage image = PdfBitmap.fromBase64String('R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7');

//Draws the image to the PDF page
page.graphics.drawImage(image, Rect.fromLTWH(pageSize.width - 30, pageSize.height - 70, 0, 0));

Incompatibility with the test plugin

Good afternoon

Guys my question is very simple is there a provision for updating the dependency used in syncfusion_flutter_corre called pedantic?

I'm asking this because version 18.3.40 is incompatible with the latest version of the test plugin so I can't get both to work as per the message below:

Because test> = 1.16.0-nullsafety.5 depends on pedantic> = 1.10.0-nullsafety <1.10.0 and syncfusion_flutter_core 18.3.40 depends on pedantic> = 1.9.0 <1.9.9, test> = 1.16.0- nullsafety.5 is incompatible with syncfusion_flutter_core 18.3.40.

So, because app depends on both syncfusion_flutter_core 18.3.40 and test 1.16.0-nullsafety.5, version solving failed.
pub get failed (1; So, because app depends on both syncfusion_flutter_core 18.3.40 and test 1.16.0-nullsafety.5, version solving failed.)

[syncfusion_flutter_datepicker] specifying image in cellDecoration property of DateRangePickerMonthCellStyle gives error

I am facing an issue when using the datepicker package.
If I try to give an image to the cell decoration property, i get the following error.

"The following assertion was thrown during paint():
'package:flutter/src/painting/box_decoration.dart': Failed assertion: line 378 pos 12: 'onChanged != null || image == null': is not true."

This is how I am using it -
`
SfDateRangePicker(
minDate: DateTime(DateTime.now().year, DateTime.now().month),
maxDate: DateTime(DateTime.now().year, DateTime.now().month + 1, 0),
selectionTextStyle: TextStyle(color: AppColor.white),
monthViewSettings: DateRangePickerMonthViewSettings(
specialDates: leaveDays,

                        ),
                        monthCellStyle: DateRangePickerMonthCellStyle(
                          cellDecoration: BoxDecoration(
                            image: DecorationImage(
                              image: AssetImage('assets/icons/icon.png'),
                            ),
                          ),
                          specialDatesDecoration: BoxDecoration(
                            color: AppColor.saffron,
                            border: Border.all(color: AppColor.saffron, width: 1),
                            shape: BoxShape.circle,
                          ),
                        ),
                      ),

`

flutter doctor output -

[✓] Flutter (Channel stable, 1.22.1, on Mac OS X 10.15.6 19G2021, locale en-IN)
• Flutter version 1.22.1 at /Users/vaibhav/Documents/flutter
• Framework revision f30b7f4db9 (2 weeks ago), 2020-10-08 10:06:30 -0700
• Engine revision 75bef9f6c8
• Dart version 2.10.1

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
• Android SDK at /Users/vaibhav/Library/Android/sdk
• Platform android-30, build-tools 30.0.1
• ANDROID_HOME = /Users/vaibhav/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.0, Build version 12A7209
• CocoaPods version 1.9.3

[✓] Android Studio (version 4.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 46.0.2
• Dart plugin version 193.7361
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.50.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.15.1

[✓] Connected device (2 available)
• Android SDK built for x86 (mobile) • emulator-5554 • android-x86 • Android 7.1.1 (API 25) (emulator)
• iPhone 11 (mobile) • D1539A6B-139F-4F52-A9E9-6A051D602C62 • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-0 (simulator)

• No issues found!

[SfCircularChart] [Feature Request] DoughnutSeries Decoration

I want to be able to change decoration of DoughnutSeries. We currently can change color,text and percantage. I need to be able to add boxshadow and gradient into chart.

 final List<ChartData> chartData = [
    ChartData('LIVE', 25, Color(0x0ff7262E4)),
    ChartData('MESAJ', 38, Color(0x0ffdce1e8)),
    ChartData('VIDEO', 54, Color(0x0ffADB3FF)),
  ];
DoughnutSeries<ChartData, String>(
          dataSource: chartData,
          
          pointColorMapper: (ChartData data, _) => data.color,
          xValueMapper: (ChartData data, _) => data.name,
          yValueMapper: (ChartData data, _) => data.percentage,
          dataLabelMapper: (ChartData data, _) => data.name,)

[web] SfCartesianChart MajorGridLines dashArray not working on web

SfCartesianChart(
              plotAreaBorderWidth: 0,
              primaryXAxis: CategoryAxis(
                isVisible: true,
                labelStyle: TextStyle(color: Colors.black.withOpacity(0.0)),
                majorGridLines: MajorGridLines(width: 0),
                majorTickLines: MajorTickLines(width: 0),
                axisLine: AxisLine(color: Colors.black, width: 2),
              ),
              primaryYAxis: NumericAxis(
                isVisible: true,
                crossesAt: 0,
                numberFormat: chartYLabelFormat,
                labelStyle: chartLabel,
                axisLine: AxisLine(width: 0),
                majorGridLines: MajorGridLines(width: 2,
                    dashArray: <double>[2,2]),
                majorTickLines: MajorTickLines(
                  width: 0,
                ),
              ),
              trackballBehavior: TrackballBehavior(
                  enable: true,
                  tooltipSettings: InteractiveTooltip(
                      format: "point.x:  point.y", color: Colors.black)),
              series: getGradientAreaSeries(),
            ),

on mobile prodcues:

Screenshot 2020-10-17 at 01 21 36

on web produces:

Screenshot 2020-10-17 at 01 21 56

SFGrid Scrolling behavior

Whenever i am scrolling vertically or horizontally then below line is showing but after few seconds it is hiding.. in scrolling it should not hide

image

Incompatible dependencies

I'm trying to upgrade Flutter version on my project, but looks like that there are incompatible dependencies on the project:

Because test >=1.16.0-nullsafety.5 depends on pedantic >=1.10.0-nullsafety <1.10.0 and syncfusion_flutter_core >=18.2.54 depends on pedantic >=1.9.0 <1.9.9, test >=1.16.0-nullsafety.5 is incompatible with syncfusion_flutter_core >=18.2.54.

How could I solve that?

add BorderRaduisMapper to ChartSeries

I have a use case where i need to check the current value before creating the BorderRaduis and went through the documentation but i couldn't find a solution for it.
so maybe adding a borderRaduisMapper : (T point)=> BorderRaduis to the ChartSeries will make it easy to customize it.

Kind regards!

Flutter Charts | User experience issue

When the user on a mobile device is using their finger to navigate the track ball, if their finger leaves the graph slightly the trackball disapears. On IOS in the stock app the user can start in the graph but then leave the graph and the trackball will still follow their finger.

Other charting libraries for flutter have this by default it is sad to see that this does not support this

[syncfusion_flutter_charts] NoSuchMethodError in SfCircularChartState

Crash in syncfusion_flutter_charts 18.3.38
NoSuchMethodError: The getter 'iterator' was called on null. Receiver: null Tried calling: iterator. Error thrown Instance of 'ErrorDescription'. _GrowableList.addAll

Crashed: pool-16-thread-6
       at _GrowableList.addAll(_GrowableList.java)
       at SfCircularChartState._createAndUpdateSeriesRenderer(SfCircularChartState.java:808)
       at SfCircularChartState.didUpdateWidget(SfCircularChartState.java:627)
       at StatefulElement.update(StatefulElement.java:4815)
       at Element.updateChild(Element.java:3314)
       at ComponentElement.performRebuild(ComponentElement.java:4652)

'<optimized out>': is not true.

I'm trying to style the cells in my SfDataGrid with this code:

SfDataGridTheme( data: SfDataGridThemeData( headerStyle: DataGridHeaderCellStyle( backgroundColor: Colors.black54, textStyle: TextStyle( color: Colors.white, fontFamily: 'HNMed', fontSize: 12.sp, ), ), cellStyle: DataGridCellStyle( textStyle: TextStyle( fontFamily: 'HNMed', ), ), ), child: SfDataGrid(....), ),

The above code throws this error:

|I/flutter (12465): ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════ I/flutter (12465): The following assertion was thrown during paint(): I/flutter (12465): 'dart:ui/painting.dart': Failed assertion: line 1147: '<optimized out>': is not true. I/flutter (12465): The relevant error-causing widget was: I/flutter (12465): _VirtualizingCellsRenderObjectWidget-[DataRow#88901] I/flutter (12465): file:///D:/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_datagrid-18.3.38-beta/lib/src/control/cell_control/virtualizing_cells_widget.dart:22:12 I/flutter (12465): When the exception was thrown, this was the stack: I/flutter (12465): #2 Paint.color= (dart:ui/painting.dart:1147:12) I/flutter (12465): #3 _RenderVirtualizingCellsWidget._drawRowBackground (package:syncfusion_flutter_datagrid/src/control/cell_control/virtualizing_cells_widget.dart:204:35) I/flutter (12465): #4 _RenderVirtualizingCellsWidget.paint (package:syncfusion_flutter_datagrid/src/control/cell_control/virtualizing_cells_widget.dart:328:5) I/flutter (12465): #5 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2311:7)I/flutter (12465): #6 PaintingContext._repaintCompositedChild (package:flutter/src/rendering/object.dart:140:11) I/flutter (12465): #7 PaintingContext.repaintCompositedChild (package:flutter/src/rendering/object.dart:100:5) I/flutter (12465): #8 PipelineOwner.flushPaint (package:flutter/src/rendering/object.dart:978:29) I/flutter (12465): #9 RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:438:19) I/flutter (12465): #10 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:914:13) I/flutter (12465): #11 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:302:5) I/flutter (12465): #12 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1117:15) I/flutter (12465): #13 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1055:9) I/flutter (12465): #14 SchedulerBinding.scheduleWarmUpFrame.<anonymous closure> (package:flutter/src/scheduler/binding.dart:864:7) I/flutter (12465): (elided 6 frames from class _AssertionError, class _RawReceivePortImpl, class _Timer, and dart:async-patch) I/flutter (12465): The following RenderObject was being processed when the exception was fired: _RenderVirtualizingCellsWidget#b8516: I/flutter (12465): needs compositing I/flutter (12465): creator: _VirtualizingCellsRenderObjectWidget-[DataRow#88901] ← I/flutter (12465): _VirtualizingCellsWidget-[DataRow#88901] ← _VisualContainerRenderObjectWidget ← _VisualContainer ← I/flutter (12465): ConstrainedBox ← _SingleChildViewport ← IgnorePointer-[GlobalKey#50be6] ← Semantics ←I/flutter (12465): _PointerListener ← Listener ← _GestureSemantics ← I/flutter (12465): RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#09b13] ← ⋯ I/flutter (12465): parentData: offset=Offset(0.0, 245.0) (can use size) I/flutter (12465): constraints: BoxConstraints(w=457.1, h=49.0) I/flutter (12465): layer: OffsetLayer#858a2 I/flutter (12465): size: Size(457.1, 49.0) I/flutter (12465): This RenderObject had the following descendants (showing up to depth 5): I/flutter (12465): child 1: _RenderGridCell#8a5c7 I/flutter (12465): child: RenderSemanticsAnnotations#7742b I/flutter (12465): child: RenderSemanticsGestureHandler#cd669 I/flutter (12465): child: RenderPointerListener#7ed6d I/flutter (12465): child: RenderDecoratedBox#ba529 I/flutter (12465): child 2: _RenderGridCell#a982f I/flutter (12465): child: RenderSemanticsAnnotations#1e823 I/flutter (12465): child: RenderSemanticsGestureHandler#1bf4c I/flutter (12465): child: RenderPointerListener#17434 I/flutter (12465): child: RenderDecoratedBox#b0207 I/flutter (12465): child 3: _RenderGridCell#aca11 I/flutter (12465): child: RenderSemanticsAnnotations#157c1 I/flutter (12465): child: RenderSemanticsGestureHandler#73e7d I/flutter (12465): child: RenderPointerListener#d4c76 I/flutter (12465): child: RenderDecoratedBox#4e7ca I/flutter (12465): ════════════════════════════════════════════════════════════════════════════════════════════════════ I/flutter (12465): Another exception was thrown: 'dart:ui/painting.dart': Failed assertion: line 1147: '<optimized out>': is not true. I/flutter (12465): Another exception was thrown: 'dart:ui/painting.dart': Failed assertion: line 1147: '<optimized out>': is not true. I/flutter (12465): Another exception was thrown: 'dart:ui/painting.dart': Failed assertion: line 1147: '<optimized out>': is not true. I/flutter (12465): Another exception was thrown: 'dart:ui/painting.dart': Failed assertion: line 1147: '<optimized out>': is not true. I/flutter (12465): Another exception was thrown: 'dart:ui/painting.dart': Failed assertion: line 1147: '<optimized out>': is not true.

Only when I add a cellStyle property the exception is thrown. But when I remove the property, it works.

HiloOpenCloseSeries in chart

i think there is a bug
if low and high and open and close are the same equal it dose not show anything
i hope u can fix this.
thank u for ur awosoome project.

Enlarge touch to resize calendar schedule

Hi all, in the google calendar, the users can touch to resize the calendar schedule.
Eg: We can increase or decrease hours when touching and enlarge the schedule.
Would you please add the feature on syncfusion calendar.
Thank you very much, your calendar is nice and if we have the feature that i told, it will be nicer.

SfCartesianChart (Multiple LineSeries display errors)

  • flutter version any
  • syncfusion_flutter_charts : ^18.3.40 or other version

The display error is as follows

image

Code

import 'package:flutter/material.dart';
import 'package:syncfusion_flutter_charts/charts.dart';

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

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

class TargetCacheRateChart extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    List<TestEntity> list = [
      TestEntity("10-01", 25.4),
      TestEntity("10-02", 26.4),
      TestEntity("10-03", 26.8),
      // TestEntity("10-04", 25.6),
      // TestEntity("10-05", 24.3),
      // TestEntity("10-06", 25.6),
      // TestEntity("10-07", 25.8),
      TestEntity("10-08", 24.6),
      TestEntity("10-09", 25.6),
      TestEntity("10-10", 26.6),
      TestEntity("10-11", 26.4),
      TestEntity("10-12", 26.7),
      TestEntity("10-13", 26.3),
      TestEntity("10-14", 26.7),
    ];

    List<TestEntity> list2 = [
      TestEntity("10-01", 35.4),
      TestEntity("10-02", 36.4),
      TestEntity("10-03", 36.8),
      TestEntity("10-04", 35.6),
      TestEntity("10-05", 14.3),
      TestEntity("10-06", 35.6),
      TestEntity("10-07", 45.8),
      TestEntity("10-08", 34.6),
      TestEntity("10-09", 35.6),
      TestEntity("10-10", 36.6),
      // TestEntity("10-11", 26.4),
      // TestEntity("10-12", 26.7),
      // TestEntity("10-13", 26.3),
      // TestEntity("10-14", 26.7),
    ];

    List<LineSeries> buildCacheRate = [
      LineSeries<TestEntity, String>(
          name: "line1",
          dataSource: list,
          xValueMapper: (TestEntity entity, _) => entity.date,
          yValueMapper: (TestEntity entity, _) => entity.y),
      LineSeries<TestEntity, String>(
          name: "line2",
          dataSource: list2,
          xValueMapper: (TestEntity entity, _) => entity.date,
          yValueMapper: (TestEntity entity, _) => entity.y),
    ];

    return Container(
        child: SfCartesianChart(
            plotAreaBorderWidth: 0,
            primaryXAxis: CategoryAxis(
              majorGridLines: MajorGridLines(width: 0),
              axisLine: AxisLine(width: 0),
            ),
            palette: [
              new Color(0xFF5B8FF9),
              new Color(0xFFE8684A),
            ],
            primaryYAxis: NumericAxis(
                axisLine: AxisLine(width: 0),
                labelFormat: '{value} %',
                majorTickLines: MajorTickLines(size: 0)),
            legend: new Legend(isVisible: true),
            series: buildCacheRate));
  }
}

class TestEntity {
  String date;
  double y;

  TestEntity(this.date, this.y);
}

Horizontal veiw

is this package support horizontal veiw? or will you support horizontal view?

How i can apply license key to my flutter application

Hi ,

Firstly thank you for this elegant chart library. I registered your system with Community license programme. I can see my license key on dashboard panel but i did not find any documentation about how i can apply this license on my flutter application. Do I need to take action on my flutter application with this license key ?

Thanks.

syncfusion_flutter_charts library is having versioning issues

Library version - syncfusion_flutter_charts: ^18.3.44

The current Dart SDK version is 2.10.2.

Because every version of flutter_test from sdk depends on test_api 0.2.19-nullsafety.2 and test >=1.15.3 <1.16.0-nullsafety depends on test_api 0.2.18, flutter_test from sdk is incompatible with test >=1.15.3 <1.16.0-nullsafety.
Because test >=1.16.0-nullsafety <1.16.0-nullsafety.5 requires SDK version >=2.10.0-0 <2.10.0 and test >=1.16.0-nullsafety.5 depends on pedantic >=1.10.0-nullsafety <1.10.0, test >=1.16.0-nullsafety requires pedantic >=1.10.0-nullsafety <1.10.0.
Thus, if flutter_test any from sdk and test >=1.15.3 then pedantic >=1.10.0-nullsafety <1.10.0.
And because syncfusion_flutter_core >=18.2.54 depends on pedantic >=1.9.0 <1.9.9, one of flutter_test any from sdk or test >=1.15.3 or syncfusion_flutter_core >=18.2.54 must be false.
And because stack_app depends on syncfusion_flutter_charts ^18.3.44 which depends on syncfusion_flutter_core ^18.3.44, flutter_test from sdk is incompatible with test >=1.15.3.
So, because stack_app depends on both flutter_test any from sdk and test ^1.15.4, version solving failed.
pub get failed (1; So, because stack_app depends on both flutter_test any from sdk and test ^1.15.4, version solving failed.)
Process finished with exit code 1

Here is the output of flutter doctor -v

$ flutter doctor -v
[√] Flutter (Channel stable, 1.22.2, on Microsoft Windows [Version 10.0.19041.572], locale en-US)
    • Flutter version 1.22.2 at C:\Users\yash\flutter
    • Framework revision 84f3d28555 (2 weeks ago), 2020-10-15 16:26:19 -0700
    • Engine revision b8752bbfff
    • Dart version 2.10.2


[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at C:\Users\yash\AppData\Local\Android\Sdk
    • Platform android-30, build-tools 30.0.2
    • ANDROID_HOME = C:\Users\yash\AppData\Local\Android\Sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[√] Android Studio (version 4.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin installed
    • Dart plugin version 193.7547
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] VS Code (version 1.50.1)
    • VS Code at C:\Users\yash\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.15.1

syncfusion_flutter_datagrid cell textAligment

I have seen when we showing data cell
cellStyle: DataGridCellStyle(
textStyle: TextStyle(fontSize: 10,),)
aligment of Text is missing please add Text Aligment its by default aligment left is showing

center, right etc is not showing just pass aligment params inside DataGridCellStyle() constructor

Flutter Charts - Scrolling Doesnt work

When you try scrolling on the graph to scroll down the page, the scrolling wont work when Crosshair is enabled

CrosshairBehavior(
                enable: true,)

. Which is good for some cases, and bad for others.
The long press activation method should allow users to easily scroll down when the crosshair has not been pressed for a long time.

Let me know if you need any more information.

Black sheet error

Hi, I just start working with this package and seems to be a great work. However, after updating a few cell with app and asking to save the on progress data to a sheet I never get the task done. The result is always a blank sheet.

Currently II'm developing an app for desktop with Flutter. I had no intention to build mobile versions for this app.

I'm working on macOS but have have easy on switching to any other OS. Here's the snippet from wen I try to sae the data:

/// Save workbook data to a file
  void save(String directoryPath, List<CodeModel> validatedCodes) {
    final sheet = _workbook.worksheets[0];

    var globalStyle = _workbook.styles.add('style');
    globalStyle.backColor = '#37D8E9';
    globalStyle.fontName = 'Times New Roman';
    globalStyle.fontSize = 20;
    globalStyle.fontColor = '#C67878';
    globalStyle.italic = true;
    globalStyle.bold = true;
    globalStyle.underline = true;
    globalStyle.wrapText = true;
    globalStyle.hAlign = HAlignType.left;
    globalStyle.vAlign = VAlignType.bottom;
    globalStyle.rotation = 90;
    globalStyle.borders.all.color = '#9954CC';

    for (int row = 1; row == validatedCodes.length; row++) {
      for (int column = 1; column == 4; column++) {
        sheet.getRangeByIndex(column, row).cellStyle = globalStyle;
        sheet.getRangeByIndex(column, row).setText('Hello world');
      }
    }

    List<int> bytes = _workbook.saveAsStream();
    File(join(directoryPath, 'validated-codes.xlsx')).writeAsBytes(bytes);

    //Dispose the workbook.
    _workbook.dispose();
  }

Here is the blank sheet result:

Screen Shot 2020-10-14 at 16 40 23

flutter doctor -v

[✓] Flutter (Channel master, 1.23.0-8.0.pre.27, on Mac OS X 10.15.6 19G2021 x86_64, locale en-BR)
    • Flutter version 1.23.0-8.0.pre.27 at /opt/flutter
    • Framework revision 8db31a556b (2 weeks ago), 2020-09-28 14:32:00 +0200
    • Engine revision 3a73d073c8
    • Dart version 2.11.0 (build 2.11.0-161.0.dev)

 
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/rafael/Library/Android/sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.0.1, Build version 12A7300
    • CocoaPods version 1.9.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 48.1.2
    • Dart plugin version 193.7547
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio 2.app/Contents
    • Flutter plugin version 48.1.2
    • Dart plugin version 193.7547
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] IntelliJ IDEA Community Edition (version 2020.2.2)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin installed
    • Dart plugin version 202.7319.5

[✓] Connected device (3 available)
    • macOS (desktop)  • macos      • darwin-x64     • Mac OS X 10.15.6 19G2021 x86_64
    • Web Server (web) • web-server • web-javascript • Flutter Tools
    • Chrome (web)     • chrome     • web-javascript • Google Chrome 85.0.4183.121

• No issues found!

[Calendar] TypeErrorImpl thrown by gesture when clicking on appointment in monthview

Flutter Calendar throws a TypeErrorImpl exception when clicking on appointment in monthview with custom appointments.
Using Flutter Web on beta channel and syncfusion_flutter_calendar: ^18.3.44

════════ Exception caught by gesture ═══════════════════════════════════════════
The following TypeErrorImpl was thrown while handling a gesture:
Expected a value of type 'Appointment', but got one of type 'Meeting'

When the exception was thrown, this was the stack
dart-sdk/lib/internal/js_dev_runtime/private/ddc_runtime/errors.dart 216:49 throw
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 64:3 castError
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 442:10 cast
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/types.dart 420:9 as
packages/syncfusion_flutter_calendar/src/calendar/views/calendar_view.dart 1411:59 [_handleTouchOnMonthView]
...
Handler: "onTapUp"
Recognizer: TapGestureRecognizer#148a5
debugOwner: GestureDetector
state: ready
won arena
finalPosition: Offset(142.0, 163.0)
finalLocalPosition: Offset(137.0, 67.0)
button: 1
sent tap down
════════════════════════════════════════════════════════════════════════════════

Source:
import 'package:flutter/material.dart';
import 'package:syncfusion_flutter_calendar/calendar.dart';

class CalendarScreen extends StatefulWidget {
const CalendarScreen({Key key}) : super(key: key);
@OverRide
_CalendarScreenState createState() => _CalendarScreenState();
}

MeetingDataSource _events;

class _CalendarScreenState extends State {
CalendarView _calendarView;
List appointments;

@OverRide
void initState() {
_calendarView = CalendarView.month;
appointments = getMeetingDetails();
_events = MeetingDataSource(appointments);
super.initState();
}

@OverRide
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Calendar'),
),
body: Padding(
padding: const EdgeInsets.fromLTRB(5, 0, 5, 5),
child: getEventCalendar(_calendarView, _events, onCalendarTapped)));
}

SfCalendar getEventCalendar(
[CalendarView _calendarView,
CalendarDataSource _calendarDataSource,
CalendarTapCallback calendarTapCallback]) {
return SfCalendar(
allowViewNavigation: true,
view: _calendarView,
allowedViews: [
CalendarView.day,
CalendarView.week,
CalendarView.month,
CalendarView.schedule,
],
dataSource: _calendarDataSource,
onTap: calendarTapCallback,
initialDisplayDate: DateTime(DateTime.now().year, DateTime.now().month,
DateTime.now().day, 0, 0, 0),
monthViewSettings: MonthViewSettings(
appointmentDisplayMode: MonthAppointmentDisplayMode.appointment,
),
);
}

void onCalendarViewChange(String value) {
if (value == 'Day') {
_calendarView = CalendarView.day;
} else if (value == 'Week') {
_calendarView = CalendarView.week;
} else if (value == 'Work week') {
_calendarView = CalendarView.workWeek;
} else if (value == 'Month') {
_calendarView = CalendarView.month;
}
}

void onCalendarTapped(CalendarTapDetails details) {
if (details.targetElement != CalendarElement.calendarCell) {
return;
}
if (_calendarView == CalendarView.month) {
setState(() {
_calendarView = CalendarView.day;
});
}
}
}

List getMeetingDetails() {
final List _meetings = [];
_meetings.add(Meeting(
from: DateTime.now(),
to: DateTime.now().add(const Duration(hours: 1)),
eventName: "Test Meeting",
background: Colors.grey,
isAllDay: false,
));

return _meetings;
}

class Meeting {
Meeting({
this.eventName,
@required this.from,
@required this.to,
this.background,
this.isAllDay,
});

final String eventName;
final DateTime from;
final DateTime to;
final Color background;
final bool isAllDay;
}

class MeetingDataSource extends CalendarDataSource {
MeetingDataSource(List source) {
appointments = source;
}

@OverRide
DateTime getStartTime(int index) => appointments[index].from;

@OverRide
DateTime getEndTime(int index) => appointments[index].to;

@OverRide
String getSubject(int index) => appointments[index].eventName;

@OverRide
Color getColor(int index) => appointments[index].background;

@OverRide
bool isAllDay(int index) => appointments[index].isAllDay;
}

More flexible custom on agenda cell

I wonder why we don't permit an custom widget for agenda cell in calendar (month view). It's so restrictive now. Please add more this support beside wonderful things at present of calendar

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.