diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies new file mode 100644 index 00000000..3411a8cb --- /dev/null +++ b/.flutter-plugins-dependencies @@ -0,0 +1 @@ +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"audioplayers","path":"D:\\\\application setups\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\audioplayers-0.16.0\\\\","dependencies":["path_provider"]},{"name":"path_provider","path":"D:\\\\application setups\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-1.6.14\\\\","dependencies":[]}],"android":[{"name":"audioplayers","path":"D:\\\\application setups\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\audioplayers-0.16.0\\\\","dependencies":["path_provider"]},{"name":"path_provider","path":"D:\\\\application setups\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-1.6.14\\\\","dependencies":[]}],"macos":[{"name":"audioplayers","path":"D:\\\\application setups\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\audioplayers-0.16.0\\\\","dependencies":[]},{"name":"path_provider_macos","path":"D:\\\\application setups\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_macos-0.0.4+3\\\\","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"D:\\\\application setups\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_linux-0.0.1+2\\\\","dependencies":[]}],"windows":[],"web":[{"name":"audioplayers","path":"D:\\\\application setups\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\audioplayers-0.16.0\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"audioplayers","dependencies":["path_provider"]},{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]}],"date_created":"2020-08-31 20:32:24.433437","version":"1.17.2"} \ No newline at end of file diff --git a/ios/Flutter/flutter_export_environment.sh b/ios/Flutter/flutter_export_environment.sh new file mode 100644 index 00000000..14574171 --- /dev/null +++ b/ios/Flutter/flutter_export_environment.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# This is a generated file; do not edit or check into version control. +export "FLUTTER_ROOT=D:\application setups\flutter" +export "FLUTTER_APPLICATION_PATH=M:\Android\projects\xylophone-flutter" +export "FLUTTER_TARGET=lib\main.dart" +export "FLUTTER_BUILD_DIR=build" +export "SYMROOT=${SOURCE_ROOT}/../build\ios" +export "OTHER_LDFLAGS=$(inherited) -framework Flutter" +export "FLUTTER_FRAMEWORK_DIR=D:\application setups\flutter\bin\cache\artifacts\engine\ios" +export "FLUTTER_BUILD_NAME=1.0.0" +export "FLUTTER_BUILD_NUMBER=1" diff --git a/lib/main.dart b/lib/main.dart index 28fea9ce..072b0fda 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,14 +1,45 @@ +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:audioplayers/audio_cache.dart'; void main() => runApp(XylophoneApp()); class XylophoneApp extends StatelessWidget { + void playsound(int i) { + final player = AudioCache(); + player.play('note$i.wav'); + } + + Expanded builtButton(int i, Color color) { + return Expanded( + child: FlatButton( + color: color, + onPressed: () { + playsound(i); + }, + //child: , + ), + ); + } + @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( + backgroundColor: Colors.black, body: SafeArea( - child: Container(), + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + builtButton(1, Colors.red), + builtButton(2, Colors.pink), + builtButton(3, Colors.teal), + builtButton(4, Colors.yellow), + builtButton(5, Colors.green), + builtButton(6, Colors.blue), + builtButton(7, Colors.purple), + ], + ), ), ), ); diff --git a/pubspec.yaml b/pubspec.yaml index 92b60bfb..47c1136d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,6 +11,7 @@ dependencies: sdk: flutter cupertino_icons: ^0.1.2 + audioplayers: ^0.16.0 dev_dependencies: flutter_test: