Summer Report

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 25

A

Training Report
Of
Summer Training Project At
StreetHack
Submitted
In the Partial Fulfillment of
Bachelor of Technology
Department of Computer Science
Guru Gobind Singh Indraprastha University

Submitted to : Submitted by:


Mr. Rinkaj Goyal Name: Sarthak Agarwal
Assistant Professor B.Tech (C.S.E): 3th year
Department of Computer Science & Semester: 5
Technology J. P. Institute of Engineering Roll no.:03616403216
Technology
formatting of the pull quote text box.]
Acknowledgement
“Gratitude is not a thing of expression; it is more matter of feeling."

There is always a sense of gratitude which one express


towards others for their help and supervision in achieving
the goals. This formal piece of acknowledgement is an
attempt to express the feeling of gratitude towards people
who helpful me in successfully completing of my training

I would like to express my deep gratitude to Mr. Rinkaj


Goyal ,my training coordinator for their constant co-
operation. He was always there with his competent
guidance and valuable suggestion throughout the
pursuance of this research project.

I would also like to place of appreciation to all the


respondents and group members whose responses and
coordination were of utmost importance for the project.

Above all no words can express my feelings to my parents,


friends all those persons who supported me during my
project. I am also thankful to all the respondents whose
cooperation & support has helped me a lot in collecting
necessary information
Table of contents

Certificate ............................................................................................................................................... ii

Acknowledgement ................................................................................................................................. iii


Table of contents ................................................................................................................................... iv

1. Company Profile
........................................................................................................................... 1

1.1. Company Information ..................................................................................................... 2

1.2. Recent Works................................................................................................................... 3

2. Technology/Theory
...........................................................................................................................4
1.1. Introduction to Dart …..................................................................................................... 4

1.2. Introduction to Flutter .................................................................................................... 9

3. Project

……….................................................................................................................19
1.1. Object ............................................................................................................................. 19

1.2. Scope .............................................................................................................................. 19

1.3. Technology to be used ................................................................................................... 19

1.4. Description...................................................................................................................... 20

4. References
………....................................................................................................................... 23
COMPANY PROFILE

StreetHack is only company of its type which connects your


thinking to reality. They Turn Hackathon Innovation into Real
world products. They believe there are dots are laid out in the
world, and Only sense of belonging connects them and help us
live a real life. They pursue our belief by working with clean
technologies, bring innovation, and enjoy creating products of the
use to the real world. Right now they have collaborations all over
the country. From companies like UltraHack to Coding Ninjas ,all
have collaborated with them.

They have two verticals –

1. Organizing Hackathon - They organize hackathons for


community bonding and solving a real-world problem of different
enterprises in the market, where They seek innovative ideas and
prototype from ignited minds of the engineering world.

2. Turning Innovation into products - Our team focusses on


completing the story of a hackathon, by converting the ideas,
innovations into real-world products and services.
Company details

Website
http://streethack.org
Headquarters
Delhi
Year founded
2018
Company size
2-10 employees
Specialties
data science, web development, Mobile App - Android, iOs app
development, Blockchain, Graphic Designing, and Human
Computer Interaction
Recent Works

1. UHACK 3.0 -: This hackathon was started by them at


GGSIPU in 2016.This year they came back with this in more
concrete manner. This year, this hackathon also have
support of market ruling companies like Paytm, Redbull,
Digital Ocean etc. Without the help of StreetHack this event
is not a big success.
2. Start Up Weekend -:Startup Weekends are 54 hour events
designed to provide superior experiential education for
technical and nontechnical entrepreneurs. The weekend
events are centered on action, innovation, and education.
Beginning with Friday night pitches and continuing through
testing, business model development, and basic prototype
creation, Startup Weekends culminate in Sunday night
demos to a panel of potential investors and local
entrepreneurs. Participants are challenged with building
functional startups during the event and are able to
collaborate with likeminded individuals outside of their daily
networks.
3. StreetHack Hackthon -:StreetHack is a hackathon organized
by Codestreet.io and Ultrahack India for Hackers who have
proved themselves in India and looking to go international
with a grant for a trip to Finland and the chance to demo
your prototype in Sprint I.
They are here with cool problem statements from big giants
of the Nordic region & Finland such as ESA, Talsinki, Forest
Dept among others. They invite all Indian hackers, students,
and professionals to join onboard and hack with us.
TECHNOLOGY

INTRODUCTION TO DART-
This page shows you how to use each major Dart feature, from
variables and operators to classes and libraries, with the
assumption that you already know how to program in another
language.

A Tour of the Dart Libraries


A Tour of the Dart Libraries
This tour shows how to use the main features of the following
libraries, which are included in all Dart platforms:

 dart:core Built-in types, collections, and other core


