first step from e-referral
parent
6caf7290be
commit
f1f3b6bd56
@ -0,0 +1,6 @@
|
|||||||
|
#Sun Sep 20 09:53:06 EEST 2020
|
||||||
|
distributionBase=GRADLE_USER_HOME
|
||||||
|
distributionPath=wrapper/dists
|
||||||
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
zipStorePath=wrapper/dists
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
|
||||||
@ -0,0 +1,172 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
##
|
||||||
|
## Gradle start up script for UN*X
|
||||||
|
##
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
# Attempt to set APP_HOME
|
||||||
|
# Resolve links: $0 may be a link
|
||||||
|
PRG="$0"
|
||||||
|
# Need this for relative symlinks.
|
||||||
|
while [ -h "$PRG" ] ; do
|
||||||
|
ls=`ls -ld "$PRG"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
PRG="$link"
|
||||||
|
else
|
||||||
|
PRG=`dirname "$PRG"`"/$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
SAVED="`pwd`"
|
||||||
|
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||||
|
APP_HOME="`pwd -P`"
|
||||||
|
cd "$SAVED" >/dev/null
|
||||||
|
|
||||||
|
APP_NAME="Gradle"
|
||||||
|
APP_BASE_NAME=`basename "$0"`
|
||||||
|
|
||||||
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
DEFAULT_JVM_OPTS=""
|
||||||
|
|
||||||
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
|
MAX_FD="maximum"
|
||||||
|
|
||||||
|
warn () {
|
||||||
|
echo "$*"
|
||||||
|
}
|
||||||
|
|
||||||
|
die () {
|
||||||
|
echo
|
||||||
|
echo "$*"
|
||||||
|
echo
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# OS specific support (must be 'true' or 'false').
|
||||||
|
cygwin=false
|
||||||
|
msys=false
|
||||||
|
darwin=false
|
||||||
|
nonstop=false
|
||||||
|
case "`uname`" in
|
||||||
|
CYGWIN* )
|
||||||
|
cygwin=true
|
||||||
|
;;
|
||||||
|
Darwin* )
|
||||||
|
darwin=true
|
||||||
|
;;
|
||||||
|
MINGW* )
|
||||||
|
msys=true
|
||||||
|
;;
|
||||||
|
NONSTOP* )
|
||||||
|
nonstop=true
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
|
# Determine the Java command to use to start the JVM.
|
||||||
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
|
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||||
|
else
|
||||||
|
JAVACMD="$JAVA_HOME/bin/java"
|
||||||
|
fi
|
||||||
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
|
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
JAVACMD="java"
|
||||||
|
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Increase the maximum file descriptors if we can.
|
||||||
|
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||||
|
MAX_FD_LIMIT=`ulimit -H -n`
|
||||||
|
if [ $? -eq 0 ] ; then
|
||||||
|
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||||
|
MAX_FD="$MAX_FD_LIMIT"
|
||||||
|
fi
|
||||||
|
ulimit -n $MAX_FD
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Darwin, add options to specify how the application appears in the dock
|
||||||
|
if $darwin; then
|
||||||
|
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Cygwin, switch paths to Windows format before running java
|
||||||
|
if $cygwin ; then
|
||||||
|
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||||
|
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||||
|
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||||
|
|
||||||
|
# We build the pattern for arguments to be converted via cygpath
|
||||||
|
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||||
|
SEP=""
|
||||||
|
for dir in $ROOTDIRSRAW ; do
|
||||||
|
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||||
|
SEP="|"
|
||||||
|
done
|
||||||
|
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||||
|
# Add a user-defined pattern to the cygpath arguments
|
||||||
|
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||||
|
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||||
|
fi
|
||||||
|
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||||
|
i=0
|
||||||
|
for arg in "$@" ; do
|
||||||
|
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||||
|
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||||
|
|
||||||
|
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||||
|
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||||
|
else
|
||||||
|
eval `echo args$i`="\"$arg\""
|
||||||
|
fi
|
||||||
|
i=$((i+1))
|
||||||
|
done
|
||||||
|
case $i in
|
||||||
|
(0) set -- ;;
|
||||||
|
(1) set -- "$args0" ;;
|
||||||
|
(2) set -- "$args0" "$args1" ;;
|
||||||
|
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||||
|
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||||
|
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||||
|
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||||
|
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||||
|
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||||
|
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Escape application args
|
||||||
|
save () {
|
||||||
|
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||||
|
echo " "
|
||||||
|
}
|
||||||
|
APP_ARGS=$(save "$@")
|
||||||
|
|
||||||
|
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||||
|
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||||
|
|
||||||
|
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||||
|
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||||
|
cd "$(dirname "$0")"
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$JAVACMD" "$@"
|
||||||
@ -0,0 +1,84 @@
|
|||||||
|
@if "%DEBUG%" == "" @echo off
|
||||||
|
@rem ##########################################################################
|
||||||
|
@rem
|
||||||
|
@rem Gradle startup script for Windows
|
||||||
|
@rem
|
||||||
|
@rem ##########################################################################
|
||||||
|
|
||||||
|
@rem Set local scope for the variables with windows NT shell
|
||||||
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
|
set DIRNAME=%~dp0
|
||||||
|
if "%DIRNAME%" == "" set DIRNAME=.
|
||||||
|
set APP_BASE_NAME=%~n0
|
||||||
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
set DEFAULT_JVM_OPTS=
|
||||||
|
|
||||||
|
@rem Find java.exe
|
||||||
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
|
set JAVA_EXE=java.exe
|
||||||
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
|
if "%ERRORLEVEL%" == "0" goto init
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
echo.
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:findJavaFromJavaHome
|
||||||
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
|
if exist "%JAVA_EXE%" goto init
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||||
|
echo.
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:init
|
||||||
|
@rem Get command-line arguments, handling Windows variants
|
||||||
|
|
||||||
|
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||||
|
|
||||||
|
:win9xME_args
|
||||||
|
@rem Slurp the command line arguments.
|
||||||
|
set CMD_LINE_ARGS=
|
||||||
|
set _SKIP=2
|
||||||
|
|
||||||
|
:win9xME_args_slurp
|
||||||
|
if "x%~1" == "x" goto execute
|
||||||
|
|
||||||
|
set CMD_LINE_ARGS=%*
|
||||||
|
|
||||||
|
:execute
|
||||||
|
@rem Setup the command line
|
||||||
|
|
||||||
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
|
@rem Execute Gradle
|
||||||
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||||
|
|
||||||
|
:end
|
||||||
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||||
|
|
||||||
|
:fail
|
||||||
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
|
rem the _cmd.exe /c_ return code!
|
||||||
|
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||||
|
exit /b 1
|
||||||
|
|
||||||
|
:mainEnd
|
||||||
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|
||||||
|
:omega
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
## This file must *NOT* be checked into Version Control Systems,
|
||||||
|
# as it contains information specific to your local configuration.
|
||||||
|
#
|
||||||
|
# Location of the SDK. This is only used by Gradle.
|
||||||
|
# For customization when using a Version Control System, please read the
|
||||||
|
# header note.
|
||||||
|
#Sun Sep 20 09:53:03 EEST 2020
|
||||||
|
sdk.dir=/Users/erababah/Library/Android/sdk
|
||||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,28 @@
|
|||||||
|
import 'package:diplomaticquarterapp/config/config.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/model/hospitals/request_get_hospitals_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/service/base_service.dart';
|
||||||
|
import 'package:diplomaticquarterapp/models/AlHabibMedicalServices/EReferral/get_all_relationship_types_request_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/models/AlHabibMedicalServices/EReferral/get_all_relationship_types_response_model.dart';
|
||||||
|
import 'package:geolocator/geolocator.dart';
|
||||||
|
|
||||||
|
class EReferralService extends BaseService {
|
||||||
|
List<GetAllRelationshipTypeResponseModel> _relationTypes = List();
|
||||||
|
|
||||||
|
List<GetAllRelationshipTypeResponseModel> get relationTypes => _relationTypes;
|
||||||
|
|
||||||
|
|
||||||
|
Future getRelationTypes() async {
|
||||||
|
await baseAppClient.post(GET_ALL_RELATIONSHIP_TYPES,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
_relationTypes.clear();
|
||||||
|
response['List_EReferralResult'].forEach((relation) {
|
||||||
|
_relationTypes.add(GetAllRelationshipTypeResponseModel.fromJson(relation));
|
||||||
|
});
|
||||||
|
}, onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
}, body: {});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
import 'dart:core';
|
||||||
|
|
||||||
|
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/service/all_habib_medical_services/e_referral_service.dart';
|
||||||
|
import 'package:diplomaticquarterapp/models/AlHabibMedicalServices/EReferral/get_all_relationship_types_response_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
|
||||||
|
|
||||||
|
import '../../../locator.dart';
|
||||||
|
import '../base_view_model.dart';
|
||||||
|
|
||||||
|
class EReferralViewModel extends BaseViewModel {
|
||||||
|
EReferralService _eReferralService = locator<EReferralService>();
|
||||||
|
|
||||||
|
List<GetAllRelationshipTypeResponseModel> get relationTypes =>
|
||||||
|
_eReferralService.relationTypes;
|
||||||
|
|
||||||
|
void getRelationTypes() async {
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
await _eReferralService.getRelationTypes();
|
||||||
|
if (_eReferralService.hasError) {
|
||||||
|
error = _eReferralService.error;
|
||||||
|
setState(ViewState.Error);
|
||||||
|
}
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
class GetAllRelationshipTypeRequestModel {
|
||||||
|
double versionID;
|
||||||
|
int channel;
|
||||||
|
int languageID;
|
||||||
|
String iPAdress;
|
||||||
|
String generalid;
|
||||||
|
int patientOutSA;
|
||||||
|
Null sessionID;
|
||||||
|
bool isDentalAllowedBackend;
|
||||||
|
int deviceTypeID;
|
||||||
|
|
||||||
|
GetAllRelationshipTypeRequestModel(
|
||||||
|
{this.versionID,
|
||||||
|
this.channel,
|
||||||
|
this.languageID,
|
||||||
|
this.iPAdress,
|
||||||
|
this.generalid,
|
||||||
|
this.patientOutSA,
|
||||||
|
this.sessionID,
|
||||||
|
this.isDentalAllowedBackend,
|
||||||
|
this.deviceTypeID});
|
||||||
|
|
||||||
|
GetAllRelationshipTypeRequestModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
versionID = json['VersionID'];
|
||||||
|
channel = json['Channel'];
|
||||||
|
languageID = json['LanguageID'];
|
||||||
|
iPAdress = json['IPAdress'];
|
||||||
|
generalid = json['generalid'];
|
||||||
|
patientOutSA = json['PatientOutSA'];
|
||||||
|
sessionID = json['SessionID'];
|
||||||
|
isDentalAllowedBackend = json['isDentalAllowedBackend'];
|
||||||
|
deviceTypeID = json['DeviceTypeID'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['VersionID'] = this.versionID;
|
||||||
|
data['Channel'] = this.channel;
|
||||||
|
data['LanguageID'] = this.languageID;
|
||||||
|
data['IPAdress'] = this.iPAdress;
|
||||||
|
data['generalid'] = this.generalid;
|
||||||
|
data['PatientOutSA'] = this.patientOutSA;
|
||||||
|
data['SessionID'] = this.sessionID;
|
||||||
|
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
|
||||||
|
data['DeviceTypeID'] = this.deviceTypeID;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
class GetAllRelationshipTypeResponseModel {
|
||||||
|
int iD;
|
||||||
|
String text;
|
||||||
|
String textAr;
|
||||||
|
String textEn;
|
||||||
|
|
||||||
|
GetAllRelationshipTypeResponseModel(
|
||||||
|
{this.iD, this.text, this.textAr, this.textEn});
|
||||||
|
|
||||||
|
GetAllRelationshipTypeResponseModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
iD = json['ID'];
|
||||||
|
text = json['Text'];
|
||||||
|
textAr = json['Text_Ar'];
|
||||||
|
textEn = json['Text_En'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['ID'] = this.iD;
|
||||||
|
data['Text'] = this.text;
|
||||||
|
data['Text_Ar'] = this.textAr;
|
||||||
|
data['Text_En'] = this.textEn;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,82 @@
|
|||||||
|
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/viewModels/qr_view_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/data_display/CarouselSlider.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:hexcolor/hexcolor.dart';
|
||||||
|
|
||||||
|
import '../../../d_q_icons_icons.dart';
|
||||||
|
import 'e_referral_page.dart';
|
||||||
|
|
||||||
|
class EReferralIndexPage extends StatelessWidget {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return AppScaffold(
|
||||||
|
isShowAppBar: true,
|
||||||
|
appBarTitle: "Service Information",
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
padding: EdgeInsets.all(12),
|
||||||
|
child:
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
Texts(
|
||||||
|
"E-Referral: ",
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
fontSize: 25,
|
||||||
|
color: Hexcolor("#60686b"),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 12,
|
||||||
|
),
|
||||||
|
Texts(
|
||||||
|
"This service allows you to submit a Referral request from any health care providers either inside or outside the kingdom of Saudi Arabia to any of HMG Hospitals, By filling some of the patient's data and attaching the medical reports, moreover you can track the request status (Under process, Accepted or Rejected)",
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
fontSize: 17,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 22,
|
||||||
|
),
|
||||||
|
Center(
|
||||||
|
child: SizedBox(
|
||||||
|
height: MediaQuery.of(context).size.height * 0.55,
|
||||||
|
width: MediaQuery.of(context).size.width * 0.50,
|
||||||
|
child: CarouselSlider(
|
||||||
|
imagesUrlList: [
|
||||||
|
"https://hmgwebservices.com/Images/MobileApp/images-info-home/referal/en/0.png",
|
||||||
|
"https://hmgwebservices.com/Images/MobileApp/images-info-home/referal/en/1.png"
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 77,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
),
|
||||||
|
bottomSheet: Container(
|
||||||
|
height: MediaQuery.of(context).size.height * 0.10,
|
||||||
|
width: double.infinity,
|
||||||
|
child: Column(
|
||||||
|
children: <Widget>[
|
||||||
|
Container(
|
||||||
|
width: MediaQuery.of(context).size.width * 0.9,
|
||||||
|
child: SecondaryButton(
|
||||||
|
onTap: ()=> Navigator.push(context, FadePage(page: EReferralPage())),
|
||||||
|
label: "E-Referral",
|
||||||
|
textColor: Theme.of(context).backgroundColor),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,128 @@
|
|||||||
|
import 'dart:ui';
|
||||||
|
|
||||||
|
import 'package:diplomaticquarterapp/core/viewModels/all_habib_medical_services/e_referral_view_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/new_e_referral_page.dart';
|
||||||
|
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/search_for_referrals_page.dart';
|
||||||
|
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
||||||
|
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_history_page.dart';
|
||||||
|
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_page.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class EReferralPage extends StatefulWidget {
|
||||||
|
@override
|
||||||
|
_EReferralPageState createState() => _EReferralPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _EReferralPageState extends State<EReferralPage>
|
||||||
|
with SingleTickerProviderStateMixin {
|
||||||
|
TabController _tabController;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
_tabController = TabController(length: 2, vsync: this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
super.dispose();
|
||||||
|
_tabController.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return BaseView<EReferralViewModel>(
|
||||||
|
builder: (_, model, widget) => AppScaffold(
|
||||||
|
isShowAppBar: true,
|
||||||
|
appBarTitle: "E-Referral",
|
||||||
|
body: Scaffold(
|
||||||
|
extendBodyBehindAppBar: true,
|
||||||
|
appBar: PreferredSize(
|
||||||
|
preferredSize: Size.fromHeight(65.0),
|
||||||
|
child: Stack(
|
||||||
|
children: <Widget>[
|
||||||
|
Positioned(
|
||||||
|
bottom: 1,
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
child: BackdropFilter(
|
||||||
|
filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
|
||||||
|
child: Container(
|
||||||
|
color: Theme.of(context)
|
||||||
|
.scaffoldBackgroundColor
|
||||||
|
.withOpacity(0.8),
|
||||||
|
height: 70.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Center(
|
||||||
|
child: Container(
|
||||||
|
height: 60.0,
|
||||||
|
margin: EdgeInsets.only(top: 10.0),
|
||||||
|
width: MediaQuery.of(context).size.width * 0.9,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border(
|
||||||
|
bottom: BorderSide(
|
||||||
|
color: Theme.of(context).dividerColor,
|
||||||
|
width: 0.7),
|
||||||
|
),
|
||||||
|
color: Colors.white),
|
||||||
|
child: Center(
|
||||||
|
child: TabBar(
|
||||||
|
isScrollable: true,
|
||||||
|
controller: _tabController,
|
||||||
|
indicatorWeight: 5.0,
|
||||||
|
indicatorSize: TabBarIndicatorSize.label,
|
||||||
|
indicatorColor: Colors.red[800],
|
||||||
|
labelColor: Theme.of(context).primaryColor,
|
||||||
|
labelPadding:
|
||||||
|
EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0),
|
||||||
|
unselectedLabelColor: Colors.grey[800],
|
||||||
|
tabs: [
|
||||||
|
Container(
|
||||||
|
width: MediaQuery.of(context).size.width * 0.37,
|
||||||
|
child: Center(
|
||||||
|
child: Texts("New Referral"),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: MediaQuery.of(context).size.width * 0.37,
|
||||||
|
child: Center(
|
||||||
|
child: Texts("Search for Referrals"),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
body: Column(
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
child: TabBarView(
|
||||||
|
physics: BouncingScrollPhysics(),
|
||||||
|
controller: _tabController,
|
||||||
|
children: <Widget>[
|
||||||
|
NewEReferralPage(
|
||||||
|
eReferralViewModel: model,
|
||||||
|
),
|
||||||
|
SearchForReferralsPage(
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,273 @@
|
|||||||
|
import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/viewModels/all_habib_medical_services/e_referral_view_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/models/AlHabibMedicalServices/EReferral/get_all_relationship_types_response_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
|
||||||
|
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
|
||||||
|
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/select_country_ingo_Dialog.dart';
|
||||||
|
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/select_relation_type_Dialog.dart';
|
||||||
|
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
||||||
|
import 'package:diplomaticquarterapp/pages/medical/balance/new_text_Field.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
enum BeneficiaryType { MyAccount, MyFamilyFiles, OtherAccount, NON }
|
||||||
|
|
||||||
|
class NewEReferralPage extends StatefulWidget {
|
||||||
|
final EReferralViewModel eReferralViewModel;
|
||||||
|
|
||||||
|
const NewEReferralPage({Key key, this.eReferralViewModel}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_NewEReferralPageState createState() => _NewEReferralPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _NewEReferralPageState extends State<NewEReferralPage> {
|
||||||
|
TextEditingController _fileTextController = TextEditingController();
|
||||||
|
TextEditingController _notesTextController = TextEditingController();
|
||||||
|
TextEditingController _mobileTextController = TextEditingController();
|
||||||
|
BeneficiaryType beneficiaryType = BeneficiaryType.NON;
|
||||||
|
GetAllRelationshipTypeResponseModel _selectedRelation;
|
||||||
|
String amount = "";
|
||||||
|
String email;
|
||||||
|
PatientInfo _selectedPatientInfo;
|
||||||
|
AuthenticatedUser authenticatedUser;
|
||||||
|
GetAllSharedRecordsByStatusList selectedPatientFamily;
|
||||||
|
AdvanceModel advanceModel = AdvanceModel();
|
||||||
|
dynamic _selectedCountry;
|
||||||
|
AppSharedPreferences sharedPref = AppSharedPreferences();
|
||||||
|
AuthenticatedUser authUser;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return BaseView<EReferralViewModel>(
|
||||||
|
onModelReady: (model) => model.getRelationTypes(),
|
||||||
|
builder: (_, model, widget) => AppScaffold(
|
||||||
|
isShowAppBar: false,
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
physics: ScrollPhysics(),
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.all(12),
|
||||||
|
child: Center(
|
||||||
|
child: FractionallySizedBox(
|
||||||
|
widthFactor: 0.94,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 75,
|
||||||
|
),
|
||||||
|
Center(
|
||||||
|
child: Texts(
|
||||||
|
// TranslationBase.of(context).advancePaymentLabel,
|
||||||
|
"Referral requester information",
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 12,
|
||||||
|
),
|
||||||
|
NewTextFields(
|
||||||
|
hintText: TranslationBase.of(context).fileNumber,
|
||||||
|
controller: _fileTextController,
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
child: Container(
|
||||||
|
padding: EdgeInsets.all(12),
|
||||||
|
width: double.infinity,
|
||||||
|
height: 65,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
color: Colors.white),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Texts("getPatientName"),
|
||||||
|
Icon(Icons.arrow_drop_down)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 12,
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
onTap: () => confirmSelectRelationTypeDialog(
|
||||||
|
model.relationTypes),
|
||||||
|
child: Container(
|
||||||
|
padding: EdgeInsets.all(12),
|
||||||
|
width: double.infinity,
|
||||||
|
height: 65,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
color: Colors.white),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Texts(getRelationName()),
|
||||||
|
Icon(Icons.arrow_drop_down)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 12,
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
onTap: () => confirmSelectCountryTypeDialog(),
|
||||||
|
child: Container(
|
||||||
|
padding: EdgeInsets.all(12),
|
||||||
|
width: double.infinity,
|
||||||
|
height: 65,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
color: Colors.white),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Texts(getCountryName()),
|
||||||
|
Icon(Icons.arrow_drop_down)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 12,
|
||||||
|
),
|
||||||
|
MobileNumberTextFiled(controller: _mobileTextController,code: _selectedCountry==null?"11":_selectedCountry["code"],),
|
||||||
|
SizedBox(
|
||||||
|
height: 12,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 12,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 12,
|
||||||
|
),
|
||||||
|
NewTextFields(
|
||||||
|
hintText: TranslationBase.of(context).notes,
|
||||||
|
controller: _notesTextController,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: MediaQuery.of(context).size.height * 0.15,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
bottomSheet: Container(
|
||||||
|
height: MediaQuery.of(context).size.height * 0.1,
|
||||||
|
width: double.infinity,
|
||||||
|
padding: EdgeInsets.all(12),
|
||||||
|
child: SecondaryButton(
|
||||||
|
textColor: Colors.white,
|
||||||
|
label: TranslationBase.of(context).submit,
|
||||||
|
disabled: amount.isEmpty ||
|
||||||
|
_fileTextController.text.isEmpty ||
|
||||||
|
_selectedRelation == null,
|
||||||
|
),
|
||||||
|
)));
|
||||||
|
}
|
||||||
|
|
||||||
|
void confirmSelectRelationTypeDialog(
|
||||||
|
List<GetAllRelationshipTypeResponseModel> relations) {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
child: SelectRelationTypeDialog(
|
||||||
|
relationTypes: relations,
|
||||||
|
selectedRelation: _selectedRelation,
|
||||||
|
onValueSelected: (value) {
|
||||||
|
setState(() {
|
||||||
|
_selectedRelation = value;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void confirmSelectCountryTypeDialog() {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
child: SelectCountryDialog(
|
||||||
|
selectedCountry: _selectedCountry,
|
||||||
|
onValueSelected: (value) {
|
||||||
|
setState(() {
|
||||||
|
_selectedCountry = value;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
String getRelationName() {
|
||||||
|
if (_selectedRelation != null)
|
||||||
|
return _selectedRelation.text;
|
||||||
|
else
|
||||||
|
return TranslationBase.of(context).selectHospital;
|
||||||
|
}
|
||||||
|
|
||||||
|
String getCountryName() {
|
||||||
|
if (_selectedCountry != null)
|
||||||
|
return _selectedCountry["name"];
|
||||||
|
else
|
||||||
|
return "Country";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class MobileNumberTextFiled extends StatelessWidget {
|
||||||
|
const MobileNumberTextFiled({
|
||||||
|
Key key,
|
||||||
|
this.controller,
|
||||||
|
this.code
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
|
||||||
|
final TextEditingController controller;
|
||||||
|
final String code;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
padding: EdgeInsets.all(5),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(15), color: Colors.white),
|
||||||
|
child: Row(children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
flex: 1,
|
||||||
|
child: Icon(
|
||||||
|
Icons.phone,
|
||||||
|
color: Colors.red,
|
||||||
|
)),
|
||||||
|
Expanded(
|
||||||
|
flex: 1,
|
||||||
|
child: Text(
|
||||||
|
code.toString(),
|
||||||
|
overflow: TextOverflow.clip,
|
||||||
|
)),
|
||||||
|
Expanded(
|
||||||
|
flex: 4,
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.all(5),
|
||||||
|
child: TextField(
|
||||||
|
keyboardType: TextInputType.phone,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
border: InputBorder.none, hintText: '5xxxxxxxx'),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
]),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_history_details_page.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class SearchForReferralsPage extends StatelessWidget {
|
||||||
|
|
||||||
|
SearchForReferralsPage({Key key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return AppScaffold(
|
||||||
|
body: Container(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,130 @@
|
|||||||
|
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/models/AlHabibMedicalServices/EReferral/get_all_relationship_types_response_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
// ignore: must_be_immutable
|
||||||
|
class SelectRelationTypeDialog extends StatefulWidget {
|
||||||
|
final List<GetAllRelationshipTypeResponseModel> relationTypes;
|
||||||
|
final Function(GetAllRelationshipTypeResponseModel) onValueSelected;
|
||||||
|
GetAllRelationshipTypeResponseModel selectedRelation;
|
||||||
|
|
||||||
|
SelectRelationTypeDialog(
|
||||||
|
{Key key, this.relationTypes, this.onValueSelected, this.selectedRelation});
|
||||||
|
|
||||||
|
@override
|
||||||
|
_SelectRelationTypeDialogState createState() => _SelectRelationTypeDialogState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _SelectRelationTypeDialogState extends State<SelectRelationTypeDialog> {
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
widget.selectedRelation = widget.selectedRelation ?? widget.relationTypes[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return SimpleDialog(
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
Divider(),
|
||||||
|
...List.generate(
|
||||||
|
widget.relationTypes.length,
|
||||||
|
(index) => Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 2,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
flex: 1,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
widget.selectedRelation = widget.relationTypes[index];
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: ListTile(
|
||||||
|
title: Text(widget.relationTypes[index].text),
|
||||||
|
leading: Radio(
|
||||||
|
value: widget.relationTypes[index],
|
||||||
|
groupValue: widget.selectedRelation,
|
||||||
|
activeColor: Colors.red[800],
|
||||||
|
onChanged: (value) {
|
||||||
|
setState(() {
|
||||||
|
widget.selectedRelation = value;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 5.0,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 5.0,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
flex: 1,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Container(
|
||||||
|
child: Center(
|
||||||
|
child: Texts(
|
||||||
|
TranslationBase.of(context).cancel.toUpperCase(),
|
||||||
|
color: Colors.red,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: 1,
|
||||||
|
height: 30,
|
||||||
|
color: Colors.grey[500],
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
flex: 1,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () {
|
||||||
|
widget.onValueSelected(widget.selectedRelation);
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Center(
|
||||||
|
child: Texts(
|
||||||
|
TranslationBase.of(context).ok,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,66 @@
|
|||||||
|
import 'package:carousel_pro/carousel_pro.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class CarouselSlider extends StatelessWidget {
|
||||||
|
const CarouselSlider({
|
||||||
|
@required this.imagesUrlList,
|
||||||
|
@required this.width,
|
||||||
|
@required this.height,
|
||||||
|
this.onImageChange,
|
||||||
|
this.autoPlay = false,
|
||||||
|
Key key,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
final List imagesUrlList;
|
||||||
|
final double height;
|
||||||
|
final double width;
|
||||||
|
final bool autoPlay;
|
||||||
|
final Function onImageChange;
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Carousel(
|
||||||
|
boxFit: BoxFit.cover,
|
||||||
|
autoplay: true,
|
||||||
|
animationCurve: Curves.fastOutSlowIn,
|
||||||
|
animationDuration: Duration(milliseconds: 1000),
|
||||||
|
dotSize: 0.0,
|
||||||
|
dotIncreasedColor: Colors.transparent,
|
||||||
|
dotBgColor: Colors.transparent,
|
||||||
|
dotPosition: DotPosition.bottomCenter,
|
||||||
|
dotVerticalPadding: 10.0,
|
||||||
|
onImageChange: onImageChange,
|
||||||
|
showIndicator: true,
|
||||||
|
indicatorBgPadding: 7.0,
|
||||||
|
|
||||||
|
images: imagesUrlList.map((image) {
|
||||||
|
return Builder(builder: (BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
child: Image.network(image, loadingBuilder: (BuildContext context,
|
||||||
|
Widget child, ImageChunkEvent loadingProgress) {
|
||||||
|
if (loadingProgress == null) return child;
|
||||||
|
return Center(
|
||||||
|
child: SizedBox(
|
||||||
|
width: 40.0,
|
||||||
|
height: 40.0,
|
||||||
|
child: AppCircularProgressIndicator(
|
||||||
|
// background: Theme
|
||||||
|
// .of(context)
|
||||||
|
// .primaryColor,
|
||||||
|
// value: loadingProgress.expectedTotalBytes != null
|
||||||
|
// ? loadingProgress.cumulativeBytesLoaded /
|
||||||
|
// loadingProgress.expectedTotalBytes
|
||||||
|
// : 0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
width: width,
|
||||||
|
height: height,
|
||||||
|
fit: BoxFit.fill),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}).toList(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue