sci_mobile_components 1.0.1 copy "sci_mobile_components: ^1.0.1" to clipboard
sci_mobile_components: ^1.0.1 copied to clipboard

outdated

Mobile UI component for SCI mobile project.

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: Column(
            children: [
              SCIDetailField(
                title: 'Testing',
              ),
            ],
          ),
        ),
      ),
    );
  }
}

class Test extends StatelessWidget {
  final List<VitalSignData> hd = [
    VitalSignData(
      recordDate: DateTime(2019, 12, 1, 8, 0),
      createdDate: DateTime(2019, 12, 1, 11, 30),
      id: 'HEIGHT',
      name: 'Height',
      value: '168',
      unit: 'cm',
    ),
    VitalSignData(
      recordDate: DateTime(2019, 12, 2, 8, 0),
      createdDate: DateTime(2019, 12, 2, 11, 30),
      id: 'HEIGHT',
      name: 'Height',
      value: '168',
      unit: 'cm',
    ),
    VitalSignData(
      recordDate: DateTime(2019, 12, 3, 8, 0),
      createdDate: DateTime(2019, 12, 3, 11, 30),
      id: 'HEIGHT',
      name: 'Height',
      value: '168',
      unit: 'cm',
    ),
    VitalSignData(
      recordDate: DateTime(2019, 12, 4, 8, 0),
      createdDate: DateTime(2019, 12, 4, 11, 30),
      id: 'HEIGHT',
      name: 'Height',
      value: '169',
      unit: 'cm',
    ),
    VitalSignData(
      recordDate: DateTime(2019, 12, 5, 8, 0),
      createdDate: DateTime(2019, 12, 5, 11, 30),
      id: 'HEIGHT',
      name: 'Height',
      value: '169',
      unit: 'cm',
    ),
  ];

  final List<VitalSignData> wd = [
    VitalSignData(
      recordDate: DateTime(2019, 12, 1, 8, 0),
      createdDate: DateTime(2019, 12, 1, 11, 30),
      id: 'WEIGHT',
      name: 'Weight',
      value: '73',
      unit: 'kg',
    ),
    VitalSignData(
      recordDate: DateTime(2019, 12, 2, 8, 0),
      createdDate: DateTime(2019, 12, 2, 11, 30),
      id: 'WEIGHT',
      name: 'Weight',
      value: '73',
      unit: 'kg',
    ),
    VitalSignData(
      recordDate: DateTime(2019, 12, 3, 8, 0),
      createdDate: DateTime(2019, 12, 3, 11, 30),
      id: 'WEIGHT',
      name: 'Weight',
      value: '74',
      unit: 'kg',
    ),
    VitalSignData(
      recordDate: DateTime(2019, 12, 4, 8, 0),
      createdDate: DateTime(2019, 12, 4, 11, 30),
      id: 'WEIGHT',
      name: 'Weight',
      value: '72',
      unit: 'kg',
    ),
    VitalSignData(
      recordDate: DateTime(2019, 12, 5, 8, 0),
      createdDate: DateTime(2019, 12, 5, 11, 30),
      id: 'WEIGHT',
      name: 'Weight',
      value: '72',
      unit: 'kg',
    ),
  ];

  @override
  Widget build(BuildContext context) {
    return Column(
      children: <Widget>[
        Container(
          padding: EdgeInsets.all(20.0),
          width: double.infinity,
          child: SCIHWChart(
            weight: wd,
            height: hd,
          ),
        ),
        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,
                ),
              ),
            ],
          ),
        )
      ],
    );
  }
}
0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

Mobile UI component for SCI mobile project.

Homepage

License

unknown (LICENSE)

Dependencies

fl_chart, flutter, flutter_vector_icons

More

Packages that depend on sci_mobile_components