functionality. This library is automatically imported into every
Dart program.
 dart:async Support for asynchronous programming, with
classes such as Future and Stream.
 dart:math Mathematical constants and functions, plus a
random number generator.
 dart:convert Encoders and decoders for converting
between different data representations, including JSON and
UTF-8.
Important concepts
As you learn about the Dart language, keep these facts and
concepts in mind:
1. Everything you can place in a variable is an object, and
every object is an instance of a class. Even numbers,
functions, and null are objects. All objects inherit from
the Object class.
2. Although Dart is strongly typed, type annotations are
optional because Dart can infer types. In the code
above, number is inferred to be of type int. When you
want to explicitly say that no type is expected, use the
special type dynamic.
3. Dart supports generic types, like List<int> (a list of
integers) or List<dynamic> (a list of objects of any
type).
4. Dart supports top-level functions (such as main()), as
well as functions tied to a class or object (static and
instance methods, respectively). You can also create
functions within functions (nested or local functions).
5. Similarly, Dart supports top-level variables, as well as
variables tied to a class or object (static and instance
variables). Instance variables are sometimes known as
fields or properties.
6. Unlike Java, Dart doesn’t have the keywords public,
protected, and private. If an identifier starts with an
underscore (_), it’s private to its library. For details, see
Libraries and visibility.
7. Identifiers can start with a letter or underscore (_),
followed by any combination of those characters plus
digits.
8. Dart has both expressions (which have runtime values)
and statements (which don’t). For example, the
conditional expression condition ? expr1 : expr2 has a
value of expr1 or expr2. Compare that to an if-else
statement, which has no value. A statement often
contains one or more expressions, but an expression
can’t directly contain a statement.
9. Dart tools can report two kinds of problems: warnings
and errors. Warnings are just indications that your code
might not work, but they don’t prevent your program
from executing. Errors can be either compile-time or
run-time. A compile-time error prevents the code from
executing at all; a run-time error results in anexception
being raised while the code executes.

Effective Dart
Over the past several years, we’ve written a ton of Dart code and
learned a lot about what works well and what doesn’t. We’re
sharing this with you so you can write consistent, robust, fast
code too. There are two overarching themes:

1. Be consistent. When it comes to things like formatting, and


casing, arguments about which is better are subjective and
impossible to resolve. What we do know is that
being consistent is objectively helpful.

If two pieces of code look different it should be because


they are different in some meaningful way. When a bit of
code stands out and catches your eye, it should do so for a
useful reason.

2. Be brief. Dart was designed to be familiar, so it inherits


many of the same statements and expressions as C, Java,
JavaScript and other languages. But we created Dart
because there is a lot of room to improve on what those
languages offer. We added a bunch of features, from string
interpolation to initializing formals, to help you express your
intent more simply and easily.

If there are multiple ways to say something, you should


generally pick the most concise one. This is not to say you
should code golf yourself into cramming a whole program
into a single line. The goal is code that is economical,
not dense.

A Sample Code-:

// Define a function.

