Giter Club home page Giter Club logo

shareacab's Introduction

ShareACab

An app for sharing cab with college students

Maintenance issues license PRs Welcome

Description

Usually, after exams or when the mid-sem break begins, there is a large surge of people going back to their respective hometown by air/railways. This journey involves an initial travel where the person takes a cab to the IGI Airport or the New Delhi Railway station. A lot of times, people are forced to travel solo, if there isn't anyone he/she knows traveling at a similar time. Also, this leads to shortage of cabs nearby and increase in waiting time. Had there been a student of IIT-D with whom the cab could have been shared, the fares would also be split and the waiting time will also reduce. Another thing is that girls prefer not to travel alone in Cabs in Delhi, so that problem will also be solved by this app.

App Preview

Directory Layout

 ShareACab
   +--- README, LICENSE // basic information
   +--- assets  // contains all assets like images for project
   |
   +--- lib
        +--- models
          +--- alltrips.dart // (WILL BE REMOVED LATER)
          +--- requestdetails.dart // Request Model
          +--- user.dart // User Model
        +--- screens
          +--- authenticate
            +--- authenticate.dart // for toggling between sign in and register
            +--- forgotpass.dart // forgot password screen
            +--- register.dart // register user screen
            +--- sign_in.dart // sign in screen
            +--- verified_email_check.dart // check if user verified screen
          +--- chatscreen // handles the chating section
            +--- chat_database
              +--- chatservices.dart
              +--- database.dart
            +--- chat_widgets
              +--- chat_bubbles.dart
              +--- chat_tile.dart
              +--- chat_users_list.dart
              +--- message.dart
              +--- new_message.dart
            +--- chat_screen.dart
          +--- groupdetailscreen // handles the screen when user clicks on a card on dashboard
            +--- appbar.dart // group details page appbar
            +--- ended_group_details.dart // group details page for ended rides
            +--- groupdetails.dart // group details page
          +--- groupscreen // handles the screen when user is in a cab/group
            +--- group.dart // shows the current group details
            +--- editgroup.dart // edit group details page
          +--- notifications // handles notification screen
            +--- services
              +--- database.dart // handles database for notifications
              +--- notifservice.dart // service file for calling database functions relevant to notifications
            +--- widgets
              +--- notifslist.dart // displays list of notifications
              +--- notiftile.dart // UI for notification tile
            +--- notifications.dart // notification page
          +--- profile
            +--- userprofile.dart // handles user profile screen
          +--- requests // handles the requests of users screen
            +--- myrequests.dart // displays Ended rides
          +--- createtrip.dart // the screen for creating a new group
          +--- dashboard.dart // handles dashboard
          +--- edituserdetails.dart // handles edit user details page
          +--- filter.dart // handles filter service
          +--- help.dart // handles help/FAQ screen
          +--- messages.dart // messages screen
          +--- rootscreen.dart // handles navigation services
          +--- settings.dart // settings page to set dark mode
          +--- tripslist.dart // displays the list of trips on dashboard
          +--- wrapper.dart // handles the routing when a user is logged in
        +--- services
          +--- auth.dart // handles all authentication related services
          +--- database.dart // the PRIMARY database service which handles everything
          +--- trips.dart // for calling a function purposes
        +--- shared
          +--- loading.dart // the loading screen
        +--- main.dart
   |
   +--- functions  // Firebase Functions Folder: automatically run backend code in response to events
   |               // triggered by Firebase features and HTTPS requests
   |
   +--- etc

What's working:

  • Authentication

    • Sign up/Sign in using email and password. The user also needs to verify their email ID before logging in. Also given an option to reset password.
    • Frontend/Backend by @kshitijalwadhi
  • Curved Navbar

    • Curved Navbar to navigate between various screens
    • UI and dummy screens implemented by @Deepanshu-Rohilla
    • Logic by @kshitijalwadhi
  • Dashboard

    • Displaying the list of ongoing cabs/groups here. If the user taps on a card, the user is navigated to a screen which shows an overview of the group. On the group page, if the person clicks on join now, he's added to that group and is navigated to a screen where the details of the group are shown. There is also a floating action button which can be used in two ways, if the person is currently not in a group, by clicking the button he can create a new one, whereas if the user is already in a group, the button navigates him/her to the group details page. There is also an option to leave the group in the group details page. The admin of the group can also edit the details of the group.
    • UI by @Ishaan21
    • Backend/Logic by @kshitijalwadhi
  • Ended Rides

    • Displays completed rides of the user.
    • The user can tap on the cards to view the details.
    • Implemented by @kshitijalwadhi
  • Settings

    • Currently has the ability to switch to dark mode and also report bugs.
    • Implemented by @kshitijalwadhi
  • Chatting Functionality

    • Whenever a group is created, a chatbox is also created where the members of that group can chat amongst each other.
    • UI by @Ishaan21 and @Deepanshu-Rohilla
    • Backend/logic by @Ishaan21
  • Profile Page

    • Displaying the user details on this page and also an option to edit them on the navbar.
    • UI by @Deepanshu-Rohilla and @kshitijalwadhi
    • Backend/Logic by @kshitijalwadhi
  • Filter Page

    • Rides on the dashboard can be filtered according to destination and privacy setting.
  • Request only groups

    • There is also a facility to create private groups which require an invite to be sent to the admin of the group and the admin needs to accept that invitation to allow the user to get in the group. This invite will be present in the Notifications screen and can be accepted/declined from there itself.

Bugs:

  • You tell us.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Check CONTRIBUTING.md for contribution rules

License

MIT

shareacab's People

Contributors

ankurshaswat avatar arpit-saxena avatar as1605 avatar deepanshu-rohilla avatar dependabot[bot] avatar devclubiitd avatar ishaan21 avatar kanavpruthi avatar kshitijalwadhi avatar msinha99 avatar rish07 avatar tmibvishal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shareacab's Issues

The following RangeError was thrown building MyProfile...

Assign to
@kshitijalwadhi @Ishaan21

To Reproduce
Just launch the app. This is the first error that pops up

Expected behavior

I/flutter (28640): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
I/flutter (28640): The following RangeError was thrown building MyProfile(dirty, dependencies:
I/flutter (28640): [InheritedProvider<FirebaseUser>], state: _MyProfileState#054a6):
I/flutter (28640): Value not in range: 1
I/flutter (28640): 
I/flutter (28640): The relevant error-causing widget was:
I/flutter (28640):   MyProfile
I/flutter (28640):   file:///Users/vishal/Desktop/Coding%20B/Flutter/workspace/shareacab/lib/screens/rootscreen.dart:39:18
I/flutter (28640): 
I/flutter (28640): When the exception was thrown, this was the stack:
I/flutter (28640): #0      _StringBase.substring (dart:core-patch/string_patch.dart:388:7)
I/flutter (28640): #1      _MyProfileState.build (package:shareacab/screens/profile/userprofile.dart:76:26)
I/flutter (28640): #2      StatefulElement.build (package:flutter/src/widgets/framework.dart:4619:28)
I/flutter (28640): #3      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4502:15)
I/flutter (28640): #4      StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4675:11)
I/flutter (28640): #5      Element.rebuild (package:flutter/src/widgets/framework.dart:4218:5)
I/flutter (28640): #6      ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4481:5)
I/flutter (28640): #7      StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4666:11)
I/flutter (28640): #8      ComponentElement.mount (package:flutter/src/widgets/framework.dart:4476:5)
I/flutter (28640): #9      Element.inflateWidget (package:flutter/src/widgets/framework.dart:3446:14)
I/flutter (28640): #10     MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5947:32)
I/flutter (28640): ...     Normal element mounting (7 frames)
I/flutter (28640): #17     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3446:14)
I/flutter (28640): #18     Element.updateChild (package:flutter/src/widgets/framework.dart:3214:18)
I/flutter (28640): #19     _LayoutBuilderElement._layout.<anonymous closure> (package:flutter/src/widgets/layout_builder.dart:116:18)
I/flutter (28640): #20     BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2607:19)
I/flutter (28640): #21     _LayoutBuilderElement._layout (package:flutter/src/widgets/layout_builder.dart:96:11)
I/flutter (28640): #22     RenderObject.invokeLayoutCallback.<anonymous closure> (package:flutter/src/rendering/object.dart:1866:58)
I/flutter (28640): #23     PipelineOwner._enableMutationsToDirtySubtrees (package:flutter/src/rendering/object.dart:918:15)
I/flutter (28640): #24     RenderObject.invokeLayoutCallback (package:flutter/src/rendering/object.dart:1866:13)
I/flutter (28640): #25     RenderConstrainedLayoutBuilder.layoutAndBuildChild (package:flutter/src/widgets/layout_builder.dart:174:5)
I/flutter (28640): #26     _RenderLayoutBuilder.performLayout (package:flutter/src/widgets/layout_builder.dart:244:5)
I/flutter (28640): #27     RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
I/flutter (28640): #28     MultiChildLayoutDelegate.layoutChild (package:flutter/src/rendering/custom_layout.dart:171:11)
I/flutter (28640): #29     _ScaffoldLayout.performLayout (package:flutter/src/material/scaffold.dart:484:7)
I/flutter (28640): #30     MultiChildLayoutDelegate._callPerformLayout (package:flutter/src/rendering/custom_layout.dart:240:7)
I/flutter (28640): #31     RenderCustomMultiChildLayoutBox.performLayout (package:flutter/src/rendering/custom_layout.dart:399:14)
I/flutter (28640): #32     RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
I/flutter (28640): #33     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:13)
I/flutter (28640): #34     RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
I/flutter (28640): #35     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:13)
I/flutter (28640): #36     _RenderCustomClip.performLayout (package:flutter/src/rendering/proxy_box.dart:1248:11)
I/flutter (28640): #37     RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
I/flutter (28640): #38     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:13)
I/flutter (28640): #39     RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1630:7)
I/flutter (28640): #40     PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:887:18)
I/flutter (28640): #41     RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:402:19)
I/flutter (28640): #42     WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:884:13)
I/flutter (28640): #43     RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:284:5)
I/flutter (28640): #44     SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1113:15)
I/flutter (28640): #45     SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1052:9)
I/flutter (28640): #46     SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:968:5)
I/flutter (28640): #50     _invoke (dart:ui/hooks.dart:261:10)
I/flutter (28640): #51     _drawFrame (dart:ui/hooks.dart:219:3)
I/flutter (28640): (elided 3 frames from dart:async)

════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
The following RangeError was thrown building MyProfile(dirty, dependencies: [InheritedProvider<FirebaseUser>], state: _MyProfileState#9992c):
Value not in range: 1

The relevant error-causing widget was: 
  MyProfile file:///Users/vishal/Desktop/Coding%20B/Flutter/workspace/shareacab/lib/screens/rootscreen.dart:39:18
When the exception was thrown, this was the stack: 
#0      _StringBase.substring (dart:core-patch/string_patch.dart:388:7)
#1      _MyProfileState.build (package:shareacab/screens/profile/userprofile.dart:76:26)
#2      StatefulElement.build (package:flutter/src/widgets/framework.dart:4619:28)
#3      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4502:15)
#4      StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4675:11)
...
════════════════════════════════════════════════════════════════════════════════════════════════════

Desktop (please complete the following information):

  • OS: [e.g. Android]
  • Version [e.g. Android 8.1.0 Api level 27 ]

Show all errors using snackbar

A lot of places have used errors like print(e)
Use snackbar at those places so that user can also get to know about those errors

Clicking on Edit in User profile page

Shows this error. Assign to @kshitijalwadhi

════════ (2) Exception caught by widgets library ═══════════════════════════════════════════════════
The method '[]' was called on null.
Receiver: null
Tried calling: []("name")
The relevant error-causing widget was: 
  StreamBuilder<DocumentSnapshot> file:///Users/vishal/Desktop/Coding%20B/Flutter/workspace/shareacab/lib/screens/edituserdetails.dart:49:12

I am pretty sure it was working properly before

Bug while switching between theme modes

Sometimes the color of icon of the current window in navbar doesn't change right after switching from light to dark or vise versa. It gets fixed by navigating away and back to the page.

Improvement in filling of user object from database from uid @kshitijalwadhi

assigned to @kshitijalwadhi

E/flutter (24894): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: NoSuchMethodError: The method '[]' was called on null.
E/flutter (24894): Receiver: null
E/flutter (24894): Tried calling: []("currentGroup")

This happened because of this

final currentuser = Provider.of<FirebaseUser>(context);
    Firestore.instance.collection('userdetails').document(currentuser.uid).get().then((value) {
      if (value.data['currentGroup'] != null) {
      }
      ...

The main reason was that data for my uid (got from auth was not found in database).

A better approach would be to load/fill user object from the database using a constructor inmodels/user.dart and also fill my user data with random stuff. Like username: "empty" from the database

At least it will not show error in that case
This would be a better approach for error handling in the long term

SliverAppBar

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
check image assets and their use in group details screen
Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.
It would be nice if you can make a temporary prototype maybe on draw.io or https://marvelapp.com

Adding tooltips to buttons

Description
Adding tooltips to floating action button and icon buttons in action bar

Additional context
Most of the icons like floating action button and icons in action bar of different screen have no tooltip. Tooltip will help guess the functionality of button (which is not possible just by looking at the icon). When you hold the icon a little tooltip with name of button pops up (if added).

"Leave Group" color changes

This bug was unnoticed in the meeting.
On clicking the Leave Group button in the group page, the color of Group Button changes to black in light theme.
WhatsApp Video 2020-06-16 at 11 18 42 PM (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.