Skip to content

Commit

Permalink
Merge pull request #5 from rusiruavb/master
Browse files Browse the repository at this point in the history
Redesign home screen, login and sign up screen
  • Loading branch information
rusiruavb authored Oct 7, 2021
2 parents 50bc614 + ebe7a18 commit d5b5224
Show file tree
Hide file tree
Showing 63 changed files with 4,518 additions and 402 deletions.
8 changes: 4 additions & 4 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
package="com.example.dialog_doc990_mobile">
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:label="dialog_doc990_mobile"
android:label="Doc990"
android:icon="@mipmap/logo">
<activity
android:name=".MainActivity"
Expand All @@ -24,10 +24,10 @@
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
<meta-data
<!-- <meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"
/>
android:resource="@mipmap/logo"
/> -->
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
Expand Down
11 changes: 7 additions & 4 deletions android/app/src/main/res/drawable-v21/launch_background.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="?android:colorBackground" />
<item android:drawable="@android:color/white" />

<!-- You can insert your own image assets here -->
<!-- <item>
<!-- <item
android:width="120dp"
android:height="150dp"
android:gravity="center"
>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
android:src="@mipmap/logo" />
</item> -->
</layer-list>
10 changes: 6 additions & 4 deletions android/app/src/main/res/drawable/launch_background.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />

<!-- You can insert your own image assets here -->
<!-- <item>
<!-- <item
android:width="300dp"
android:height="300dp"
android:gravity="center"
>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
android:src="@mipmap/logo" />
</item> -->
</layer-list>
Binary file added android/app/src/main/res/drawable/loader.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
org.gradle.configureondemand=false
Binary file added assets/fonts/OpenSans.ttf
Binary file not shown.
Binary file added assets/fonts/SF-Pro.ttf
Binary file not shown.
Binary file added assets/fonts/SF-Text.ttf
Binary file not shown.
Binary file added assets/images/header_background.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/loading.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added flutter_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions flutter_01.sksl.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions flutter_02.sksl.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions lib/api_endpoints.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const RootURLPath = 'http://10.0.2.2:4000';
const GET_SEARCHED_DOCTORS = '$RootURLPath/doctor/search';
Original file line number Diff line number Diff line change
@@ -1,48 +1,64 @@
import 'package:dialog_doc990_mobile/constants.dart';
import 'package:flutter/material.dart';

class RoundedButton extends StatefulWidget {
final String text;
final Function action;
final Color color = Colors.red;
final Color color;
final double height;
final double width;
final IconData icon;
final Color textColor = Colors.white;
final double iconSize;
final Color textColor;
final double fontSize;

const RoundedButton({
Key key,
this.text,
this.action,
this.height,
this.width,
this.color,
this.textColor,
this.icon,
this.iconSize,
this.fontSize,
}) : super(key: key);
@override
_RoundedButtonState createState() => _RoundedButtonState(
action: action,
height: height,
icon: icon,
text: text,
textColor: textColor,
width: width,
color: color,
fontSize: fontSize,
iconSize: iconSize,
);
}

class _RoundedButtonState extends State<RoundedButton> {
final String text;
final Function action;
final Color color = Colors.red;
final Color color;
final double height;
final double width;
final IconData icon;
final Color textColor = Colors.white;
final double iconSize;
final Color textColor;
final double fontSize;

_RoundedButtonState({
Key key,
this.text,
this.action,
this.height,
this.width,
this.icon,
this.textColor,
this.color,
this.fontSize,
this.iconSize,
});

@override
Expand All @@ -52,22 +68,23 @@ class _RoundedButtonState extends State<RoundedButton> {
height: height,
width: width,
child: ClipRRect(
borderRadius: BorderRadius.circular(30),
borderRadius: BorderRadius.circular(8),
child: FlatButton(
padding: EdgeInsets.symmetric(vertical: 17.5, horizontal: 22),
color: color,
onPressed: action,
child: Row(
children: <Widget>[
Padding(
padding: EdgeInsets.only(right: 0),
mainAxisAlignment: MainAxisAlignment.center,
children: [
Align(
alignment: Alignment.center,
child: Text(
text,
style: TextStyle(
color: textColor,
fontFamily: 'Larsseit',
fontSize: 20,
fontWeight: FontWeight.bold,
fontFamily: SF_PRO_FONT,
fontSize: fontSize,
fontWeight: FontWeight.w100,
),
),
),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
import 'package:dialog_doc990_mobile/constants.dart';
import 'package:flutter/material.dart';

class RoundedDropDownFeild extends StatefulWidget {
final ValueChanged<String> onChange;
final String text;
final bool isRequiredFeild;
final bool isCountry;
final String value;

const RoundedDropDownFeild({
Key key,
this.isRequiredFeild,
this.onChange,
this.text,
this.value,
this.isCountry,
}) : super(key: key);

Expand All @@ -19,6 +22,7 @@ class RoundedDropDownFeild extends StatefulWidget {
isRequiredFeild: isRequiredFeild,
onChange: onChange,
text: text,
value: value,
isCountry: isCountry,
);
}
Expand All @@ -28,13 +32,15 @@ class _RoundedDropDownFeildState extends State<RoundedDropDownFeild> {
final String text;
final bool isRequiredFeild;
final bool isCountry;
final String value;
bool _isFieldValid;

_RoundedDropDownFeildState({
Key key,
this.isRequiredFeild,
this.onChange,
this.text,
this.value,
this.isCountry,
});

Expand All @@ -49,7 +55,7 @@ class _RoundedDropDownFeildState extends State<RoundedDropDownFeild> {
text,
style: TextStyle(
fontFamily: 'Larsseit',
fontSize: 18,
fontSize: 15,
fontWeight: FontWeight.normal,
),
textAlign: TextAlign.left,
Expand Down Expand Up @@ -82,8 +88,8 @@ class _RoundedDropDownFeildState extends State<RoundedDropDownFeild> {
child: Text(
item,
style: TextStyle(
fontFamily: 'Larsseit',
fontSize: 20,
fontFamily: FONT_FAMILY_PRIMARY,
fontSize: 18,
),
),
value: item,
Expand All @@ -93,7 +99,7 @@ class _RoundedDropDownFeildState extends State<RoundedDropDownFeild> {
hint: Text(
'Select your country',
style: TextStyle(
fontFamily: 'Larsseit',
fontFamily: FONT_FAMILY_PRIMARY,
fontSize: 20,
color: Colors.grey[600],
),
Expand Down Expand Up @@ -126,8 +132,8 @@ class _RoundedDropDownFeildState extends State<RoundedDropDownFeild> {
child: Text(
item,
style: TextStyle(
fontFamily: 'Larsseit',
fontSize: 20,
fontFamily: FONT_FAMILY_PRIMARY,
fontSize: 18,
),
),
value: item,
Expand All @@ -137,8 +143,8 @@ class _RoundedDropDownFeildState extends State<RoundedDropDownFeild> {
hint: Text(
'Select your title',
style: TextStyle(
fontFamily: 'Larsseit',
fontSize: 20,
fontFamily: FONT_FAMILY_PRIMARY,
fontSize: 18,
color: Colors.grey[600],
),
),
Expand All @@ -153,12 +159,13 @@ class _RoundedDropDownFeildState extends State<RoundedDropDownFeild> {
_isFieldValid != null &&
!_isFieldValid
? Padding(
padding: EdgeInsets.only(left: 15),
padding: EdgeInsets.only(left: 5),
child: Text(
text + ' is required!',
style: TextStyle(
color: Colors.red[800],
fontFamily: 'Larsseit',
fontFamily: FONT_FAMILY_PRIMARY,
fontSize: 12,
),
),
)
Expand All @@ -185,11 +192,10 @@ class DropDownContainer extends StatelessWidget {
final size = MediaQuery.of(context).size;

return Container(
margin: EdgeInsets.symmetric(vertical: 1),
padding: EdgeInsets.symmetric(horizontal: 25, vertical: 3),
padding: EdgeInsets.symmetric(horizontal: 18, vertical: 3),
width: size.width * 0.9,
decoration: BoxDecoration(
color: Colors.grey[300], borderRadius: BorderRadius.circular(30)),
color: Colors.grey[300], borderRadius: BorderRadius.circular(8)),
child: child,
);
}
Expand Down
Loading

0 comments on commit d5b5224

Please sign in to comment.