sci_mobile_components 1.0.2 sci_mobile_components: ^1.0.2 copied to clipboard
Mobile UI component for SCI mobile project.
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,
),
),
],
),
)
],
);
}
}