Get General instructions implemented
parent
0e4e285954
commit
9d2df00d87
@ -0,0 +1,52 @@
|
||||
class GetGeneralInstructions {
|
||||
int rowID;
|
||||
int iD;
|
||||
int projectID;
|
||||
String text;
|
||||
String textN;
|
||||
bool isActive;
|
||||
int createdBy;
|
||||
String createdOn;
|
||||
dynamic editedBy;
|
||||
dynamic editedOn;
|
||||
|
||||
GetGeneralInstructions(
|
||||
{this.rowID,
|
||||
this.iD,
|
||||
this.projectID,
|
||||
this.text,
|
||||
this.textN,
|
||||
this.isActive,
|
||||
this.createdBy,
|
||||
this.createdOn,
|
||||
this.editedBy,
|
||||
this.editedOn});
|
||||
|
||||
GetGeneralInstructions.fromJson(Map<String, dynamic> json) {
|
||||
rowID = json['RowID'];
|
||||
iD = json['ID'];
|
||||
projectID = json['ProjectID'];
|
||||
text = json['Text'];
|
||||
textN = json['TextN'];
|
||||
isActive = json['IsActive'];
|
||||
createdBy = json['CreatedBy'];
|
||||
createdOn = json['CreatedOn'];
|
||||
editedBy = json['EditedBy'];
|
||||
editedOn = json['EditedOn'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['RowID'] = this.rowID;
|
||||
data['ID'] = this.iD;
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['Text'] = this.text;
|
||||
data['TextN'] = this.textN;
|
||||
data['IsActive'] = this.isActive;
|
||||
data['CreatedBy'] = this.createdBy;
|
||||
data['CreatedOn'] = this.createdOn;
|
||||
data['EditedBy'] = this.editedBy;
|
||||
data['EditedOn'] = this.editedOn;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,93 @@
|
||||
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/models/InPatientServices/get_general_instructions_response_model.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class GeneralInstructions extends StatelessWidget {
|
||||
List<GetGeneralInstructions> getGeneralInstructionsList;
|
||||
ProjectViewModel projectViewModel;
|
||||
|
||||
GeneralInstructions({@required this.getGeneralInstructionsList});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
projectViewModel = Provider.of(context);
|
||||
return AppScaffold(
|
||||
isShowAppBar: true,
|
||||
isShowDecPage: false,
|
||||
showNewAppBarTitle: true,
|
||||
showNewAppBar: true,
|
||||
appBarTitle: TranslationBase.of(context).InPatientServicesHeader,
|
||||
body: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Text("General Instructions",
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xff2B353E),
|
||||
letterSpacing: -0.64,
|
||||
)),
|
||||
),
|
||||
Expanded(
|
||||
child: Container(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
child: Card(
|
||||
elevation: 0.0,
|
||||
margin: EdgeInsets.all(16),
|
||||
color: Colors.white,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
side: BorderSide(color: Colors.transparent, width: 0.0),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(16.0),
|
||||
child: Container(
|
||||
child: ListView.separated(
|
||||
itemCount: getGeneralInstructionsList.length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return Container(
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
child: SvgPicture.asset("assets/images/new-design/ionic-ios-checkmark-circle.svg"),
|
||||
),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.75,
|
||||
margin: EdgeInsets.only(left: 5.0, right: 5.0),
|
||||
child: Text(projectViewModel.isArabic ? getGeneralInstructionsList[index].textN : getGeneralInstructionsList[index].text,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xff2B353E),
|
||||
letterSpacing: -0.64,
|
||||
)),
|
||||
),
|
||||
],
|
||||
));
|
||||
},
|
||||
separatorBuilder: (BuildContext context, int index) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(left: 14, right: 14),
|
||||
child: mHeight(16.0),
|
||||
);
|
||||
},
|
||||
)),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
));
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue