updates
parent
abcf82346e
commit
b45cbbcf29
@ -1,3 +1,3 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
final Color secondaryColor = Colors.red[800];
|
final Color? secondaryColor = Colors.red[800];
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
class VidaPlusProjectListModel {
|
||||||
|
int projectID;
|
||||||
|
|
||||||
|
VidaPlusProjectListModel({this.projectID});
|
||||||
|
|
||||||
|
VidaPlusProjectListModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
projectID = json['ProjectID'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['ProjectID'] = this.projectID;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
class AncillaryOrdersProcedureList {
|
||||||
|
int procedureID;
|
||||||
|
String procedureDescription;
|
||||||
|
|
||||||
|
AncillaryOrdersProcedureList({this.procedureID, this.procedureDescription});
|
||||||
|
|
||||||
|
AncillaryOrdersProcedureList.fromJson(Map<String, dynamic> json) {
|
||||||
|
procedureID = json['ProcedureID'];
|
||||||
|
procedureDescription = json['ProcedureDescription'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['ProcedureID'] = this.procedureID;
|
||||||
|
data['ProcedureDescription'] = this.procedureDescription;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,72 +1,72 @@
|
|||||||
import 'package:flutter/animation.dart';
|
// import 'package:flutter/animation.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
// import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
// import 'package:flutter/material.dart';
|
||||||
|
//
|
||||||
/// Custom switch widget
|
// /// Custom switch widget
|
||||||
/// [value] switch is active or not
|
// /// [value] switch is active or not
|
||||||
/// [onChanged] function to be executed after sometime
|
// /// [onChanged] function to be executed after sometime
|
||||||
/// [activeColor] color of active status
|
// /// [activeColor] color of active status
|
||||||
/// [inactiveColor] color of inactive status
|
// /// [inactiveColor] color of inactive status
|
||||||
class CustomSwitch extends StatefulWidget {
|
// class CustomSwitch extends StatefulWidget {
|
||||||
final bool value;
|
// final bool value;
|
||||||
final AsyncCallback onChanged;
|
// final AsyncCallback onChanged;
|
||||||
final Color activeColor;
|
// final Color activeColor;
|
||||||
final Color inactiveColor;
|
// final Color inactiveColor;
|
||||||
|
//
|
||||||
CustomSwitch({Key key, this.value, this.onChanged, this.activeColor, this.inactiveColor}) : super(key: key);
|
// CustomSwitch({Key key, this.value, this.onChanged, this.activeColor, this.inactiveColor}) : super(key: key);
|
||||||
|
//
|
||||||
@override
|
// @override
|
||||||
_CustomSwitchState createState() => _CustomSwitchState();
|
// _CustomSwitchState createState() => _CustomSwitchState();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
class _CustomSwitchState extends State<CustomSwitch> with SingleTickerProviderStateMixin {
|
// class _CustomSwitchState extends State<CustomSwitch> with SingleTickerProviderStateMixin {
|
||||||
Animation _circleAnimation;
|
// Animation _circleAnimation;
|
||||||
AnimationController _animationController;
|
// AnimationController _animationController;
|
||||||
|
//
|
||||||
@override
|
// @override
|
||||||
void initState() {
|
// void initState() {
|
||||||
super.initState();
|
// super.initState();
|
||||||
_animationController = AnimationController(vsync: this, duration: Duration(milliseconds: 500));
|
// _animationController = AnimationController(vsync: this, duration: Duration(milliseconds: 500));
|
||||||
_circleAnimation = Tween(begin: 0.0, end: 22.0).animate(CurvedAnimation(parent: _animationController, curve: Curves.easeOutQuint, reverseCurve: Curves.easeInQuint));
|
// _circleAnimation = Tween(begin: 0.0, end: 22.0).animate(CurvedAnimation(parent: _animationController, curve: Curves.easeOutQuint, reverseCurve: Curves.easeInQuint));
|
||||||
if (widget.value) _animationController.forward();
|
// if (widget.value) _animationController.forward();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@override
|
// @override
|
||||||
Widget build(BuildContext context) {
|
// Widget build(BuildContext context) {
|
||||||
return AnimatedBuilder(
|
// return AnimatedBuilder(
|
||||||
animation: _animationController,
|
// animation: _animationController,
|
||||||
builder: (context, child) {
|
// builder: (context, child) {
|
||||||
bool _switchStatus = _circleAnimation.status == AnimationStatus.dismissed || _circleAnimation.status == AnimationStatus.reverse;
|
// bool _switchStatus = _circleAnimation.status == AnimationStatus.dismissed || _circleAnimation.status == AnimationStatus.reverse;
|
||||||
return GestureDetector(
|
// return GestureDetector(
|
||||||
onTap: Feedback.wrapForTap(() async {
|
// onTap: Feedback.wrapForTap(() async {
|
||||||
if (widget.value) {
|
// if (widget.value) {
|
||||||
_animationController.reverse();
|
// _animationController.reverse();
|
||||||
} else {
|
// } else {
|
||||||
_animationController.forward();
|
// _animationController.forward();
|
||||||
}
|
// }
|
||||||
await widget.onChanged();
|
// await widget.onChanged();
|
||||||
}, context),
|
// }, context),
|
||||||
child: AnimatedContainer(
|
// child: AnimatedContainer(
|
||||||
duration: Duration(milliseconds: 200),
|
// duration: Duration(milliseconds: 200),
|
||||||
width: 50.0,
|
// width: 50.0,
|
||||||
height: 25.0,
|
// height: 25.0,
|
||||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.0), color: _switchStatus ? widget.inactiveColor : widget.activeColor),
|
// decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.0), color: _switchStatus ? widget.inactiveColor : widget.activeColor),
|
||||||
child: Padding(
|
// child: Padding(
|
||||||
padding: EdgeInsets.only(top: 4.0, bottom: 4.0, right: 6.0, left: 6.0),
|
// padding: EdgeInsets.only(top: 4.0, bottom: 4.0, right: 6.0, left: 6.0),
|
||||||
child: Row(
|
// child: Row(
|
||||||
children: <Widget>[
|
// children: <Widget>[
|
||||||
Container(width: _circleAnimation.value),
|
// Container(width: _circleAnimation.value),
|
||||||
Container(
|
// Container(
|
||||||
width: 16.0,
|
// width: 16.0,
|
||||||
height: 16.0,
|
// height: 16.0,
|
||||||
decoration: BoxDecoration(boxShadow: [BoxShadow(color: Colors.grey[800].withOpacity(0.15), offset: Offset(0, 4.0), blurRadius: 5.0)], shape: BoxShape.circle, color: Colors.white),
|
// decoration: BoxDecoration(boxShadow: [BoxShadow(color: Colors.grey[800].withOpacity(0.15), offset: Offset(0, 4.0), blurRadius: 5.0)], shape: BoxShape.circle, color: Colors.white),
|
||||||
)
|
// )
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
);
|
// );
|
||||||
},
|
// },
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|||||||
@ -1,26 +1,26 @@
|
|||||||
import 'package:diplomaticquarterapp/widgets/Buttons/button.dart';
|
// import 'package:diplomaticquarterapp/widgets/Buttons/button.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
// import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
// import 'package:flutter/material.dart';
|
||||||
|
//
|
||||||
class ButtonActions extends StatelessWidget {
|
// class ButtonActions extends StatelessWidget {
|
||||||
final VoidCallback onPositive;
|
// final VoidCallback onPositive;
|
||||||
|
//
|
||||||
const ButtonActions({
|
// const ButtonActions({
|
||||||
Key key,
|
// Key key,
|
||||||
@required this.onPositive,
|
// @required this.onPositive,
|
||||||
}) : super(key: key);
|
// }) : super(key: key);
|
||||||
|
//
|
||||||
@override
|
// @override
|
||||||
Widget build(BuildContext context) {
|
// Widget build(BuildContext context) {
|
||||||
return Container(
|
// return Container(
|
||||||
margin: EdgeInsets.only(bottom: 12.0),
|
// margin: EdgeInsets.only(bottom: 12.0),
|
||||||
child: FractionallySizedBox(
|
// child: FractionallySizedBox(
|
||||||
widthFactor: 0.6,
|
// widthFactor: 0.6,
|
||||||
child: Button(
|
// child: Button(
|
||||||
onTap: onPositive,
|
// onTap: onPositive,
|
||||||
label: "Confirm",
|
// label: "Confirm",
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue