Skip to content

Commit

Permalink
minor ui changes
Browse files Browse the repository at this point in the history
  • Loading branch information
shubham64mehta committed Oct 5, 2020
1 parent a79fbd2 commit 98c52d9
Show file tree
Hide file tree
Showing 17 changed files with 266 additions and 345 deletions.
6 changes: 3 additions & 3 deletions lib/Appoitment/Show.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:hackathon2/Chat/1.dart';
import 'package:hackathon2/Chat/2.dart';
import 'Chatscreen.dart';

class Show extends StatefulWidget {
Expand Down Expand Up @@ -149,9 +149,9 @@ class _ShowState extends State<Show> {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => MyApp(
builder: (context) => AllChatsPage(
uid: widget.uid,
image: widget.drimage,
image2: widget.drimage,
)));
}
},
Expand Down
4 changes: 4 additions & 0 deletions lib/Appoitment/appointment.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ class _AppointmentState extends State<Appointment3> {
degree:
snapshot1.data.value['degree'],
exp: snapshot1.data.value['exp'],
language: snapshot1
.data.value['language'],
drcertificate: snapshot1
.data.value['certificate'],
)));
},
child: Row(
Expand Down
51 changes: 45 additions & 6 deletions lib/Appoitment/appointmentrequest.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,18 @@ class Request extends StatefulWidget {
final String fee;
final String degree;
final String exp;
final String language;
final String drcertificate;
const Request(
{Key key,
this.index,
this.doctorimage,
this.fee,
this.degree,
this.exp,
this.doctorname})
this.doctorname,
this.language,
this.drcertificate})
: super(key: key);
@override
_RequestState createState() => _RequestState();
Expand Down Expand Up @@ -51,6 +55,7 @@ class _RequestState extends State<Request> {
tag: widget.index,
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: MediaQuery.of(context).size.width,
Expand Down Expand Up @@ -83,7 +88,7 @@ class _RequestState extends State<Request> {
"Degree: " + widget.degree,
style: TextStyle(
color: Colors.white,
fontSize: 23,
fontSize: 16,
fontWeight: FontWeight.bold,
),
),
Expand All @@ -94,7 +99,7 @@ class _RequestState extends State<Request> {
"Experience: " + widget.exp,
style: TextStyle(
color: Colors.white,
fontSize: 23,
fontSize: 16,
fontWeight: FontWeight.bold,
),
),
Expand All @@ -105,7 +110,18 @@ class _RequestState extends State<Request> {
"Fees: " + widget.fee,
style: TextStyle(
color: Colors.white,
fontSize: 23,
fontSize: 16,
fontWeight: FontWeight.bold,
),
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
"Known Languages: " + widget.language,
style: TextStyle(
color: Colors.white,
fontSize: 16,
fontWeight: FontWeight.bold,
),
),
Expand All @@ -114,15 +130,38 @@ class _RequestState extends State<Request> {
),
color: Color(0xFFFF69B4),
width: MediaQuery.of(context).size.width / 1.2,
height: MediaQuery.of(context).size.height / 6,
height: MediaQuery.of(context).size.height / 5,
),
),
)
],
),
),
SizedBox(
height: 70,
height: 20,
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
"Certificate",
style: TextStyle(
color: Colors.black,
fontSize: 25,
fontWeight: FontWeight.bold),
),
),
Center(
child: Container(
decoration: BoxDecoration(
image: DecorationImage(
image: NetworkImage(widget.drcertificate),
fit: BoxFit.fill)),
width: MediaQuery.of(context).size.width / 1.3,
height: MediaQuery.of(context).size.height / 1.9,
),
),
SizedBox(
height: 20,
),
Center(
child: GestureDetector(
Expand Down
29 changes: 0 additions & 29 deletions lib/Chat/1.dart

This file was deleted.

121 changes: 41 additions & 80 deletions lib/Chat/2.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ import 'package:hexcolor/hexcolor.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:scoped_model/scoped_model.dart';
import 'package:http/http.dart' as http;
import '3.dart';
import 'chatmodel.dart';
import 'user.dart';

class AllChatsPage extends StatefulWidget {
final String uid;
Expand Down Expand Up @@ -48,13 +45,7 @@ class _AllChatsPageState extends State<AllChatsPage> {
);
}

@override
void initState() {
super.initState();
ScopedModel.of<ChatModel>(context, rebuildOnChange: false).init();
}

void friendClicked(User friend) {
void friendClicked() {
Navigator.of(context).push(
MaterialPageRoute(
builder: (BuildContext context) {
Expand All @@ -67,83 +58,53 @@ class _AllChatsPageState extends State<AllChatsPage> {
}

Widget buildAllChatList() {
return ScopedModelDescendant<ChatModel>(
builder: (context, child, model) {
return ListView.builder(
itemCount: model.friendList.length,
itemBuilder: (BuildContext context, int index) {
User friend = model.friendList[index];
return Center(
child: Padding(
padding: const EdgeInsets.all(40.0),
child: Column(
children: [
Padding(
padding: const EdgeInsets.all(70.0),
child: Center(
child: Row(
children: [
GestureDetector(
onTap: () {
onJoin();
},
child: CircleAvatar(
radius: 40,
backgroundColor: Colors.pink[100],
child: Center(
child: Icon(
CupertinoIcons.video_camera_solid,
color: Colors.black,
),
),
),
),
SizedBox(
width: 30,
),
GestureDetector(
onTap: () {
friendClicked(friend);
},
child: CircleAvatar(
radius: 40,
backgroundColor: Colors.pink[100],
child: Center(
child: Icon(
Icons.chat_bubble_outline,
color: Colors.black,
),
),
),
)
],
),
),
)
],
),
),
);
});
},
return Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
GestureDetector(
onTap: () {
onJoin();
},
child: CircleAvatar(
radius: 40,
backgroundColor: Colors.pink[100],
child: Center(
child: Icon(
CupertinoIcons.video_camera_solid,
color: Colors.black,
),
),
),
),
SizedBox(
width: 30,
),
GestureDetector(
onTap: () {
friendClicked();
},
child: CircleAvatar(
radius: 40,
backgroundColor: Colors.pink[100],
child: Center(
child: Icon(
Icons.chat_bubble_outline,
color: Colors.black,
),
),
),
)
],
);
}

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
leading: IconButton(
icon: Icon(
Icons.arrow_back,
color: Colors.black,
),
onPressed: () {
Navigator.push(context,
MaterialPageRoute(builder: (context) => Appointment3()));
}),
// iconTheme: IconThemeData(color: Colors.black),
//automaticallyImplyLeading: true,
iconTheme: IconThemeData(color: Colors.black),
automaticallyImplyLeading: true,
backgroundColor: Colors.white,
elevation: 0,
title: Center(
Expand Down
Loading

0 comments on commit 98c52d9

Please sign in to comment.