sci_mobile_components 1.0.5

  • Readme
  • Changelog
  • Example
  • Installing
  • 58

mobile_components #

A new Flutter package project.

Getting Started #

This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

1.0.5 #

  • Change calculation for batas atas dan bawah in chart components

1.0.4 #

  • Chart component now use recordDate instead of createdDate property
  • Chart component now use millisecondsSinceEpoch instead of day to render data along the x axis
  • Upgrade dependency version of fl_chart to ^0.10.0

1.0.3 #

  • Fix chart component bug where value doesn't render along the X axis

1.0.2 #

  • Remove notification button from SCIAppBar

1.0.1 #

  • Update Font & Icon size in SCIMenuItem
  • Update chart widget maximal value batas atas dan bawah

1.0.0 #

  • Initial release

example/lib/main.dart

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

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.

  @override
  Widget build(BuildContext context) {
    return SCIAppTheme(
      theme: SCIThemeModel(
        primaryColor: Color.fromRGBO(57, 151, 203, 1),
        secondaryColor: Color.fromRGBO(229, 144, 66, 1),
        lightColor: Color.fromRGBO(255, 255, 255, 1),
        darkColor: Color.fromRGBO(64, 64, 64, 1),
      ),
      child: MaterialApp(
        home: Scaffold(
          appBar: SCIAppBar(
            logo: Image.network('https://via.placeholder.com/140x40'),
            onSettingPressed: () {},
            onNotificationPressed: () {},
          ),
          body: Test(),
        ),
      ),
    );
  }
}

class Test extends StatelessWidget {
  final List<VitalSignData> data = [
    VitalSignData(recordDate: DateTime.now(), value: '60'),
    VitalSignData(
        recordDate: DateTime.now().add(Duration(days: 1)), value: '70'),
    VitalSignData(
        recordDate: DateTime.now().add(Duration(days: 2)), value: '65'),
  ];

  final List<VitalSignData> data1 = [
    VitalSignData(recordDate: DateTime.now(), value: '55'),
    VitalSignData(
        recordDate: DateTime.now().add(Duration(days: 1)), value: '50'),
    VitalSignData(
        recordDate: DateTime.now().add(Duration(days: 2)), value: '75'),
  ];

  @override
  Widget build(BuildContext context) {
    final List<Map<String, dynamic>> dataFromApi = [
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1589375400000)/",
        "RecordTime": "20:10",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200505-0015",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-13 20:10:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1589333400000)/",
        "RecordTime": "08:30",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200505-0015",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-13 08:30:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1589290664970)/",
        "RecordTime": "20:37",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200505-0015",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-12 20:37:44"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1589275800000)/",
        "RecordTime": "16:30",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200505-0015",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-12 16:30:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1589245800000)/",
        "RecordTime": "08:10",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200505-0015",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-12 08:10:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1589203800000)/",
        "RecordTime": "20:30",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200505-0015",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-11 20:30:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1589188200000)/",
        "RecordTime": "16:10",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200505-0015",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-11 16:10:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1589144700000)/",
        "RecordTime": "04:05",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200505-0015",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-11 04:05:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1589122800000)/",
        "RecordTime": "22:00",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200505-0015",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-10 22:00:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1589116200000)/",
        "RecordTime": "20:10",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200505-0015",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-10 20:10:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1589073300000)/",
        "RecordTime": "08:15",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200505-0015",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-10 08:15:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1589059800000)/",
        "RecordTime": "04:30",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200505-0015",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-10 04:30:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1589044800000)/",
        "RecordTime": "00:20",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200505-0015",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-10 00:20:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1589014860000)/",
        "RecordTime": "16:01",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200505-0015",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-09 16:01:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1589001300000)/",
        "RecordTime": "12:15",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200505-0015",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-09 12:15:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1588987800000)/",
        "RecordTime": "08:30",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200505-0015",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-09 08:30:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1588975200000)/",
        "RecordTime": "05:00",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200505-0015",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-09 05:00:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1588943100000)/",
        "RecordTime": "20:05",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200505-0015",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-08 20:05:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1588928700000)/",
        "RecordTime": "16:05",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200505-0015",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-08 16:05:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1588899900000)/",
        "RecordTime": "08:05",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200505-0015",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-08 08:05:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1588870860000)/",
        "RecordTime": "00:01",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200505-0015",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-08 00:01:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1588856700000)/",
        "RecordTime": "20:05",
        "QuestionAnswerNum": 21.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200505-0015",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-07 20:05:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1588843800000)/",
        "RecordTime": "16:30",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200505-0015",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-07 16:30:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1588828200000)/",
        "RecordTime": "12:10",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200505-0015",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-07 12:10:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1588798860000)/",
        "RecordTime": "04:01",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200505-0015",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-07 04:01:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1588784700000)/",
        "RecordTime": "00:05",
        "QuestionAnswerNum": 21.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200505-0015",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-07 00:05:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1588771800000)/",
        "RecordTime": "20:30",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200505-0015",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-06 20:30:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1588756200000)/",
        "RecordTime": "16:10",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200505-0015",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-06 16:10:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1588727340000)/",
        "RecordTime": "08:09",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200505-0015",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-06 08:09:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1588712700000)/",
        "RecordTime": "04:05",
        "QuestionAnswerNum": 22.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200505-0015",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-06 04:05:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1588699800000)/",
        "RecordTime": "00:30",
        "QuestionAnswerNum": 21.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200505-0015",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-06 00:30:00"
      },
      {
        "QuestionAnswerText": "20",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1588698000000)/",
        "RecordTime": "13:15",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200505-0015",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-06 00:00:00"
      },
      {
        "QuestionAnswerText": "20",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1588698000000)/",
        "RecordTime": "12:16",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200505-0015",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-06 00:00:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1588684800000)/",
        "RecordTime": "20:20",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200505-0015",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-05 20:20:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1588671900000)/",
        "RecordTime": "16:45",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200505-0015",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-05 16:45:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1588662960000)/",
        "RecordTime": "14:16",
        "QuestionAnswerNum": 24.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/OP/200505-0217",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-05 14:16:00"
      },
      {
        "QuestionAnswerText": "21",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1588611600000)/",
        "RecordTime": "17:57",
        "QuestionAnswerNum": 21.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200505-0015",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-05 00:00:00"
      },
      {
        "QuestionAnswerText": "0",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1588611600000)/",
        "RecordTime": "16:41",
        "QuestionAnswerNum": 0.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/OP/200505-0217",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-05 00:00:00"
      },
      {
        "QuestionAnswerText": "20",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1588611600000)/",
        "RecordTime": "08:43",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/OP/200505-0051",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-05-05 00:00:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1588147200000)/",
        "RecordTime": "15:00",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200428-0012",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-04-29 15:00:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1588122000000)/",
        "RecordTime": "08:00",
        "QuestionAnswerNum": 22.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200428-0012",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-04-29 08:00:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1588084200000)/",
        "RecordTime": "21:30",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200428-0012",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-04-28 21:30:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1588065300000)/",
        "RecordTime": "16:15",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200428-0012",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-04-28 16:15:00"
      },
      {
        "QuestionAnswerText": "",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1588061004093)/",
        "RecordTime": "15:03",
        "QuestionAnswerNum": 24.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/OP/200428-0222",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-04-28 15:03:24"
      },
      {
        "QuestionAnswerText": "20",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1588006800000)/",
        "RecordTime": "18:12",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/IP/200428-0012",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-04-28 00:00:00"
      },
      {
        "QuestionAnswerText": "22",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1588006800000)/",
        "RecordTime": "16:05",
        "QuestionAnswerNum": 22.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/OP/200428-0222",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-04-28 00:00:00"
      },
      {
        "QuestionAnswerText": "20",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1587488400000)/",
        "RecordTime": "09:22",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/OP/200422-0118",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-04-22 00:00:00"
      },
      {
        "QuestionAnswerText": "20",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1586192400000)/",
        "RecordTime": "07:59",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/OP/200407-0033",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-04-07 00:00:00"
      },
      {
        "QuestionAnswerText": "20",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1584378000000)/",
        "RecordTime": "09:26",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/OP/200317-0152",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-03-17 00:00:00"
      },
      {
        "QuestionAnswerText": "20",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1583168400000)/",
        "RecordTime": "07:52",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/OP/200303-0036",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-03-03 00:00:00"
      },
      {
        "QuestionAnswerText": "20",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1581267600000)/",
        "RecordTime": "08:30",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/OP/200210-0118",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-02-10 00:00:00"
      },
      {
        "QuestionAnswerText": "20",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1579539600000)/",
        "RecordTime": "08:50",
        "QuestionAnswerNum": 20.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/OP/200121-0088",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2020-01-21 00:00:00"
      },
      {
        "QuestionAnswerText": "18",
        "QuestionAnswerText2": "",
        "RecordDate": "/Date(1577638800000)/",
        "RecordTime": "08:31",
        "QuestionAnswerNum": 18.0000,
        "QuestionAnswerPrefix": "",
        "RegistrationNo": "REG/OP/191230-0081",
        "VitalSignID": "RESP",
        "VitalSignName": "Respiratory Rate",
        "VitalSignUnit": "rpm",
        "RecordDate_yMdHms": "2019-12-30 00:00:00"
      }
    ];

    final List<VitalSignData> data3 = dataFromApi
        .map(
          (i) => VitalSignData(
            createdDate: DateTime.parse('1990-01-01 00:00'),
            recordDate: DateTime.parse(i['RecordDate_yMdHms']),
            id: i['VitalSignID'],
            name: i['VitalSignName'],
            unit: i['VitalSignUnit'],
            value: i['QuestionAnswerNum'].toString(),
          ),
        )
        .toList();

    return Column(
      children: <Widget>[
        Container(
          padding: EdgeInsets.all(20.0),
          width: double.infinity,
          child: SCIRespChart(
            rate: data,
            ageInDay: 4500,
          ),
          // child: SCIBPChart(
          //   systolic: data,
          //   diastolic: data1,
          //   ageInDay: 30,
          // ),
        ),
        Expanded(
          child: ListView(
            children: [
              ListTile(
                title: Text('Systolic'),
                subtitle: Text('10-12-2019'),
                trailing: CircleAvatar(
                  child: Text('85'),
                  backgroundColor: Colors.redAccent,
                ),
              ),
              ListTile(
                title: Text('Systolic'),
                subtitle: Text('10-12-2019'),
                trailing: CircleAvatar(
                  child: Text('85'),
                  backgroundColor: Colors.redAccent,
                ),
              ),
            ],
          ),
        )
      ],
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  sci_mobile_components: ^1.0.5

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:sci_mobile_components/sci_mobile_components.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
30
Health:
Code health derived from static analysis. [more]
90
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
78
Overall:
Weighted score of the above. [more]
58
Learn more about scoring.

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

  • Dart: 2.8.4
  • pana: 0.13.13
  • Flutter: 1.17.5

Analysis suggestions

Package not compatible with SDK dart

because of import path [sci_mobile_components] that is in a package requiring null.

Health suggestions

Fix lib/src/components/SCITextField.dart. (-1.99 points)

Analysis of lib/src/components/SCITextField.dart reported 4 hints:

line 86 col 39: 'title' is deprecated and shouldn't be used. This is the term used in the 2014 version of material design. The modern term is headline6. This feature was deprecated after v1.13.8..

line 128 col 39: 'title' is deprecated and shouldn't be used. This is the term used in the 2014 version of material design. The modern term is headline6. This feature was deprecated after v1.13.8..

line 176 col 39: 'title' is deprecated and shouldn't be used. This is the term used in the 2014 version of material design. The modern term is headline6. This feature was deprecated after v1.13.8..

line 219 col 16: 'title' is deprecated and shouldn't be used. This is the term used in the 2014 version of material design. The modern term is headline6. This feature was deprecated after v1.13.8..

Fix lib/src/components/SCIBPChart.dart. (-1.49 points)

Analysis of lib/src/components/SCIBPChart.dart reported 3 hints:

line 73 col 58: 'headline' is deprecated and shouldn't be used. This is the term used in the 2014 version of material design. The modern term is headline5. This feature was deprecated after v1.13.8..

line 179 col 50: 'body2' is deprecated and shouldn't be used. This is the term used in the 2014 version of material design. The modern term is bodyText1. This feature was deprecated after v1.13.8..

line 190 col 50: 'body2' is deprecated and shouldn't be used. This is the term used in the 2014 version of material design. The modern term is bodyText1. This feature was deprecated after v1.13.8..

Fix lib/src/components/SCIHWChart.dart. (-1.49 points)

Analysis of lib/src/components/SCIHWChart.dart reported 3 hints:

line 27 col 58: 'headline' is deprecated and shouldn't be used. This is the term used in the 2014 version of material design. The modern term is headline5. This feature was deprecated after v1.13.8..

line 95 col 50: 'body2' is deprecated and shouldn't be used. This is the term used in the 2014 version of material design. The modern term is bodyText1. This feature was deprecated after v1.13.8..

line 106 col 50: 'body2' is deprecated and shouldn't be used. This is the term used in the 2014 version of material design. The modern term is bodyText1. This feature was deprecated after v1.13.8..

Fix additional 6 files with analysis or formatting issues. (-5 points)

Additional issues in the following files:

  • lib/src/components/SCIHRChart.dart (2 hints)
  • lib/src/components/SCIOption.dart (2 hints)
  • lib/src/components/SCIRespChart.dart (2 hints)
  • lib/src/components/SCITempChart.dart (2 hints)
  • lib/src/components/SCIDetailField.dart (1 hint)
  • lib/src/components/SCIMenuItem.dart (1 hint)

Maintenance suggestions

The package description is too short. (-17 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Homepage URL is insecure. (-5 points)

Update the homepage field and use a secure (https) URL.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.3.0 <3.0.0
fl_chart ^0.10.0 0.10.1
flutter 0.0.0
flutter_vector_icons ^0.2.1 0.2.1
Transitive dependencies
collection 1.14.12 1.14.13
equatable 1.2.0
meta 1.1.8
path_drawing 0.4.1
path_parsing 0.1.4
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8
Dev dependencies
flutter_test