bug fixes
parent
f6e0e1b0cd
commit
0ea66c4483
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,39 @@
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class GetActivityButton extends StatelessWidget {
|
||||
final value;
|
||||
GetActivityButton(this.value);
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: 120,
|
||||
padding: EdgeInsets.all(5),
|
||||
margin: EdgeInsets.all(5),
|
||||
height: 120,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.all(10),
|
||||
child: AppText(value.value.toString(),
|
||||
fontSize: 28, fontWeight: FontWeight.bold)),
|
||||
Expanded(
|
||||
child: AppText(
|
||||
value.kPIParameter,
|
||||
textOverflow: TextOverflow.clip,
|
||||
fontSize: 12,
|
||||
textAlign: TextAlign.center,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,69 @@
|
||||
import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class GetOutPatientStack extends StatelessWidget {
|
||||
final value;
|
||||
GetOutPatientStack(this.value);
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
value.summaryoptions
|
||||
.sort((Summaryoptions a, Summaryoptions b) => b.value - a.value);
|
||||
|
||||
var list = new List<Widget>();
|
||||
value.summaryoptions.forEach((result) =>
|
||||
{list.add(getStack(result, value.summaryoptions.first.value))});
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
Texts(
|
||||
value.kPIName,
|
||||
medium: true,
|
||||
),
|
||||
Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: list)
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
getStack(Summaryoptions value, max) {
|
||||
return Stack(children: [
|
||||
Container(
|
||||
height: 150,
|
||||
margin: EdgeInsets.all(5),
|
||||
width: 40,
|
||||
child: SizedBox(),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10), color: Colors.red[50]),
|
||||
),
|
||||
Positioned(
|
||||
bottom: 0,
|
||||
child: Container(
|
||||
child: SizedBox(),
|
||||
margin: EdgeInsets.all(5),
|
||||
padding: EdgeInsets.all(10),
|
||||
height: max != 0 ? (150 * value.value) / max : 0,
|
||||
width: 40,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
color: Colors.red[300]))),
|
||||
Container(
|
||||
height: 150,
|
||||
margin: EdgeInsets.only(left: 5, top: 5),
|
||||
padding: EdgeInsets.all(10),
|
||||
child: RotatedBox(
|
||||
quarterTurns: 1,
|
||||
child: Center(
|
||||
child: Align(
|
||||
child: AppText(
|
||||
value.kPIParameter + ' (' + value.value.toString() + ') ',
|
||||
fontSize: 10,
|
||||
textAlign: TextAlign.center,
|
||||
fontWeight: FontWeight.bold,
|
||||
)),
|
||||
),
|
||||
))
|
||||
]);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class RowCounts extends StatelessWidget {
|
||||
final name;
|
||||
final int count;
|
||||
final Color c;
|
||||
RowCounts(this.name, this.count, this.c);
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
children: [
|
||||
dot(c),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 5, bottom: 5),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
AppText(
|
||||
name,
|
||||
color: Colors.black,
|
||||
textAlign: TextAlign.center,
|
||||
fontSize: 12,
|
||||
textOverflow: TextOverflow.ellipsis,
|
||||
),
|
||||
AppText(
|
||||
' (' + count.toString() + ')',
|
||||
color: Colors.black,
|
||||
textAlign: TextAlign.center,
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.bold,
|
||||
)
|
||||
],
|
||||
)),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget dot(Color c) {
|
||||
return Container(
|
||||
padding: EdgeInsets.all(5.0),
|
||||
margin: EdgeInsets.all(5.0),
|
||||
decoration: BoxDecoration(color: c, shape: BoxShape.circle));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SwiperRoundedPagination extends StatelessWidget {
|
||||
final active;
|
||||
SwiperRoundedPagination(this.active);
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return active == true
|
||||
? Container(
|
||||
height: 5,
|
||||
width: 30,
|
||||
// margin: EdgeInsets.only(10),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(5), color: Colors.black),
|
||||
)
|
||||
: Container(
|
||||
height: 5,
|
||||
width: 8,
|
||||
margin: EdgeInsets.all(2),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10), color: Colors.grey));
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue