charts_shamsi_flutter 1.0.1

  • Readme
  • Changelog
  • Example
  • Installing
  • new57

Flutter Shamsi Charting library #

pub package

Material Design data visualization library written natively in Dart. It converts Gregorian date time to Shamsi if Locale is 'fa'.

Supported charts #

See the online gallery.

Using the library #

The /example/ folder inside charts_flutter in the GitHub repo contains a full Flutter app with many demo examples.

1.0.1 #

  • update common version

1.0.0+6 #

  • update common version

1.0.0+5 #

  • update common version

1.0.0+4 #

  • update common version

1.0.0+3 #

  • update common version

1.0.0+2 #

  • update common version

1.0.0+1 #

  • update common version

1.0.0 #

  • init

example/lib/main.dart

// Copyright 2018 the Charts project authors. Please see the AUTHORS file
// for details.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

import 'package:flutter/material.dart';
import 'app_config.dart';
import 'home.dart';

/// The main gallery app widget.
class GalleryApp extends StatefulWidget {
  GalleryApp({Key key}) : super(key: key);

  @override
  GalleryAppState createState() => new GalleryAppState();
}

/// The main gallery app state.
///
/// Controls performance overlay, and instantiates a [Home] widget.
class GalleryAppState extends State<GalleryApp> {
  // Initialize app settings from the default configuration.
  bool _showPerformanceOverlay = defaultConfig.showPerformanceOverlay;

  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
        title: defaultConfig.appName,
        theme: defaultConfig.theme,
        showPerformanceOverlay: _showPerformanceOverlay,
        home: new Home(
          showPerformanceOverlay: _showPerformanceOverlay,
          onShowPerformanceOverlayChanged: (bool value) {
            setState(() {
              _showPerformanceOverlay = value;
            });
          },
        ));
  }
}

void main() {
  runApp(new GalleryApp());
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  charts_shamsi_flutter: ^1.0.1

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:charts_shamsi_flutter/charts_shamsi_flutter.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
15
Health:
Code health derived from static analysis. [more]
98
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
57
Learn more about scoring.

We analyzed this package on Jul 14, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.15
  • Flutter: 1.17.5

Analysis suggestions

Package not compatible with SDK dart

Because:

  • charts_shamsi_flutter that is a package requiring null.

Health suggestions

Fix lib/charts_shamsi_flutter.dart. (-0.50 points)

Analysis of lib/charts_shamsi_flutter.dart reported 1 hint:

line 123 col 9: The library 'package:charts_shamsi_common/charts_shamsi_common.dart' doesn't export a member with the shown name 'QuantumPalette'.

Fix lib/src/behaviors/a11y/domain_a11y_explore_behavior.dart. (-0.50 points)

Analysis of lib/src/behaviors/a11y/domain_a11y_explore_behavior.dart reported 1 hint:

line 96 col 41: Avoid using braces in interpolation when not needed.

Fix lib/src/behaviors/legend/legend_entry_layout.dart. (-0.50 points)

Analysis of lib/src/behaviors/legend/legend_entry_layout.dart reported 1 hint:

line 133 col 45: 'body1' is deprecated and shouldn't be used. This is the term used in the 2014 version of material design. The modern term is bodyText2. This feature was deprecated after v1.13.8..

Fix additional 10 files with analysis or formatting issues. (-0.50 points)

Additional issues in the following files:

  • lib/src/behaviors/slider/slider.dart (1 hint)
  • lib/src/behaviors/legend/legend.dart (Run flutter format to format lib/src/behaviors/legend/legend.dart.)
  • lib/src/canvas/circle_sector_painter.dart (Run flutter format to format lib/src/canvas/circle_sector_painter.dart.)
  • lib/src/canvas/line_painter.dart (Run flutter format to format lib/src/canvas/line_painter.dart.)
  • lib/src/canvas/pie_painter.dart (Run flutter format to format lib/src/canvas/pie_painter.dart.)
  • lib/src/canvas/point_painter.dart (Run flutter format to format lib/src/canvas/point_painter.dart.)
  • lib/src/canvas/polygon_painter.dart (Run flutter format to format lib/src/canvas/polygon_painter.dart.)
  • lib/src/line_style.dart (Run flutter format to format lib/src/line_style.dart.)
  • lib/src/text_style.dart (Run flutter format to format lib/src/text_style.dart.)
  • lib/src/util/color.dart (Run flutter format to format lib/src/util/color.dart.)

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.23.0 <3.0.0
charts_shamsi_common ^1.0.1 1.0.1
collection ^1.14.5 1.14.12 1.14.13
flutter 0.0.0
intl >=0.15.2 <0.17.0 0.16.1
logging ^0.11.4 0.11.4
meta ^1.1.1 1.1.8 1.2.2
Transitive dependencies
path 1.7.0
shamsi_date 0.8.1
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8 2.1.0-nullsafety
Dev dependencies
flutter_test
mockito any
test ^1.3.0