printInteger(int aNumber) {

print('The number is $aNumber.'); // Print to console.

// This is where the app starts executing.

main() {

var number = 42; // Declare and initialize a variable.

printInteger(number); // Call a function.

}
INTROUCTION TO FLUTTER-

Flutter is a new platform for developing Android and iOS apps


from a single codebase, written in Dart. Since our requirements
spoke of a fairly complex UI including animated charts, the idea of
building it only once seemed very attractive. My tasks involved
exercising Flutter’s CLI tools, some pre-built widgets, and its 2D
rendering engine — in addition to writing a lot of plain Dart code to
model and animate charts. I’ll share below some conceptual
highlights of my learning experience, and provide a starting point
for your own evaluation of the Flutter/Dart stack.

This is part one of a two-part introduction to Flutter and its ‘widget’


and ‘tween’ concepts. I’ll illustrate the strength of these concepts
by using them to display and animate charts like the one shown
above. Full code samples should provide an impression of the
level of code clarity achievable with Dart. And I’ll include enough
detail that you should be able to follow along on your own laptop
(and emulator or device), and experience the length of the Flutter
development cycle.
The starting point is a fresh installation of Flutter. Run

$ flutter doctor

to check the setup:

$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter
(Channel beta, v0.5.1, on Mac OS X 10.13.6 17G65, locale en-
US)
[✓] Android toolchain - develop for Android devices
(Android SDK 28.0.0)
[✓] iOS toolchain - develop for iOS devices (Xcode 9.4)
[✓] Android Studio (version 3.1)
[✓] IntelliJ IDEA Community Edition (version 2018.2.1)
[✓] Connected devices (1 available)
• No issues found!

With enough check marks, you can create a Flutter app. Let’s call
it charts:

$ flutter create charts

That should give you a directory of the same name:

charts
android
ios
lib
main.dart
About sixty files have been generated, making up a complete
sample app that can be installed on both Android and iOS. We’ll
do all our coding in main.dart and sibling files, with no pressing need
to touch any of the other files or directories.
You should verify that you can launch the sample app. Start an
emulator or plug in a device, then execute

$ flutter run
in the charts directory. You should then see a simple counting app
on your emulator or device. It uses Material Design widgets, which
is nice, but optional. As the top-most layer of the Flutter
architecture, those widgets are completely replaceable.

Let’s start by replacing the contents of main.dart with the code


below, a simple starting point for playing with chart animations.
Save the changes, then restart the app. You can do that from the
terminal, by pressing R. This ‘full restart’ operation throws away the
application state, then rebuilds the UI. For situations where the
existing application state still makes sense after the code change,
one can press r to do a ‘hot reload’, which only rebuilds the UI.
There is also a Flutter plugin for IntelliJ IDEA providing the same
functionality integrated with a Dart editor:
Once restarted, the app shows a centered text label saying Data
set: nulland a floating action button to refresh the data. Yes,
humble beginnings.
To get a feel for the difference between hot reload and full restart,
try the following: After you’ve pressed the floating action button a
few times, make a note of the current data set number, then
replace Icons.refresh with Icons.add in the code, save, and do a hot
reload. Observe that the button changes, but that the application
state is retained; we’re still at the same place in the random
stream of numbers. Now undo the icon change, save, and do a full
restart. The application state has been reset, and we’re back
to Data set: null.

Our simple app shows two central aspects of the Flutter widget
concept in action:

 The user interface is defined by a tree of immutable


widgets which is built via a foxtrot of constructor calls (where
you get to configure widgets) and build methods (where widget
implementations get to decide how their sub-trees look). The
resulting tree structure for our app is shown below, with the
main role of each widget in parentheses. As you can see, while
the widget concept is quite broad, each concrete widget type
typically has a very focused responsibility.

MaterialApp (navigation)
ChartPage (state management)
Scaffold (layout)
Center (layout)
Text (text)
FloatingActionButton (user interaction)
Icon (graphics)

 With an immutable tree of immutable widgets defining the user


interface, the only way to change that interface is to rebuild the
tree. Flutter takes care of that, when the next frame is due. All
we have to do is tell Flutter that some state on which a subtree
depends has changed. The root of such a state-dependent
subtree must be a StatefulWidget. Like any decent widget,
a StatefulWidget is not mutable, but its subtree is built by
a State object which is. Flutter retains State objects across tree
rebuilds and attaches each to their respective widget in the
new tree during building. They then determine how that
widget’s subtree is built. In our app, ChartPage is
a StatefulWidget with ChartPageState as its State. Whenever the user
presses the button, we execute some code to
change ChartPageState. We’ve demarcated the change
with setState so that Flutter can do its housekeeping and
schedule the widget tree for rebuilding. When that
happens, ChartPageState will build a slightly different subtree
rooted at the new instance of ChartPage.

Immutable widgets and state-dependent subtrees are the main


tools that Flutter puts at our disposal to address the complexities
of state management in elaborate UIs responding to
asynchronous events such as button presses, timer ticks, or
incoming data. From my desktop experience I’d say this
complexity is very real. Assessing the strength of Flutter’s
approach is — and should be — an exercise for the reader: try it out
on something non-trivial.

Our charts app will stay simple in terms of widget structure, but
we’ll do a bit of animated custom graphics. First step is to replace
the textual representation of each data set with a very simple
chart. Since a data set currently involves only a single number in
the interval 0..100, the chart will be a bar chart with a single bar,
whose height is determined by that number. We’ll use an initial
value of 50 to avoid a null height:
CustomPaint is a widget that delegates painting to
a CustomPainter strategy. Our implementation of that strategy draws a
single bar.
Next step is to add animation. Whenever the data set changes, we
want the bar to change height smoothly rather than abruptly.
Flutter has an AnimationController concept for orchestrating
animations, and by registering a listener, we’re told when the
animation value — a double running from zero to one — changes.
Whenever that happens, we can call setState as before and
update ChartPageState.

For reasons of exposition, our first go at this will be ugly:


Ouch. Complexity already rears its ugly head, and our data set is
still just a single number! The code needed to set up animation
control is a minor concern, as it doesn’t ramify when we get more
chart data. The real problem is the
variables startHeight, currentHeight, and endHeight which reflect the
changes made to the data set and the animation value, and are
updated in three different places.

We are in need of a concept to deal with this mess.

Enter tweens. While far from unique to Flutter, they are a


delightfully simple concept for structuring animation code. Their
main contribution is to replace the imperative approach above with
a functional one. A tween is a value. It describes the path taken
between two points in a space of other values, like bar charts, as
the animation value runs from zero to one.
Tweens are generic in the type of these other values, and can be
expressed in Dart as objects of the type Tween<T>:
The jargon lerp comes from the field of computer graphics and is
short for both linear interpolation (as a noun) and linearly
interpolate (as a verb). The parameter t is the animation value,
and a tween should thus lerp from begin (when t is zero)
to end (when t is one).
The Flutter SDK’s Tween<T> class is very similar to the above, but is
a concrete class that supports mutating begin and end. I’m not
entirely sure why that choice was made, but there are probably
good reasons for it in areas of the SDK’s animation support that I
have yet to explore. In the following, I’ll use the Flutter Tween<T>, but
pretend it is immutable.
We can clean up our code using a single Tween<double> for the bar
height:
We’re using Tween for packaging the bar height animation end-
points in a single value. It interfaces neatly with
the AnimationController and CustomPainter, avoiding widget tree rebuilds
during animation as the Flutter infrastructure now
marks CustomPaint for repaint at each animation tick, rather than
marking the whole ChartPage subtree for rebuild, relayout, and
repaint. These are definite improvements. But there’s more to the
tween concept; it offers structure to organize our thoughts and
code, and we haven’t really taken that seriously. The tween
concept says,
Animate Ts by tracing out a path in the space of all Ts as the
animation value runs from zero to one. Model the path with
a Tween<T>.
In the code above, T is a double, but we do not want to
animate doubles, we want to animate bar charts! Well, OK, single
bars for now, but the concept is strong, and it scales, if we let it.

(You may be wondering why we don’t take that argument a step


further and insist on animating data sets rather than their
representations as bar charts. That’s because data sets — in
contrast to bar charts which are graphical objects — generally do
not inhabit spaces where smooth paths exist. Data sets for bar
charts typically involve numerical data mapped against discrete
data categories. But without the spatial representation as bar
charts, there is no reasonable notion of a smooth path between
two data sets involving different categories.)
Returning to our code, we’ll need a Bar type and a BarTween to
animate it. Let’s extract the bar-related classes into their
own bar.dart file next to main.dart:
I’m following a Flutter SDK convention here in
defining BarTween.lerp in terms of a static method on the Bar class.
This works well for simple types like Bar, Color, Rect and many
others, but we’ll need to reconsider the approach for more
involved chart types. There is no double.lerp in the Dart SDK, so
we’re using the function lerpDouble from the dart:ui package to the
same effect.
Our app can now be re-expressed in terms of bars as shown in
the code below; I’ve taken the opportunity to dispense of
the dataSet field.
The new version is longer, and the extra code should carry its
weight. It will, as we tackle increased chart complexity in part two.
Our requirements speak of colored bars, multiple bars, partial
data, stacked bars, grouped bars, stacked and grouped bars, …
all of it animated.
PROJECT
OBJECTIVE-
Treasure Hunt is an application which is a game where we
can find the clues in real world using image processing.

USERS-
There are two basic users -:
1. Players
2. Organizer

SCOPE-
 All Players have their own clues solved page.
 Clues will appear after previous clue is solved.
 Hints will be given to players after the 5 minutes of problem
started.
 It uses images to verify whether the answer is correct or not.
 It is paperless (QR Code etc things not required).

MODULES-
 Starting Page
 Timer when App is started
 Clues Management
 Hints Screen
 Camera Screen
 Machine Learning Algorithm on Images whether the image is
correct or not
TECHNOLOGY TO BE USED
 Android Studio
 Vision API
 Anaconda
 Camera for Recording Clues
 Spider
 Channels for flutter

ROLES OF USERS
 Players - Check clue 1 and try to solve it. After 5 minutes
Hint will appear. After solving Clue1 players can check out
second clue and so on.
 Organizers – They have to add Images of solutions of clues
and the sequence of clues. (At least 10 images are
required).
DESCRIPTION
We can check out the workflow in following
sequence -:
1. This screen will appear first.

2. Now Click on Start button.


3. Next this screen will appear

4. After Clicking on Clue 1, it is displayed on the screen as


shown in figure.

5. After this it will ask for permissions of camera.


6. After giving camera permissions it will appear like this

7. If scanned clue is correct then “Next clue” button is


displayed.
8. If you tap on Next Clue button, then next clue is displayed
References -

 flutter.io
 customvision.ai
 stackoverflow.com
 dartlang.org
 medium.com/flutter-io
 https://codelabs.developers.google.com/codelabs

You might also like