Git Product home page Git Product logo

audio_shaker's Introduction

Audio Shaker

A Music Player in which you can control audio player by shaking device in a particular manner.

To play/pause the current audio file, you can shake the device from center to back, like in video below.

play_pause.mp4

To change speed of the current audio file, you can shake the device, like in video below.

  • center to left to decrease the speed
decrease.mp4
  • center to right to increase the speed
increase.mp4

Application Folder Structure

  1. app - contains config and setup related files
  2. models - data classes which will be used everywhere in the app
  3. resources - data provider classes and contains dto classes to convert response to model classes
  4. repositories - classes used to fetch data from any provider. called from viewmodels.
  5. screens
    1. view files - main screen UI
    2. viewmodel files - contains business logic of the app.
  6. theme - contains styling and dimensions related code
  7. utils - helper classes
  8. widgets - common widgets used throughout the app

Architecture Used

MVVM (Model View ViewModel)

  • Model: Simply holds the data.
  • View: Shows the UI to the user.
  • ViewModel: Link b/w model and view and this can have some business logic as well.

Steps to run the application on local

- start the emulator or connect to physical device.
- run `flutter devices` to check if your device is available to connect.
- run `flutter pub get`
- run `flutter pub run build_runner build --delete-conflicting-outputs`
- run `flutter run`

To generate files after dependency or router changes

flutter pub run build_runner build --delete-conflicting-outputs

Main packages used

  • Stacked - For state management, routing and service locator
  • sensor_plus - To get accelerometer and gyroscope data
  • just_audio - For Audio Player

note: To check the logic used see file -> lib/screens/soundDetail/sound_detail_viewmodel.dart

audio_shaker's People

Contributors

dhruv-garg79 avatar

Watchers

 avatar

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.