Skip to content

Instantly share code, notes, and snippets.

View sudirkrishnaa's full-sized avatar

sudirkrishnaa

View GitHub Profile
@sudirkrishnaa
sudirkrishnaa / functionsEg.dart
Created June 5, 2020 06:36
DART FUNCTION TYPES EXAMPLES
//DART FUNCTION TYPES EXAMPLES
//FUNCTIONS WITHOUT ARGUMENTS WITHOUT RETURN
void abc()
{
print('Hi');
}
//FUNCTION WITH ARGUMENTS WITH RETURN
@sudirkrishnaa
sudirkrishnaa / XYLOPHONE APP SOURCE CODE
Last active June 24, 2020 13:26
XYLOPHONE APP SOURCE CODE
import 'package:flutter/material.dart';
import 'package:audioplayers/audio_cache.dart';
void main() => runApp(XylophoneApp());
class XylophoneApp extends StatelessWidget {
void playSound(int SoundNumber) {
final player = AudioCache(); // * Create a FINAL(means constant) variable to create an instance of class AudioCache() so that we can use it our program
player.play('note$SoundNumber.wav'); // ! *** NOTE: USE ONLY note1.wav & NOT assets/note1.wav ***
// * Audioplayers package assumes that its default path is assets/